aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-06-10 22:44:06 -0400
committerKevin O'Connor <kevin@koconnor.net>2009-06-10 22:44:06 -0400
commit942d495dcd12801187076d12e5f7409e8a8aa661 (patch)
treec3853d4ab5409811752c1af6b0292d4e78165f9b /Makefile
parentc0693941fdb5118164a8161316fdf8e9ebb499d2 (diff)
downloadseabios-942d495dcd12801187076d12e5f7409e8a8aa661.tar.gz
Add support for gcc v3.x compilers.
Suppress __attribute__((externally_visible)) when no -fwhole-program Add switch hack for compilers without -fno-jump-tables Define memcpy() function (for compilers without -minline-all-stringops). Define call16_simpint as a macro (a param needs to be inlined). Make sure s3_resume is only defined in 32bit mode.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ff594e7c..8cb66259 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,8 @@ cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
# Default compiler flags
COMMONCFLAGS = -Wall -Os -MD -m32 -march=i386 -mregparm=3 \
-mpreferred-stack-boundary=2 -mrtd -freg-struct-return \
- -ffreestanding -fwhole-program -fomit-frame-pointer \
+ $(call cc-option,$(CC),-fwhole-program -DWHOLE_PROGRAM,) \
+ -ffreestanding -fomit-frame-pointer \
-fno-delete-null-pointer-checks -Wno-strict-aliasing \
-ffunction-sections -fdata-sections \
-minline-all-stringops
@@ -31,7 +32,8 @@ COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
override CFLAGS = $(COMMONCFLAGS) -g -DMODE16=0
-CFLAGS16INC = $(COMMONCFLAGS) -DMODE16=1 -fno-jump-tables -fno-defer-pop \
+CFLAGS16INC = $(COMMONCFLAGS) -DMODE16=1 -fno-defer-pop \
+ $(call cc-option,$(CC),-fno-jump-tables,-DMANUAL_NO_JUMP_TABLE) \
$(call cc-option,$(CC),-fno-tree-switch-conversion,) \
$(call cc-option,$(CC),--param large-stack-frame=4,)
CFLAGS16 = $(CFLAGS16INC) -g