---- a/Makefile.in 2006-07-02 15:31:20.000000000 +0200
-+++ b/Makefile.in 2006-07-02 20:55:33.573762250 +0200
-@@ -274,7 +274,7 @@
-
- # Flags to pass to stage2 and later makes. They are defined
- # here so that they can be overridden by Makefile fragments.
--BOOT_CFLAGS= -g -O2
-+BOOT_CFLAGS= -O2
- BOOT_LDFLAGS=
-
- BISON = @BISON@
---- a/gcc/Makefile.in 2008-02-25 15:53:34.000000000 +0100
-+++ b/gcc/Makefile.in 2008-03-03 16:42:29.000000000 +0100
-@@ -560,7 +560,7 @@
-
- # Options to use when compiling libgcc2.a.
- #
--LIBGCC2_DEBUG_CFLAGS = -g
-+LIBGCC2_DEBUG_CFLAGS =
- LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
- $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) \
- -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
---- a/gcc/ada/gcc-interface/Makefile.in 2004-09-13 12:18:40.000000000 +0200
-+++ b/gcc/ada/gcc-interface/Makefile.in 2004-09-26 11:40:30.070894416 +0200
+--- gcc-4.7.1/gcc/ada/gcc-interface/Makefile.in.orig 2012-07-10 17:33:42.146462985 +0200
++++ gcc-4.7.1/gcc/ada/gcc-interface/Makefile.in 2012-07-12 18:27:21.682409479 +0200
@@ -66,7 +66,7 @@
# CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
# BOOT_CFLAGS is the value of CFLAGS to pass
BOOT_CFLAGS = -O $(CFLAGS)
# These exists to be overridden by the t-* files, respectively.
T_CFLAGS =
-@@ -102,9 +102,9 @@
+@@ -105,13 +105,13 @@ TEXI2PDF = texi2pdf
+ GNATBIND_FLAGS = -static -x
ADA_CFLAGS =
ADAFLAGS = -W -Wall -gnatpg -gnata
- SOME_ADAFLAGS =-gnata
-FORCE_DEBUG_ADAFLAGS = -g
+FORCE_DEBUG_ADAFLAGS =
- GNATLIBFLAGS = -gnatpg -nostdinc
+ NO_INLINE_ADAFLAGS = -fno-inline
+ NO_OMIT_ADAFLAGS = -fno-omit-frame-pointer
+ NO_SIBLING_ADAFLAGS = -fno-optimize-sibling-calls
+ NO_REORDER_ADAFLAGS = -fno-toplevel-reorder
+ GNATLIBFLAGS = -W -Wall -gnatpg -nostdinc
-GNATLIBCFLAGS = -g -O2
+GNATLIBCFLAGS = -O2
# Pretend that _Unwind_GetIPInfo is available for the target by default. This
# should be autodetected during the configuration of libada and passed down to
# here, but we need something for --disable-libada and hope for the best.
---- a/libada/Makefile.in 2005-11-04 13:49:08.000000000 +0000
-+++ b/libada/Makefile.in 2005-11-24 23:52:14.739531296 +0000
-@@ -49,13 +49,13 @@
- LDFLAGS=
-
- # The tedious process of getting CFLAGS right.
--CFLAGS=-g
-+CFLAGS=
- LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
- GCC_WARN_CFLAGS = $(LOOSE_WARN)
- WARN_CFLAGS = @warn_cflags@
-
- TARGET_LIBGCC2_CFLAGS=
+--- gcc-4.7.1/libada/Makefile.in.orig 2012-06-12 17:12:37.000000000 +0200
++++ gcc-4.7.1/libada/Makefile.in 2012-07-12 18:27:53.482408144 +0200
+@@ -59,7 +59,7 @@ LDFLAGS=
+ CFLAGS=-g
+ PICFLAG = @PICFLAG@
+ GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
-GNATLIBCFLAGS= -g -O2
+GNATLIBCFLAGS= -O2
- GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
- -DIN_RTS @have_getipinfo@
+ GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
+ -fexceptions -DIN_RTS @have_getipinfo@
+
+--- gcc-4.7.1/libffi/Makefile.am.orig 2012-02-27 11:00:12.000000000 +0100
++++ gcc-4.7.1/libffi/Makefile.am 2012-07-12 18:28:20.115740360 +0200
+@@ -168,7 +168,7 @@
---- a/libffi/Makefile.in 2004-08-30 17:42:59.000000000 +0200
-+++ b/libffi/Makefile.in 2004-09-26 11:44:10.789340112 +0200
-@@ -453,7 +453,7 @@
- $(am__append_21) $(am__append_22)
- libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
- nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
--AM_CFLAGS = -Wall -g -fexceptions
-+AM_CFLAGS = -Wall -fexceptions
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
- libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS)
- AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
---- a/libffi/Makefile.am 2008-05-09 12:10:53.000000000 +0200
-+++ b/libffi/Makefile.am 2008-11-28 02:02:01.690063811 +0100
-@@ -154,7 +154,7 @@
- libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
- nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
-AM_CFLAGS = -Wall -g -fexceptions
+AM_CFLAGS = -Wall -fexceptions
-
+ if FFI_DEBUG
+ # Build debug. Define FFI_DEBUG on the commandline so that, when building with
+ # MSVC, it can link against the debug CRT.
+--- gcc-4.7.1/libffi/Makefile.in.orig 2012-06-14 10:48:08.000000000 +0200
++++ gcc-4.7.1/libffi/Makefile.in 2012-07-12 18:28:35.029073067 +0200
+@@ -486,7 +486,7 @@ libffi_convenience_la_LIBADD = $(libffi_
+ libffi_convenience_la_DEPENDENCIES = $(libffi_la_DEPENDENCIES)
+ nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
+-AM_CFLAGS = -Wall -g -fexceptions $(am__append_2)
++AM_CFLAGS = -Wall -fexceptions $(am__append_2)
+ @LIBAT_BUILD_VERSIONED_SHLIB_FALSE@libffi_version_script =
+ @LIBAT_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_script = -Wl,--version-script,libffi.map
+ @LIBAT_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libffi_version_script = -Wl,-M,libffi.map-sun
+--- gcc-4.7.1/libgcc/Makefile.in.orig 2012-05-24 16:59:38.000000000 +0200
++++ gcc-4.7.1/libgcc/Makefile.in 2012-07-12 18:28:59.042405393 +0200
+@@ -221,7 +221,7 @@
+
+ # Options to use when compiling libgcc2.a.
+ #
+-LIBGCC2_DEBUG_CFLAGS = -g
++LIBGCC2_DEBUG_CFLAGS =
+ LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
+ $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
+ -fbuilding-libgcc -fno-stack-protector \
+--- gcc-4.7.1/libstdc++-v3/include/Makefile.am.orig 2012-03-23 12:00:54.000000000 +0100
++++ gcc-4.7.1/libstdc++-v3/include/Makefile.am 2012-07-12 18:31:29.102399096 +0200
+@@ -1154,22 +1154,22 @@
+ # Build two precompiled C++ includes, stdc++.h.gch/*.gch
+ ${pch1a_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
+ -mkdir -p ${pch1_output_builddir}
+- $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g -std=gnu++0x ${pch1_source} \
++ $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -std=gnu++0x ${pch1_source} \
+ -o $@
+
+ ${pch1b_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
+ -mkdir -p ${pch1_output_builddir}
+- $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch1_source} -o $@
++ $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 ${pch1_source} -o $@
+
+ # Build a precompiled TR1 include, stdtr1c++.h.gch/O2.gch
+ ${pch2_output}: ${pch2_source} ${pch1_output}
+ -mkdir -p ${pch2_output_builddir}
+- $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch2_source} -o $@
++ $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 ${pch2_source} -o $@
+
+ # Build a precompiled extension include, extc++.h.gch/O2.gch
+ ${pch3_output}: ${pch3_source} ${pch2_output}
+ -mkdir -p ${pch3_output_builddir}
+- $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch3_source} -o $@
++ $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 ${pch3_source} -o $@
+
+ # For robustness sake (in light of junk files or in-source
+ # configuration), copy from the build or source tree to the install
+--- gcc-4.7.1/libstdc++-v3/include/Makefile.in.orig 2012-03-23 12:00:54.000000000 +0100
++++ gcc-4.7.1/libstdc++-v3/include/Makefile.in 2012-07-12 18:31:43.922398474 +0200
+@@ -1543,22 +1543,22 @@
+ # Build two precompiled C++ includes, stdc++.h.gch/*.gch
+ ${pch1a_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
+ -mkdir -p ${pch1_output_builddir}
+- $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g -std=gnu++0x ${pch1_source} \
++ $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -std=gnu++0x ${pch1_source} \
+ -o $@
---- a/libjava/Makefile.am 2004-09-10 10:22:58.000000000 +0200
-+++ b/libjava/Makefile.am 2004-09-26 11:46:24.041082768 +0200
-@@ -179,7 +179,7 @@
- ## Extra CFLAGS used for JNI C sources shared with GNU Classpath.
- PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
+ ${pch1b_output}: ${allstamped} ${host_builddir}/c++config.h ${pch1_source}
+ -mkdir -p ${pch1_output_builddir}
+- $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch1_source} -o $@
++ $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 ${pch1_source} -o $@
+
+ # Build a precompiled TR1 include, stdtr1c++.h.gch/O2.gch
+ ${pch2_output}: ${pch2_source} ${pch1_output}
+ -mkdir -p ${pch2_output_builddir}
+- $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch2_source} -o $@
++ $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 ${pch2_source} -o $@
+
+ # Build a precompiled extension include, extc++.h.gch/O2.gch
+ ${pch3_output}: ${pch3_source} ${pch2_output}
+ -mkdir -p ${pch3_output_builddir}
+- $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 -g ${pch3_source} -o $@
++ $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) -O2 ${pch3_source} -o $@
+
+ # For robustness sake (in light of junk files or in-source
+ # configuration), copy from the build or source tree to the install
+--- gcc-4.7.1/Makefile.in.orig 2012-05-16 17:54:24.000000000 +0200
++++ gcc-4.7.1/Makefile.in 2012-07-12 18:32:07.075730835 +0200
+@@ -364,7 +364,7 @@
+
+ # Flags to pass to stage2 and later makes. They are defined
+ # here so that they can be overridden by Makefile fragments.
+-BOOT_CFLAGS= -g -O2
++BOOT_CFLAGS= -O2
+ BOOT_LDFLAGS=
+ BOOT_ADAFLAGS=-gnatpg -gnata
--JCFLAGS = -g
-+JCFLAGS =
- JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
+@@ -618,8 +618,8 @@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARG
+ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+ LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@
+-GOCFLAGS_FOR_TARGET = -O2 -g
+-GDCFLAGS_FOR_TARGET = -O2 -g
++GOCFLAGS_FOR_TARGET = -O2
++GDCFLAGS_FOR_TARGET = -O2
- LIBFFIINCS = @LIBFFIINCS@
---- a/libjava/Makefile.in 2004-09-19 19:47:04.000000000 +0200
-+++ b/libjava/Makefile.in 2004-09-26 11:47:02.431246576 +0200
-@@ -4167,7 +4167,7 @@
- @USING_GCC_FALSE@AM_CFLAGS = @LIBGCJ_CFLAGS@
- @USING_GCC_TRUE@AM_CFLAGS = @LIBGCJ_CFLAGS@ $(WARNINGS)
- PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
--JCFLAGS = -g
-+JCFLAGS =
- JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
- AM_CPPFLAGS = -I$(top_srcdir) -Iinclude -I$(top_srcdir)/include \
- $(GCINCS) $(THREADINCS) $(INCLTDL) \
+ FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
+ SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@