Re: Macro %{optflags}

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

 



2010/9/16 Ralf Corsepius <rc040203@xxxxxxxxxx>:
> On 09/16/2010 03:49 PM, Sergio Belkin wrote:
>> 2010/9/15 Ralf Corsepius<rc040203@xxxxxxxxxx>:
>>> On 09/15/2010 05:02 PM, Sergio Belkin wrote:
>>>>
>>>> Hi,
>>>>
>>>> Does Makefile flags from the tarball overrides %{optflags} ?
>>>
>>> This question can't be answered.
>>>
>>> %{optflags} and Makefiles actually are entirely unrelated.
>>>
>>> How to communicate %{optflags} to Makefiles can vary largely between
>>> rpm.specs and is part of the job package maintainers are supposed to take
>>> care of.
>>>
>>> Ralf
>>>
>>
>> Well I am really newbie packaging,
> Everybody is a newbie, somewhere ;)
>
>> As rpm command:
>> rpm --eval "%{optflags}"
>> -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
>> -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686
>> -mtune=atom -fasynchronous-unwind-tables
>>
>> but Makefile contains:
>>
>> CXXFLAGS=-ansi  -Wall -Wno-deprecated
>  >
>> So, what of these flags are commited?
> To be able to help, you'd have to provide further details about the
> package you are trying to package, because there are several way to
> communicate %{optflags} to a package's build-system.
>
> E.g.
>
> * Plain simple Makefile:
> Override the make-variable to receive %optflags from the environment at
> make-time:
>
> make CFLAGS="%{optflags}"

It doesn't work.

>
> * Modern autotools:
> Pass optflags as args at configure-time:
> .../configure CFLAGS="%{optflags}"

It doesn't work either.

>
> * Old autotools:
> Pass from the environment:
> CFLAGS="%{optflags}" .../configure

Id above. No way.

I've tried even:

%configure CXXFLAGS="-ansi"

and

make CXXFLAGS="-ansi"


It's weird, if I do the same with the tarballs with autotools, always
prevail those flags submitted by the user at configure&&make time.

and the problem stays here: I  mean default flags always go after my
custom ones. Is that deliberately from Fedora packaging system?



> Ralf

-- 
--
Sergio Belkin  http://www.sergiobelkin.com
Watch More TV http://sebelk.blogspot.com
LPIC-2 Certified
--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging



[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux