Bug 5798 - CFLAGS info lost in configure
Summary: CFLAGS info lost in configure
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.2.4
Hardware: Sparc Solaris
: P3 normal
Target Milestone: ---
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-26 13:53 UTC by John Center
Modified: 2009-05-13 02:29 UTC (History)
1 user (show)

See Also:


Attachments
config.log file (118.36 KB, text/plain)
2008-09-26 13:57 UTC, John Center
no flags Details
Makefile created by configure (99.13 KB, text/plain)
2008-09-26 13:59 UTC, John Center
no flags Details
proposed patch (711 bytes, patch)
2008-10-01 19:22 UTC, Volker Lendecke
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Center 2008-09-26 13:53:12 UTC
Configure created a Makefile that did not have my CFLAGS settings.

This is on Solaris 10, with the Sun Studio 12 tools.
Comment 1 John Center 2008-09-26 13:57:47 UTC
Created attachment 3636 [details]
config.log file

If you look at the beginning of the config.log file, you can see my CFLAGS settings are there.
Comment 2 John Center 2008-09-26 13:59:59 UTC
Created attachment 3637 [details]
Makefile created by configure

This is the ../sources/Makefile created by configure.  The CFLAGS settings that are listed at the beginning of the config.log file are not there.
Comment 3 John Center 2008-09-28 16:58:36 UTC
The problem appears to be at line 11354 in configure:

if test "x$debug" = "xyes" ; then
        CFLAGS="${CFLAGS} -g"
else
        CFLAGS="-O"
fi

The old CFLAGS is not being saved in the second part of the if statement.  It should be:
               CFLAGS="${CFLAGS} -O"

Otherwise, if debug is not being set, all of the previous settings are being cleared except for the "-O" option.

Comment 4 Volker Lendecke 2008-10-01 19:22:45 UTC
Created attachment 3652 [details]
proposed patch

Can you try the attached patch?

Thanks,

Volker
Comment 5 Karolin Seeger 2009-05-13 02:29:08 UTC
Patch is upstream (already included in 3.3 series, will be included in 3.2.12).
Closing out bug report.

Thanks for reporting!