ports/devel/avr-gcc-42/files/patch-bug25672
Joerg Wunsch 48c342e224 After upgrading devel/avr-gcc to GCC 4.3.x, keep a GCC 4.2.x version
here as it frequently produces more compact code (but supports less
target MCU types).
2009-06-17 19:33:59 +00:00

13 lines
671 B
Text

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25672
--- Makefile.in.orig Thu Dec 15 19:02:02 2005
+++ Makefile.in Thu Apr 27 03:58:59 2006
@@ -329,7 +329,7 @@
# CFLAGS will be just -g. We want to ensure that TARGET libraries
# (which we know are built with gcc) are built with optimizations so
# prepend -O2 when setting CFLAGS_FOR_TARGET.
-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+CFLAGS_FOR_TARGET = -O2 $(filter-out -march=% -mcpu=%,$(CFLAGS)) $(SYSROOT_CFLAGS_FOR_TARGET)
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)