Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 115010 - gcc-specs-now wrongly detects hardened gcc - no it doesn't
Summary: gcc-specs-now wrongly detects hardened gcc - no it doesn't
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Kevin F. Quinn (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-09 11:31 UTC by Thomas Meyer
Modified: 2005-12-10 00:21 UTC (History)
0 users

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


Attachments
gcc 3.4.4 specs (specs,4.50 KB, text/plain)
2005-12-09 13:15 UTC, Thomas Meyer
Details
gcc 3.4.4 vanilla specs (vanilla.specs,4.48 KB, text/plain)
2005-12-09 13:16 UTC, Thomas Meyer
Details
Toolchain functions (toolchain-funcs.eclass,5.70 KB, text/plain)
2005-12-09 14:45 UTC, Thomas Meyer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Meyer 2005-12-09 11:31:27 UTC
emerge -u world
gives:
Calculating world dependencies ...done!
>>> emerge (1 of 36) x11-base/xorg-server-0.99.4-r2 to /
>>> md5 files   ;-) xorg-server-0.99.3.ebuild
>>> md5 files   ;-) xorg-server-0.99.2-r2.ebuild
>>> md5 files   ;-) xorg-server-0.99.3-r1.ebuild
>>> md5 files   ;-) xorg-server-0.99.4-r1.ebuild
>>> md5 files   ;-) xorg-server-0.99.4.ebuild
>>> md5 files   ;-) xorg-server-0.99.4-r2.ebuild
>>> md5 files   ;-) files/digest-xorg-server-0.99.2-r2
>>> md5 files   ;-) files/digest-xorg-server-0.99.3
>>> md5 files   ;-) files/digest-xorg-server-0.99.3-r1
>>> md5 files   ;-) files/fix-xkb-compile-path-2.patch
>>> md5 files   ;-) files/digest-xorg-server-0.99.4
>>> md5 files   ;-) files/digest-xorg-server-0.99.4-r1
>>> md5 files   ;-) files/digest-xorg-server-0.99.4-r2
>>> md5 src_uri ;-) xorg-server-0.99.4.tar.bz2
>>> md5 src_uri ;-) MesaLib-6.4.1.tar.bz2
>>> Unpacking source...
 * Do not emerge xorg-server without vanilla gcc!

but:
gcc-config -l
 [1] i686-pc-linux-gnu-3.4.4
 [2] i686-pc-linux-gnu-3.4.4-hardenednopie
 [3] i686-pc-linux-gnu-3.4.4-hardenednopiessp
 [4] i686-pc-linux-gnu-3.4.4-hardenednossp
 [5] i686-pc-linux-gnu-3.4.4-vanilla *
 [6] s390-linux-gnu-3.4.4 *
 [7] s390-linux-gnu-3.4.4-hardenednopiessp
 [8] s390-linux-gnu-3.4.4-vanilla

gcc specs are at "[5] i686-pc-linux-gnu-3.4.4-vanilla *"
the s390 is a cross compiler for mainframe development and not used here.
And yes, i did "source /etc/profile"...


Reproducible: Always
Steps to Reproduce:
1.emerge -u world
2.
3.

Actual Results:  
doesn't compile

Expected Results:  
should compile cleanly.
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2005-12-09 12:05:09 UTC
Sounds like gcc-specs-now could be broken.
Comment 2 Kevin F. Quinn (RETIRED) gentoo-dev 2005-12-09 12:45:14 UTC
Thomas - please paste the output of 'gcc -v'
Comment 3 Kevin F. Quinn (RETIRED) gentoo-dev 2005-12-09 12:51:03 UTC
Oh, and attach the specs files indicated - output should be something like:

# gcc -v
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/specs
Configured with: /data/g2/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.4
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libmudflap --enable-java-awt=gtk --enable-languages=c,c++,java,f77
--enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.4.4 (Gentoo Hardened 3.4.4-r1, HTB-3.4.4-1.00, ssp-3.4.4-1.0,
pie-8.7.8)

in which case attach /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/specs
Comment 4 Thomas Meyer 2005-12-09 13:15:42 UTC
Created attachment 74400 [details]
gcc 3.4.4 specs
Comment 5 Thomas Meyer 2005-12-09 13:16:06 UTC
Created attachment 74401 [details]
gcc 3.4.4 vanilla specs
Comment 6 Thomas Meyer 2005-12-09 13:16:44 UTC
gcc -v
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/specs
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/vanilla.specs
Configured with: /var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.4
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libgcj --enable-languages=c,c++,f77 --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.4.4 (Gentoo Hardened 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
Comment 7 Kevin F. Quinn (RETIRED) gentoo-dev 2005-12-09 14:27:23 UTC
Hmm; those look correct, and work as mine do.

Can you attach your /usr/portage/eclass/toolchain-funcs.eclass please?
Comment 8 Thomas Meyer 2005-12-09 14:45:55 UTC
Created attachment 74404 [details]
Toolchain functions
Comment 9 Kevin F. Quinn (RETIRED) gentoo-dev 2005-12-09 15:18:53 UTC
Thanks.  Everything looks like it should work (it does here, and I have the same
specs & toolchain-funcs.eclass).  It's late, so I'll come back to it tomorrow
morning.
Comment 10 Kevin F. Quinn (RETIRED) gentoo-dev 2005-12-10 00:20:42 UTC
x-modular.eclass had:

if [[ ${PN:0:11} = $x ]] && gcc-specs-now; then

which failed as gcc-specs-now, like many other functions (use, has, etcetera),
is built to work when used like:

gcc-specs-now && echo something

or

if gcc-specs-now; then echo something; fi

Unfortunately this means it doesn't do what one might expect in a [[ ]] test,
where it has to be executed separately, for example

if [[ ${PN:0:11} = $x ]] && $(gcc-specs-now); then

would have worked, as would have:

gcc-specs-now && if [[ ${PN:0:11} = $x ]]; then

Joshua Baergen had already fixed this in v1.29 of x-modular.eclass by separating
the gcc-specs-now call into a separate 'if' statement as part of another change
(bug #29541) when I looked this morning, so if you sync up it should work now.

Closing as fixed - reopen if it's still broken after you sync.
Comment 11 Kevin F. Quinn (RETIRED) gentoo-dev 2005-12-10 00:21:34 UTC
fixed in x-modular.eclass