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

            Bug ID: 59242
           Summary: Ensure correct FLAGS are used at various stages of the
                    build
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mforney at mforney dot org

Created attachment 31268
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31268&action=edit
Fixes issues 2 and 3

Hi,

I've encountered several areas in which incorrect flags are being used due to
minor issues in configures/Makefiles.

* In fixincludes/Makefile.in, $(CPPFLAGS) is used in the compile rule, but is
not set above.
* In gcc/configure.ac, when cross-compiling, configure calls itself with
--host=${build}, but does not pass through CXX/CXXFLAGS.
* Also in gcc/configure.ac, when cross-compiling, configure does not set
BUILD_CXXFLAGS appropriately, causing CXXFLAGS for the host to be used.
* In Makefile.tpl, CPPFLAGS is set to $(CPPFLAGS_FOR_TARGET), and in
Makefile.def, CPPFLAGS_FOR_TARGET is included in flags_to_pass. However, from
what I can tell, the commit adding CPPFLAGS_FOR_TARGET was reverted in r141859.

I have attached patches fixing all but the last point, as I am unsure of how to
handle that. It seems potentially useful functionality to have (as well as
CPPFLAGS_FOR_BUILD), however, I'm sure it was reverted for a good reason.

Reply via email to