Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 23 Oct 2015 01:23:30 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Cc: Rich Felker <dalias@...c.org>
Subject: Re: Having hard time adding to CFLAGS

* Denys Vlasenko <vda.linux@...glemail.com> [2015-10-23 00:31:09 +0200]:
> Let's say I need to add a gcc option to my musl build.
> 
> configure says:
> ...
> Some influential environment variables:
>   CC                      C compiler command [detected]
>   CFLAGS                  C compiler flags [-Os -pipe ...]
>   CROSS_COMPILE           prefix for cross compiler and tools [none]
>   LIBCC                   compiler runtime library [detected
> 
> So I try this, combining all possible ways of passing CFLAGS
> (past experience is that different projects do it differently).
> 
> CFLAGS is in environment, and on both configure and make
> command lines:
> 
> export CFLAGS="-falign-functions=1"    # for example
> ./configure CFLAGS="$CFLAGS"
> make CFLAGS="$CFLAGS"

this is not what configure said...

> Evidently, my CFLAGS replaced needed flags instead of being added at the end.
> 
> Can this be fixed? If user needs to use e.g. EXTRA_CFLAGS instead,
> please fix configure --help.

it can be fixed, but i think 'needed flag' is not
always clear and overriding CFLAGS on the make
commandline is not polite.

the attached patch makes this work, but i
consider -Os to be not part of 'needed'

View attachment "a.diff" of type "text/x-diff" (1394 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.