diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-07-31 14:29:48 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-08-08 16:07:26 +1000 |
commit | 09e08414c6ac42837428f4b046afcec82cf5a197 (patch) | |
tree | 63a305159efcf74d35451721ba46b878fa9c93dd /Makefile.main | |
parent | 6a54d6dad7320e348a23b2e5df29b407810e105f (diff) | |
download | skiboot-09e08414c6ac42837428f4b046afcec82cf5a197.zip skiboot-09e08414c6ac42837428f4b046afcec82cf5a197.tar.gz skiboot-09e08414c6ac42837428f4b046afcec82cf5a197.tar.bz2 |
Build with -ffreestanding so we can override printf
It turns out that GCC will use a builtin printf implementation that
directly wraps vfprintf (or something), so when I tried to do my
neat trick of overriding printf() with a call to vprlog() adding the
timebase and default log level to the log message, it wouldn't work as
GCC was being helpful.
This change to compiler options will mean that other places where GCC
is being helpful and using builtins rather than our implementations will
go away, potentially helping/hurting us.
We probably want to build with -ffreestanding anyway though.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'Makefile.main')
-rw-r--r-- | Makefile.main | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile.main b/Makefile.main index 884c0c2..7810058 100644 --- a/Makefile.main +++ b/Makefile.main @@ -45,10 +45,10 @@ endif CPPFLAGS += -D__SKIBOOT__ -nostdinc CPPFLAGS += -isystem $(shell $(CC) -print-file-name=include) CPPFLAGS += -DBITS_PER_LONG=64 -m64 -DHAVE_BIG_ENDIAN -# Ideally we want -ffreestanding and remove our copy of stdint.h +# We might want to remove our copy of stdint.h # but that means uint64_t becomes an ulong instead of an ullong -# causing all our printf's to warn ... so leave that alone for now -#CPPFLAGS += -ffreestanding +# causing all our printf's to warn +CPPFLAGS += -ffreestanding CFLAGS := -fno-strict-aliasing -fno-stack-protector -pie CFLAGS += $(CWARNS) $(OPTS) $(DBG) |