Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 70111 - sys-boot/grub uses $CC
Summary: sys-boot/grub uses $CC
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Robert Moss (RETIRED)
URL:
Whiteboard:
Keywords:
: 88505 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-04 17:36 UTC by SpanKY
Modified: 2005-04-09 19:44 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2004-11-04 17:36:25 UTC
should use $(tc-getCC) from toolchain-funcs eclass instead

also, your changelog entries say 'rmoss@gentoo.org' while your bugzilla/gentoo account are 'robmoss@gentoo.org' ...
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2004-11-09 11:24:49 UTC
Rob is probably using echangelog which defaults to the current username.  Rob, you should set ECHANGELOG_USER="Rob Moss <robmoss@gentoo.org>" in your environment to override.
Comment 2 Robert Moss (RETIRED) gentoo-dev 2004-11-09 13:15:33 UTC
Stupid bloody echangelog. I've changed my username to robmoss now anyway, had to reinstall and was also out of action for seven weeks (warning: do not approach me if you work for BT Broadband UK...)

I'll fix this later on tonight if I get time - still compiling essential stuff so I don't really want to reboot to test this until that's finished. If it doesn't get done tonight, it'll get done tomorrow.

Aron - thanks :-)
Comment 3 Robert Moss (RETIRED) gentoo-dev 2004-11-18 10:40:47 UTC
Sorry, got a bit sidetracked with gcc-4 (again...)

Is it just ${CC} that needs changing?
Comment 4 SpanKY gentoo-dev 2004-11-21 15:12:33 UTC
just fixing ${CC} looks fine after a quick glance at the ebuild ...
Comment 5 Robert Moss (RETIRED) gentoo-dev 2004-11-23 10:44:06 UTC
Okay, well I fixed that in 0.95.20040823 last night... I'll backport it to the rest of the ebuilds later on.
Comment 6 Joakim 2004-11-24 04:19:36 UTC
Have this been fixed yet? On bootstrap 2004.3 I get this error when arriving to grub:

checking for C compiler default output name... configure: error: C compiler cannot create executables!

but I think it have to do with this bug as when looking at config.log I see:
configure:2371: checking for C compiler version
configure:2374: getCC -fno-pic -nopie --version </dev/null > &5
./configure:line 2375:getCC:command not found
configure:2377:$?=127
configure:2379: getCC -fno-pic -nopie -v </dev/null > &5
./configure:line 2380:getCC:command not found
(and so on until finally)
configure:failed program was:
| /* confdefs.h.  */
|

I'm not sure if it soley have to do with it as gcc-config also act strange:
portage# gcc-config -l
* /usr/bin/gcc-config: profile does not exist or invalid setting for /etc/env.d/gcc/i686-pc-linux-gnu-3.4.3
[1] i386-pc-linux-gnu-3.3.4
[2] i686-pc-linux-gnu-3.4.3 *
[3] i686-pc-linux-gnu-3.4.3-hardened
[4] i686-pc-linux-gnu-3.4.3-hardenednopie
[5] i686-pc-linux-gnu-3.4.3-hardenednossp

Anyhow thought of supplying the info if it helps.
Comment 7 Syncops 2004-11-25 22:37:15 UTC
tried to emerge 0.95.20040823 today, previous version 0.94-r1 runs fine at the moment

failed beacause of missing the getCC command.
I'm running 64 bit and told that i should use grub-static.

no error with gcc-config -l though 

Syncops
Comment 8 Joakim 2004-11-26 00:03:17 UTC
grub-static is simply grub-0.93, I think. Possibly it's static linked as well, I don't know. I put '>=sys-boot/grub-0.95 im my package.mask file as it definately is broken. That gave me grub-0.94-r2 instead, which compiled fine.
Comment 9 Tuan Van (RETIRED) gentoo-dev 2004-11-26 17:05:53 UTC
> configure:2374: getCC -fno-pic -nopie --version </dev/null > &5
there are typos in the ebuild.
s/{tc-getCC}/(tc-getCC)
Comment 10 Joakim 2004-11-27 00:59:43 UTC
the ebuild have:
has_pie && CC="${tc-getCC} `test_flag -fno-pic` `test_flag -nopie`"
has_ssp && CC="${tc-getCC} `test_flag -fno-stack-protector`"

do you mean it should be:
has_pie && CC="s/{tc-getCC}/(tc-getCC) `test_flag -fno-pic` `test_flag -nopie`"
has_ssp && CC="s/{tc-getCC}/(tc-getCC) `test_flag -fno-stack-protector`"

?
Comment 11 Tuan Van (RETIRED) gentoo-dev 2004-11-27 17:31:33 UTC
I mean the ebuils should read:
has_pie && CC="$(tc-getCC) `test_flag -fno-pic` `test_flag -nopie`"
has_ssp && CC="$(tc-getCC) `test_flag -fno-stack-protector`"
Comment 12 Harald van Dijk (RETIRED) gentoo-dev 2004-11-29 01:11:14 UTC
I believe that would be wrong too. If has_ssp and has_pie both return 0, all three flags should be tested, while with your suggestion, only -fno-stack-protector would be. Inserting CC="$(tc-getCC)" before the has_pie/_ssp checks and changing CC="${tc-getCC} ..." back to CC="${CC} ..." should work.
Comment 13 Luke Worth 2004-11-30 13:47:11 UTC
I can confirm that, just emerged grub-0.95 with those changes
Comment 14 Scott Shawcroft (RETIRED) gentoo-dev 2004-12-05 15:33:34 UTC
The changes mentioned also fixed the problem for me.
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-12-07 17:20:59 UTC
I've fixed the ${tc-getCC}/$(tc-getCC) error in CVS now.
Comment 16 Martin von Gagern 2005-02-23 06:58:03 UTC
This still needs to be backported.
Comment 17 Martin von Gagern 2005-02-23 07:37:11 UTC
Maybe using CFLAGS instead of CC would be the better way. Also note bug 69726 on problems with hardened and grub.
Comment 18 SpanKY gentoo-dev 2005-04-09 19:44:55 UTC
*** Bug 88505 has been marked as a duplicate of this bug. ***