diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-06-10 22:44:06 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-06-10 22:44:06 -0400 |
commit | 942d495dcd12801187076d12e5f7409e8a8aa661 (patch) | |
tree | c3853d4ab5409811752c1af6b0292d4e78165f9b /Makefile | |
parent | c0693941fdb5118164a8161316fdf8e9ebb499d2 (diff) | |
download | seabios-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-- | Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |