# HG changeset patch # User Rich Burridge # Date 1387303522 28800 # Node ID 0833aec637f6f1cae0f95f6714589f87bfcd6033 # Parent f0ef141ec2b97278d9b7c60465da358d39df1b41 17389792 clisp fails to build on sparc with gcc4.7 diff -r f0ef141ec2b9 -r 0833aec637f6 components/clisp/Makefile --- a/components/clisp/Makefile Tue Dec 17 08:58:59 2013 -0700 +++ b/components/clisp/Makefile Tue Dec 17 10:05:22 2013 -0800 @@ -46,7 +46,24 @@ COMPONENT_PRE_CONFIGURE_ACTION = \ ($(CLONEY) $(SOURCE_DIR) $(@D)) -COMPILER= gcc3 +# There is a compiler optimization problem when using -O2 on io.c and +# lisparit.c on SPARC with the gcc 4.7.X compilers. Remove the '-O2" +# just for those two source files. +COMPONENT_POST_CONFIGURE_ACTION.sparc = \ + $(GSED) -i -e '/^CFLAGS/aCFLAGSNOOPT = \$$\(CFLAGS:-O2=)' \ + -e 's/(CFLAGS) -c io.c/(CFLAGSNOOPT) -c io.c/' \ + -e 's/(CFLAGS) -c lisparit.c/(CFLAGSNOOPT) -c lisparit.c/' \ + $(BUILD_DIR_32)/Makefile + +COMPONENT_POST_CONFIGURE_ACTION = \ + $(COMPONENT_POST_CONFIGURE_ACTION.$(MACH)) + +COMPILER= gcc +# Parfait doesn't work with the GNU 4.7 compilers yet. +ifeq ($(strip $(PARFAIT_BUILD)),yes) +COMPILER = gcc3 +endif + PATCH_LEVEL= 0 # SHELLOPTS appears to cause clisp's configure script to fail while @@ -60,6 +77,7 @@ CONFIGURE_OPTIONS = CC="$(CC) -DNO_GENERATIONAL_GC -DNO_ASM" endif CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)" +CONFIGURE_OPTIONS += CFLAGS= CONFIGURE_OPTIONS += --prefix=$(CONFIGURE_PREFIX) CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR) CONFIGURE_OPTIONS += --bindir=$(CONFIGURE_BINDIR.$(BITS))