[En-Nut-Discussion] PATCH: Fix C++ flags for GCC 4.0
Bernardo Innocenti
bernie at develer.com
Thu Mar 17 06:29:51 CET 2005
Hello,
GCC 4.0 doesn't like -Wstrict-prototypes in C++ mode.
The following patch fixes the problem by introducing
C++ specific flags.
Index: Makedefs.unix-gcc
===================================================================
RCS file: /cvs/bakeoven/bakeoven/Makedefs.unix-gcc,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 Makedefs.unix-gcc
--- Makedefs.unix-gcc 17 Mar 2005 04:00:25 -0000 1.1.1.1
+++ Makedefs.unix-gcc 17 Mar 2005 05:14:10 -0000
@@ -107,6 +107,7 @@ RANLIB = $(TRGT)ranlib
MCFLAGS = -mmcu=$(MCU)
CPFLAGS = -g -Os -Wall -Werror -Wstrict-prototypes $(DEFS)
#CPFLAGS = -g $(MCFLAGS) -O1 -Wall -Wstrict-prototypes $(DEFS)
+CXXFLAGS = -g -Os -Wall -Werror $(DEFS)
LDFLAGS = -L$(LIBDIR) $(LIBS)
ARFLAGS = rsv
ASFLAGS = -Wa,-amhls=$(<:.S=.lst) $(DEFS)
Index: Makerules.unix-gcc
===================================================================
RCS file: /cvs/bakeoven/bakeoven/Makerules.unix-gcc,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 Makerules.unix-gcc
--- Makerules.unix-gcc 17 Mar 2005 04:38:14 -0000 1.2
+++ Makerules.unix-gcc 17 Mar 2005 05:14:32 -0000
@@ -57,7 +57,7 @@
$(CC) -c $(CPFLAGS) -I$(MODINC) -I$(INCDIR) $< -o $@
%.o : %.cc
- $(CXX) -c $(CPFLAGS) -I$(MODINC) -I$(INCDIR) $< -o $@
+ $(CXX) -c $(CXXFLAGS) -I$(MODINC) -I$(INCDIR) $< -o $@
%s : %c
$(CC) -S $(CPFLAGS) -I$(MODINC) -I$(INCDIR) $< -o $@
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/
More information about the En-Nut-Discussion
mailing list