This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/53891] New: CFLAGS set in configure don't propagate
- From: "jimis at gmx dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 08 Jul 2012 02:41:13 +0000
- Subject: [Bug other/53891] New: CFLAGS set in configure don't propagate
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53891
Bug #: 53891
Summary: CFLAGS set in configure don't propagate
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: other
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jimis@gmx.net
In a standard autotooled application it is only necessary to set CFLAGS on the
./configure command or in the environment. In gcc this is not enough, and at
least BOOT_CFLAGS needs to be set on the make command line. For example the
following is not enough:
$ CFL="-O0 -g3 -fno-inline -march=i586"
$ export -p | grep FLAG
declare -x BOOT_CFLAGS="-O0 -g3 -fno-inline -march=i586"
declare -x BOOT_CXXFLAGS="-O0 -g3 -fno-inline -march=i586"
declare -x CFLAGS="-O0 -g3 -fno-inline -march=i586"
declare -x CXXFLAGS="-O0 -g3 -fno-inline -march=i586"
$ ~/path/to/gcc/configure --prefix=`pwd` --enable-checking=release
--disable-multilib --disable-plugins --enable-languages=c,c++ CFLAGS="$CFL"
BOOT_CFLAGS="$CFL" CXXFLAGS="$CFL" BOOT_CXXFLAGS="$CFL"
$ make
And I need this to actually get a final gcc compiled with my flags:
$ make BOOT_CFLAGS="$CFL" BOOT_CXXFLAGS="$CFL"
I think we should require setting the flags only on ./configure, and it would
also be nice if CFLAGS propagated aumatically to CXXFLAGS.