Hi,

On Sun, May 30, 2010 at 12:22:52PM -0700, Brandon Davidson wrote:
> On 5/30/10 10:22 AM, "Axel Thimm" <[email protected]> wrote:
> >> 
> >> Oh, the spec file overrides CFLAGS and doesn't contain -std=gnu99?
> >> 
> > The config.log for RHEL5/x86_64 says:
> > 
> > CFLAGS='-std=gnu99 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> > -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
> > -mtune=generic -Wall -W -Wmissing-prototypes -Wmissing-declarations
> > -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast
> > -Wstrict-aliasing=2 -I/usr/kerberos/include   '
> 
> It may be a specfile after all. %configure exports CFLAGS before calling
> ./configure, which should be sufficient to get any needed options into the
> Makefile, merged with whatever configure auto-detects (including
> -std=gnu99).
> 
> Your spec also calls "make CFLAGS="$RPM_OPT_FLAGS" which overrides
> everything and omits -std=gnu99 unless specifically included by the
> packager.

No, that's not quite correct. If you check the above you will find
that the CFLAGS passed on the make argument list is just the starting
value for CFLAGS. The -std=gnu99 is added by configure, there is no
need to have it added by the packager.

> If I remove that and just call 'make' it works fine - my %optflags
> are merged in with the CFLAGS from configure and the build completes without
> error.

How are your %optflags (which is the same as $RPM_OPT_FLAGS) merged
into the build if it is not passed to make? And it would yield the
same CFLAGS as above (merged default optflags with what configure adds
to it).
-- 
Axel.Thimm at ATrpms.net

Attachment: pgpeZbu7mbE7c.pgp
Description: PGP signature

Reply via email to