Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 598984 - app-shells/quoter: Please pass CC environment variable.
Summary: app-shells/quoter: Please pass CC environment variable.
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-05 08:07 UTC by Yuta SATOH
Modified: 2018-11-25 10:12 UTC (History)
3 users (show)

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


Attachments
sample patch for quoter-2.0_p2.ebuild (bug598984.patch,852 bytes, patch)
2016-11-05 08:10 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 2016-11-05 08:07:33 UTC
Please pass CC environment variable.
We have a more specific CC instead of cc.
e.g) x86_64-pc-linux-gnu-gcc


Actual Results:
>>> Compiling source in /var/tmp/portage/app-shells/quoter-2.0_p2/work/quoter-2.0_p2 ...
make -j1
cc  -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c || \
cc -DAVOID_ATTRIBUTE_NORETURN \
         -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c || \
cc -DAVOID_BUILTIN_EXPECT \
         -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c || \
cc -DAVOID_BUILTIN_EXPECT -DAVOID_ATTRIBUTE_NORETURN \
         -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c
>>> Source compiled.


Expected Results:
>>> Compiling source in /var/tmp/portage/app-shells/quoter-2.0_p2/work/quoter-2.0_p2 ...
make -j1
x86_64-pc-linux-gnu-gcc  -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c || \
x86_64-pc-linux-gnu-gcc -DAVOID_ATTRIBUTE_NORETURN \
         -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c || \
x86_64-pc-linux-gnu-gcc -DAVOID_BUILTIN_EXPECT \
         -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c || \
x86_64-pc-linux-gnu-gcc -DAVOID_BUILTIN_EXPECT -DAVOID_ATTRIBUTE_NORETURN \
         -O2 -pipe -Wl,-O1 -Wl,--as-needed -o bin/quoter src/quoter.c
>>> Source compiled.
Comment 1 Yuta SATOH 2016-11-05 08:10:13 UTC
Created attachment 452406 [details, diff]
sample patch for quoter-2.0_p2.ebuild
Comment 2 Martin Väth 2016-11-05 08:26:31 UTC
I am surprised to learn that CC is different than e.g. CFLAGS or LDFLAGS
here, i.e., that the mere default of portage is not already doing the
right thing for CC automatically, but that an eclass must might used.

Thanks for the patch! (I already put it in the mv overlay).
Comment 3 Michael Palimaka (kensington) gentoo-dev 2016-11-05 08:38:45 UTC
CFLAGS work automatically because it can be accessed via the environment - but CC is not automagically defined anywhere. tc-getCC determines CC based on CHOST, something that some build systems can do automatically.
Comment 4 Fab 2017-10-27 10:03:26 UTC
Can't cross-compile :

> cc -DAVOID_BUILTIN_EXPECT -DAVOID_ATTRIBUTE_NORETURN \
>        -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -Wl,-O1 \
>        -Wl,--as-needed -o bin/quoter src/quoter.c
> gcc: error: unrecognized command line option '-mfpu=vfpv3-d16'
> gcc: error: unrecognized command line option '-mfloat-abi=hard'
> gcc: error: unrecognized command line option '-mfpu=vfpv3-d16'
> gcc: error: unrecognized command line option '-mfloat-abi=hard'
> gcc: error: unrecognized command line option '-mfpu=vfpv3-d16'
> gcc: error: unrecognized command line option '-mfloat-abi=hard'
> gcc: error: unrecognized command line option '-mfpu=vfpv3-d16'
> gcc: error: unrecognized command line option '-mfloat-abi=hard'
> make: *** [Makefile:10: bin/quoter] Error 1
>  * ERROR: app-shells/quoter-3.0_p2-r1::gentoo failed (compile phase):
>  *   emake failed