Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 539858 - clang profiles: fix can't create stage1, and cleanup
Summary: clang profiles: fix can't create stage1, and cleanup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: Normal normal (vote)
Assignee: Gentoo AMD64 FreeBSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-12 11:11 UTC by Yuta SATOH
Modified: 2015-03-14 14:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sample patch for clang profile (539858.patch,1.73 KB, patch)
2015-02-12 11:16 UTC, Yuta SATOH
Details | Diff
tested patch for clang profile. (539858.patch,1.75 KB, patch)
2015-02-13 11:43 UTC, Yuta SATOH
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta SATOH 2015-02-12 11:11:23 UTC
Changes)
* Added sys-devel/llvm static-analyzer to package.use.force. need to make the stage1.
* Remove unnecessary packages from packages.build. 
  On FreeBSD, other required packages is complemented by default/bsd/fbsd/packages.build. On Linux, maybe default/linux/packages.build.


FYI, 
# USE="-* python_targets_python2_7" emerge -pv sys-devel/clang sys-deve/llvm
The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by sys-devel/clang-3.5.1-r100
# required by @selected
# required by @world (argument)
=sys-devel/llvm-3.5.1 static-analyzer
Comment 1 Yuta SATOH 2015-02-12 11:16:00 UTC
Created attachment 396244 [details, diff]
sample patch for clang profile
Comment 2 Alexis Ballier gentoo-dev 2015-02-12 11:24:18 UTC
ah, so packages.build stacks :)


as for static-analyzer, why is it needed ?
it is enabled by default on llvm ebuilds; maybe it is because USE=-* ? have you tried 'BOOTSTRAP_USE="${BOOTSTRAP_USE} static-analyzer"' ?
Comment 3 Yuta SATOH 2015-02-12 11:52:00 UTC
(In reply to Alexis Ballier from comment #2)
> ah, so packages.build stacks :)
> 
> 
> as for static-analyzer, why is it needed ?
> it is enabled by default on llvm ebuilds; maybe it is because USE=-* ? have
> you tried 'BOOTSTRAP_USE="${BOOTSTRAP_USE} static-analyzer"' ?

Ah! I had forgotten BOOTSTRAP_USE.
Thanks for your info.
I'll test in a few weeks.


FYI,
If you want to move to profiles/features, I think still has two problems.

* Drop sys-libs/libcxx{,rt} abi_x86_32 from package.use.force. Must define in another package.use.force for multilib (features/multilib/package.use.force ?).
* Need to change strip-flags (flag-o-matic.eclass) to pass through -stdlib=libc++.
Details please see bug 498910.
Comment 4 Yuta SATOH 2015-02-13 11:43:50 UTC
Created attachment 396346 [details, diff]
tested patch for clang profile.

I've tested, I was confirmed that stage1,2,3 can create.
I'll attach the updated patch.


Fixed bug 498910. No need change strip-flags for create stage{1,2,3}.
Please add cxxflags: -stdlib=libc++ ${CFLAGS} to specfile of catalyst instead.

Overwrite CXXFLAGS that is included in stages's /etc/portage/make.conf.
When you do not specify anything, it's CXXFLAGS="${CFLAGS}".
It should be CXXFLAGS="-stdlib=libc++ ${CFLAGS}".
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-02-26 18:29:29 UTC
I think you didn't answer why exactly it's needed :).

Long story short:

1. if installing llvm[-static-analyzer] pretty much breaks your Gentoo, you want that in package.use.force,

2. if it is needed *only* for stage1, then you want BOOTSTRAP_USE.
Comment 6 Yuta SATOH 2015-03-10 11:03:23 UTC
(In reply to Michał Górny from comment #5)
> I think you didn't answer why exactly it's needed :).
> 
> Long story short:
> 
> 1. if installing llvm[-static-analyzer] pretty much breaks your Gentoo, you
> want that in package.use.force,
> 
> 2. if it is needed *only* for stage1, then you want BOOTSTRAP_USE.

I think better to use package.use.force.
Because clang can not be disabled in this profile.
It is necessary to not be easily disabled by the user.

@aballier, What do you think ?
Comment 7 Alexis Ballier gentoo-dev 2015-03-10 11:08:18 UTC
(In reply to Yuta SATOH from comment #6)
> (In reply to Michał Górny from comment #5)
> > I think you didn't answer why exactly it's needed :).
> > 
> > Long story short:
> > 
> > 1. if installing llvm[-static-analyzer] pretty much breaks your Gentoo, you
> > want that in package.use.force,
> > 
> > 2. if it is needed *only* for stage1, then you want BOOTSTRAP_USE.
> 
> I think better to use package.use.force.
> Because clang can not be disabled in this profile.
> It is necessary to not be easily disabled by the user.
> 
> @aballier, What do you think ?

clang is already forced afaik, what i dont understand is why static-analyzer has to be installed
Comment 8 Yuta SATOH 2015-03-14 05:00:26 UTC
(In reply to Alexis Ballier from comment #7)
> (In reply to Yuta SATOH from comment #6)
> > (In reply to Michał Górny from comment #5)
> > > I think you didn't answer why exactly it's needed :).
> > > 
> > > Long story short:
> > > 
> > > 1. if installing llvm[-static-analyzer] pretty much breaks your Gentoo, you
> > > want that in package.use.force,
> > > 
> > > 2. if it is needed *only* for stage1, then you want BOOTSTRAP_USE.
> > 
> > I think better to use package.use.force.
> > Because clang can not be disabled in this profile.
> > It is necessary to not be easily disabled by the user.
> > 
> > @aballier, What do you think ?
> 
> clang is already forced afaik, what i dont understand is why static-analyzer
> has to be installed

>=clang-3.3-r100 requires RDEPEND="~sys-devel/llvm-${PV}[static-analyzer]".
When using BOOTSTRAP_USE, when user sets USE="-static-analyzer" in make.conf, the following problems occur.
This problem does not occur if use package.use.force.


The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by sys-devel/clang-3.5.1-r100
# required by @selected
# required by @world (argument)
=sys-devel/llvm-3.5.1 static-analyzer
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-03-14 06:02:24 UTC
Ah, right. So please put static-analyzer in package.use.force along with clang.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-03-14 14:11:09 UTC
PR merged now.