aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 19 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index d0779c5c0..91d4bd1c4 100644
--- a/Makefile
+++ b/Makefile
@@ -33,10 +33,11 @@ ARCH=`uname -m | sed -e 's/i.86/i386/' | sed -e 's/sparc.*/sparc/'`
33 33
34GCCMAJVERSION=$(shell $(CC) --version | sed -n "s/^\([^\.]*\).*/\1/p" ) 34GCCMAJVERSION=$(shell $(CC) --version | sed -n "s/^\([^\.]*\).*/\1/p" )
35GCCMINVERSION=$(shell $(CC) --version | sed -n "s/^[^\.]*\.\([^\.]*\)[\.].*/\1/p" ) 35GCCMINVERSION=$(shell $(CC) --version | sed -n "s/^[^\.]*\.\([^\.]*\)[\.].*/\1/p" )
36GCCEGCS=$(shell $(CC) --version | sed -n "s/.*\(egcs\).*/\1/p" )
36 37
37GCCSUPPORTSOPTSIZE=$(shell \ 38GCCSUPPORTSOPTSIZE=$(shell \
38if ( test $(GCCMAJVERSION) -eq 2 ) ; then \ 39if ( test $(GCCMAJVERSION) -eq 2 ) ; then \
39 if ( test $(GCCMINVERSION) -ge 91 ) ; then \ 40 if ( test $(GCCMINVERSION) -ge 66 ) ; then \
40 echo "true"; \ 41 echo "true"; \
41 else \ 42 else \
42 echo "false"; \ 43 echo "false"; \
@@ -49,11 +50,26 @@ else \
49 fi; \ 50 fi; \
50fi; ) 51fi; )
51 52
53GCCISEGCS=$(shell \
54if ( test "x$(GCCEGCS)" == "xegcs" ) ; then \
55 echo "true"; \
56 else \
57 echo "false"; \
58 fi; )
59
60EGCSEXTREMEFLAGS = -m386 -mcpu=i386 -march=i386 -malign-jumps=1 -malign-loops=1 -malign-functions=1
61GCCEXTREMEFLAGS = -m386 -malign-jumps=1 -malign-loops=1 -malign-functions=1
62
63ifeq ($(GCCISEGCS), true)
64 EXTREMEFLAGS = $(EGCSEXTREMEFLAGS)
65else
66 EXTREMEFLAGS = $(GCCEXTREMEFLAGS)
67endif
52 68
53ifeq ($(GCCSUPPORTSOPTSIZE), true) 69ifeq ($(GCCSUPPORTSOPTSIZE), true)
54 OPTIMIZATION=-Os 70 OPTIMIZATION=-Os $(EXTREMEFLAGS)
55else 71else
56 OPTIMIZATION=-O2 72 OPTIMIZATION=-O2 $(EXTREMEFLAGS)
57endif 73endif
58 74
59# -D_GNU_SOURCE is needed because environ is used in init.c 75# -D_GNU_SOURCE is needed because environ is used in init.c