[Swan-dev] Move all CFLAGS config logic into mk/config.mk?

Andrew Cagney andrew.cagney at gmail.com
Wed Mar 11 22:28:04 EET 2015


Unfortunately the (reverted) first cut cause had problems with kernel
builds - setting CFLAGS at the top-level can cause problems.  As a result,
I've pushed the more aggressive plan B:
- introduces USERLAND_CFLAGS make variable (so, hopefully, it is clear that
the flags are not intended for the kernel)
- adds mk/userland-cflags.mk file to construct USERLAND_CFLAGS value
- moved most of the CFLAGS+=-D options to that file
The old USERCOMPILE barely survived (greatly stripped down, there are
separate DEBUG_CFLAGS and OPTIMIZE_CFLAGS for instance).  The old WERROR
flag didn't.

It didn't touch -L, -I and -l flags as they get into ordering problems.
Leave them for another day.

Andrew


On 11 March 2015 at 11:13, Andrew Cagney <andrew.cagney at gmail.com> wrote:

> I've pushed this.
>
> On 6 March 2015 at 12:21, Andrew Cagney <andrew.cagney at gmail.com> wrote:
>
>> Hi,
>>
>> This patch:
>>
>> commit f12e856de21a3dd1ca3d49946c3902
>> a04cf9ec70
>> Author: Paul Wouters <pwouters at redhat.com>
>> Date:   Fri Mar 6 10:06:52 2015 -0500
>>
>>     FIPS: Do not allow PSK in FIPS mode (submitted patch badly merged in)
>>
>>     This was merged in wrong years ago in upstream openswan, so only
>>     RHEL6 versions of openswan properly enforced this.
>>
>> which is about lines like:
>>
>> ifeq ($(USE_FIPSCHECK),true)
>> CFLAGS+=-DFIPS_CHECK
>> endif
>>
>> littered through the Makefiles prompts the question.  Should we simply
>> move all of these to mk/config.mk?
>>
>> Baring objections, I'll build/test/push this Monday.  As they say, this
>> should be safe ...
>>
>> Andrew
>>
>> PS: It doesn't include things like this:
>>
>> ifeq ($(USE_LINUX_AUDIT),true)
>> LIBSPLUTO += -laudit
>> endif
>>
>> or this:
>>
>> ifeq ($(USE_NETKEY),true)
>> # Linux always supports udpfromto
>> UDPFROMTO_SRCS=udpfromto.c
>> endif
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20150311/d4ca13a3/attachment-0001.html>


More information about the Swan-dev mailing list