From c624f5ad370dc1d7f028261bdcc5e83f0fbea7eb Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sat, 5 May 2007 20:02:19 +0000 Subject: [PATCH] Document why CFLAGS is set in that very location, as that's non-obvious and could be easily missed. Also, some minor cosmetics. Signed-off-by: Uwe Hermann Acked-by: Uwe Hermann git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@312 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3eead7a118..4afed2fe99 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ CFLAGS := -Os -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -Werror-implicit-function-declaration -Wstrict-aliasing \ -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer \ -mpreferred-stack-boundary=2 -mregparm=3 -pipe -# FIXME: Does stack boundary or regparm break the code on real hw? +# FIXME: Does stack boundary or regparm break the code on real hardware? HOSTCC := gcc HOSTCXX := g++ @@ -48,13 +48,11 @@ HOSTCFLAGS := -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \ -Wno-unused -Wno-sign-compare LEX := flex - LYX := lyx DOXYGEN := doxygen - DOXYGEN_OUTPUT_DIR := doxygen -# make is silent per default. make V=1 will show all compiler calls. +# Make is silent per default, but 'make V=1' will show all compiler calls. ifneq ($(V),1) Q := @ endif @@ -102,6 +100,9 @@ OBJCOPY := $(OBJCOPY_$(ARCH)) CPPFLAGS := $(LINUXBIOSINCLUDE) CFLAGS += $(LINUXBIOSINCLUDE) +# Note: This _must_ come after 'CC' is set for the second time in this +# Makefile (see above), otherwise the build would break if 'gcc' isn't +# the compiler actually used for the build (e.g. on cross compiler setups). CFLAGS += -nostdinc -isystem `$(CC) -print-file-name=include` include lib/Makefile @@ -145,7 +146,6 @@ prepare2: $(Q)printf "#define LINUXBIOS_COMPILE_HOST \"$(shell hostname)\"\n" >> $(obj)/build.h $(Q)printf "#define LINUXBIOS_COMPILE_DOMAIN \"$(shell which dnsdomainname 1>/dev/null && dnsdomainname || domainname)\"\n" >> $(obj)/build.h - clean: $(Q)printf " CLEAN $(subst $(shell pwd)/,,$(obj))\n" $(Q)rm -rf $(obj)