[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CF_CC_ENV_FLAGS breaks ccache build
From: |
Enrico Scholz |
Subject: |
Re: CF_CC_ENV_FLAGS breaks ccache build |
Date: |
Wed, 24 Aug 2016 15:45:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) |
Thomas Dickey <address@hidden> writes:
>> the CF_CC_ENV_FLAGS code in recent snapshots (20160625) breaks builds
>> where CC looks like
>>
>> | CC="ccache arm-linux-gnueabi-gcc -march=armv7ve -marm -mfpu=neon-vfpv4
>> -mfloat-abi=hard ..."
>>
>> [...]
>>
>> I am in doubt about the usefulness of CF_CC_ENV_FLAGS and I am not sure
>> what you want to get with it. But at least, I would trigger it only
>> when '-[IDU]' is in CC.
>
> We got to this point because several people put compiler-flags into $CC
> (here's another special case to deal with).
I guess, they are writing these options into $CC because there are too
much broken buildsystems which use $CFLAGS for mandadatory options and
do not allow the user to override it.
I agree that some language related options can cause problems when $CC
is used for other tasks (other languages (where e.g. $CXX would be the
correct choice) or build steps (e.g. $CPP or $LD)).
But CF_CC_ENV_FLAGS in its actual implementation causes much more trouble
than e.g. an -O3 in $CC.
> Further reading:
>
> https://www.gnu.org/prep/standards/html_node/Command-Variables.html
A $CC value of 'ccache some-gcc -march=... -m... --sysroot=...' is
completely fine. The 'some-gcc' tool will not be able to build a simple
program without them and they affect every part of the build process
(preprocessing, compiling + linking).
And piping it through 'ccache' is widely used.
Enrico