diff options
author | Michael Brown <mcb30@etherboot.org> | 2009-03-10 17:50:01 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2009-03-26 07:27:19 +0000 |
commit | 1c67623e37dada045e9b5d1f5e19b414cc79c3e3 (patch) | |
tree | 6baaac3371a85232dbfe0faa5e7530eb76fa7413 /src/arch/i386/Makefile | |
parent | 16aa435567ad6a82669864ba9c47ee534a03c296 (diff) | |
download | ipxe-1c67623e37dada045e9b5d1f5e19b414cc79c3e3.tar.gz |
[build] Enable building with the Intel C compiler (icc)
Diffstat (limited to 'src/arch/i386/Makefile')
-rw-r--r-- | src/arch/i386/Makefile | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/arch/i386/Makefile b/src/arch/i386/Makefile index 1392bbac7..ca8ba1b25 100644 --- a/src/arch/i386/Makefile +++ b/src/arch/i386/Makefile @@ -4,22 +4,33 @@ CFLAGS += -march=i386 # Code size reduction. # -CFLAGS += -fstrength-reduce -fomit-frame-pointer +CFLAGS += -fomit-frame-pointer + +# Code size reduction. +# +ifeq ($(CCTYPE),gcc) +CFLAGS += -fstrength-reduce +endif # Code size reduction. gcc3 needs a different syntax to gcc2 if you # want to avoid spurious warnings. # +ifeq ($(CCTYPE),gcc) GCC_VERSION := $(subst ., ,$(shell $(CC) -dumpversion)) GCC_MAJOR := $(firstword $(GCC_VERSION)) ifeq ($(GCC_MAJOR),2) CFLAGS += -malign-jumps=1 -malign-loops=1 -malign-functions=1 else CFLAGS += -falign-jumps=1 -falign-loops=1 -falign-functions=1 -endif +endif # gcc2 +endif # gcc -# Code size reduction. This is almost always a win. The kernel uses it, too. +# Code size reduction. This is almost always a win. The kernel uses +# it, too. # +ifeq ($(CCTYPE),gcc) CFLAGS += -mpreferred-stack-boundary=2 +endif # Code size reduction. Use regparm for all functions - C functions # called from assembly (or vice versa) need __asmcall now @@ -27,7 +38,9 @@ CFLAGS += -mpreferred-stack-boundary=2 CFLAGS += -mregparm=3 # Code size reduction. Use -mrtd (same __asmcall requirements as above) +ifeq ($(CCTYPE),gcc) CFLAGS += -mrtd +endif # Code size reduction. This is the logical complement to -mregparm=3. # It doesn't currently buy us anything, but if anything ever tries to |