Re: [PATCH] honor CFLAGS from environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On 2/12/19 9:36 PM, Ramsay Jones wrote:
> On 12/02/2019 20:12, Uwe Kleine-König wrote:
>> On 2/12/19 9:11 PM, Ramsay Jones wrote:
>>> On 12/02/2019 19:33, Uwe Kleine-König wrote:
>>>> Debian build scripts pass CFLAGS in the environment. To honor these only set
>>>> CFLAGS to "-O2 -g" if CFLAGS is unset. The warnings in the following line
>>>> are added unconditionally. This makes sparse builds reproducible.
>>>>
>>>> Signed-off-by: Uwe Kleine-König <uwe@xxxxxxxxxxxxxxxxx>
>>>>
>>>> --- a/Makefile
>>>> +++ b/Makefile
>>>> @@ -6,7 +6,7 @@
>>>>  
>>>>  
>>>>  CC = gcc-8
>>>> -CFLAGS = -O2 -g
>>>> +CFLAGS ?= -O2 -g
>>>>  CFLAGS += -Wall -Wwrite-strings
>>>>  LD = $(CC)
>>>>  LDFLAGS += -Wl,--as-needed
>>>>
>>>
>>> What version of Makefile is this? It does not apply to
>>> the 'master' branch.
>>>
>>> For example 'CC = gcc-8' and 'LDFLAGS += -Wl,--as-needed'
>>> don't appear master:Makefile.
>>
>> Argh, I forgot that I had some patches applied (from the Debian package).
>>
>>> Otherwise, this does indeed make setting CFLAGS in the
>>> environment easier and doesn't make setting it on the
>>> command-line any worse, so ...
>>
>> Is this an Ack?
> 
> No. Just a mild encouragement to re-roll the patch on
> a clean base.
> 
> Also, "The warnings in the following line are added
> unconditionally." in the commit message is far from
> clear. (when CFLAGS is set from the environment, the
> += append happens without problem, but you seem to
> be saying that these additions will be added from the
> environment at the same time?)

Will fix when respinning the patch.

Thanks for your input.

> Do you also set any other variables in the environment
> (eg. LDFLAGS)?

Yes, the packages have the following variables set in their build
environment: CFLAGS, CPPFLAGS, CXXFLAGS, FCFLAGS, FFLAGS, GCJFLAGS,
LDFLAGS, OBJCFLAGS, OBJCXXFLAGS. Apart from CFLAGS these is no problem.

Best regards
Uwe

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux