public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/53891] New: CFLAGS set in configure don't propagate
@ 2012-07-08  2:41 jimis at gmx dot net
  2012-07-08  3:06 ` [Bug other/53891] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: jimis at gmx dot net @ 2012-07-08  2:41 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug other/53891] CFLAGS set in configure don't propagate
  2012-07-08  2:41 [Bug other/53891] New: CFLAGS set in configure don't propagate jimis at gmx dot net
@ 2012-07-08  3:06 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-07-08  3:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53891

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-07-08 03:05:56 UTC ---
If you want a debuggable GCC there is a better way than using CFLAGS and
BOOT_CFLAGS and without using --disable-bootstrap.  Do the following:
configure for a normal build
make all-gcc
cd gcc
make clean
make all


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-08  3:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-08  2:41 [Bug other/53891] New: CFLAGS set in configure don't propagate jimis at gmx dot net
2012-07-08  3:06 ` [Bug other/53891] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).