]> xenbits.xensource.com Git - seabios.git/commitdiff
Force functions marked as inline to always be inlined.
authorKevin O'Connor <kevin@koconnor.net>
Tue, 11 Mar 2008 23:32:38 +0000 (19:32 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Tue, 11 Mar 2008 23:32:38 +0000 (19:32 -0400)
Inline alters stack usage, so don't let gcc uninline.
Also, gcc seems to include multiple copies of uninlined functions when
using -combine.
With inlining forced on, the no null check optimization causes
problems, so disable it.

Makefile
src/types.h

index 6938bef84ef1680199b0fcc86df750ff930cc23e..7415f6afc64988220393b49b843ca250c5c8daf8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,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=2 \
-               -ffreestanding -fwhole-program -fomit-frame-pointer
+               -ffreestanding -fwhole-program -fomit-frame-pointer \
+               -fno-delete-null-pointer-checks
 COMMONCFLAGS += $(call cc-option,$(CC),-nopie,)
 COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
 COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
index b1bf2ef7ab7eb6485aba0d8a6861ee67671a2b24..0a7e2f78b71980818441e3b6eb7fdf0b124aff8f 100644 (file)
@@ -34,6 +34,8 @@ typedef u32 size_t;
 
 #define barrier() __asm__ __volatile__("": : :"memory")
 
+#define inline inline __attribute__((always_inline))
+
 #define __stringify_1(x)        #x
 #define __stringify(x)          __stringify_1(x)