[systemd-devel] [systemd-commits] docs/gudev

Kay Sievers kay at vrfy.org
Wed Aug 8 10:01:13 PDT 2012


On Wed, Aug 8, 2012 at 6:56 PM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> On 08/08/2012 06:31 PM, Kay Sievers wrote:
>> On Wed, Aug 8, 2012 at 6:26 PM, Zbigniew Jędrzejewski-Szmek
>> <zbyszek at in.waw.pl> wrote:
>>>> +# Hack, hack. You silly gtk-doc, you must not add  CFLAGS multiple
>>>> +# times when calling gcc; it surely can not work with options that must
>>>> +# be listed only once.
>>>> +# Kill CFLAGS here because gtk-doc thinks adding CFLAGS to CC _and_ also
>>>> +# adding CFLAGS itself again would work.
>>>> +CFLAGS=
>>>> +LDFLAGS=
>>> Hi,
>>> are you sure that this works as expected? Quoting info make:
>>> """
>>> An argument that contains `=' specifies the value of a variable: `V=X'
>>> sets the value of the variable V to X.  If you specify a value in this
>>> way, all ordinary assignments of the same variable in the makefile are
>>> ignored; we say they have been "overridden" by the command line
>>> argument.
>>> """
>>> So I expect e.g. 'make CFLAGS=...' to cause your override to be ignored.
>>> I think you have to do
>>>   override CFLAGS=
>>> to have certain effect.
>>
>> Could be that it does not work on the cmdline, I only tried
>> ./configure, which seems to work fine with the assignment and which
>> fails otherwise.
> I just made a simple test, and indeed flags added to gcc on the
> command-line are not erased. I'll add 'override', but I want to check if
> it works with the real flags. Hence a question: which gcc flags cannot
> be used twice?

-specs

###

$ ./autogen.sh ./configure LDFLAGS='-Wl,-z,relro
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld' \
  CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector \
  --param=ssp-buffer-size=4
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' \
  --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib64 --enable-gtk-doc

###

$ cat /usr/lib/rpm/redhat/redhat-hardened-cc1
%rename cc1_options rh_cc1_options_old

*cc1_options:
%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}} %(rh_cc1_options_old)

###

Kay


More information about the systemd-devel mailing list