[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86 firmware: Consolidate firmware common build rules.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1207129347 -3600
# Node ID fcc4b7c304d97c977ff630caa9eca8e637a54455
# Parent  960c33a6bd598dd6b6100c0ebacc6773f6f96f03
x86 firmware: Consolidate firmware common build rules.

Also avoid overriding global optimisation default (-O1, -O2, etc.)

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/firmware/Rules.mk                       |   15 +++++++++++++++
 tools/firmware/extboot/Makefile               |   14 +++-----------
 tools/firmware/hvmloader/Makefile             |   12 ++----------
 tools/firmware/hvmloader/acpi/Makefile        |   12 ++----------
 tools/firmware/rombios/32bit/Makefile         |    8 +-------
 tools/firmware/rombios/32bit/tcgbios/Makefile |    8 +-------
 tools/tests/blowfish.mk                       |    8 ++++----
 7 files changed, 28 insertions(+), 49 deletions(-)

diff -r 960c33a6bd59 -r fcc4b7c304d9 tools/firmware/Rules.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/Rules.mk   Wed Apr 02 10:42:27 2008 +0100
@@ -0,0 +1,15 @@
+# Firmware is a 32-bit target
+override XEN_TARGET_ARCH = x86_32
+
+# User-supplied CFLAGS are not useful here.
+CFLAGS :=
+
+include $(XEN_ROOT)/tools/Rules.mk
+
+# Disable PIE/SSP if GCC supports them. They can break us.
+CFLAGS += $(call cc-option,$(CC),-nopie,)
+CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
+CFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
+
+# Extra CFLAGS suitable for an embedded type of environment.
+CFLAGS += -fno-builtin -msoft-float
diff -r 960c33a6bd59 -r fcc4b7c304d9 tools/firmware/extboot/Makefile
--- a/tools/firmware/extboot/Makefile   Wed Apr 02 10:28:56 2008 +0100
+++ b/tools/firmware/extboot/Makefile   Wed Apr 02 10:42:27 2008 +0100
@@ -1,15 +1,7 @@
+XEN_ROOT = ../../..
+include $(XEN_ROOT)/tools/firmware/Rules.mk
 
-override XEN_TARGET_ARCH = x86_32
-XEN_ROOT = ../../..
-CFLAGS := -I$(XEN_ROOT)/tools/libxc -I.
-include $(XEN_ROOT)/tools/Rules.mk
-
-# Disable PIE/SSP if GCC supports them. They can break us.
-CFLAGS  += $(call cc-option,$(CC),-nopie,)
-CFLAGS  += $(call cc-option,$(CC),-fno-stack-protector,)
-CFLAGS  += $(call cc-option,$(CC),-fno-stack-protector-all,)
-
-CFLAGS  += -fno-builtin -O2 -msoft-float
+CFLAGS += -I$(XEN_ROOT)/tools/libxc -I.
 
 .PHONY: all
 all: extboot.bin
diff -r 960c33a6bd59 -r fcc4b7c304d9 tools/firmware/hvmloader/Makefile
--- a/tools/firmware/hvmloader/Makefile Wed Apr 02 10:28:56 2008 +0100
+++ b/tools/firmware/hvmloader/Makefile Wed Apr 02 10:42:27 2008 +0100
@@ -18,23 +18,15 @@
 # Place - Suite 330, Boston, MA 02111-1307 USA.
 #
 
-override XEN_TARGET_ARCH = x86_32
 XEN_ROOT = ../../..
-CFLAGS :=
-include $(XEN_ROOT)/tools/Rules.mk
+include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 SUBDIRS := acpi
 
 # The HVM loader is started in 32-bit mode at the address below:
 LOADADDR = 0x100000
 
-# Disable PIE/SSP if GCC supports them. They can break us.
-CFLAGS  += $(call cc-option,$(CC),-nopie,)
-CFLAGS  += $(call cc-option,$(CC),-fno-stack-protector,)
-CFLAGS  += $(call cc-option,$(CC),-fno-stack-protector-all,)
-
-CFLAGS  += -fno-builtin -O2 -msoft-float
-CFLAGS  += $(CFLAGS_include) -I.
+CFLAGS += $(CFLAGS_include) -I.
 
 SRCS = hvmloader.c mp_tables.c util.c smbios.c 32bitbios_support.c
 OBJS = $(patsubst %.c,%.o,$(SRCS))
diff -r 960c33a6bd59 -r fcc4b7c304d9 tools/firmware/hvmloader/acpi/Makefile
--- a/tools/firmware/hvmloader/acpi/Makefile    Wed Apr 02 10:28:56 2008 +0100
+++ b/tools/firmware/hvmloader/acpi/Makefile    Wed Apr 02 10:42:27 2008 +0100
@@ -15,10 +15,8 @@
 # Place - Suite 330, Boston, MA 02111-1307 USA.
 #
 
-override XEN_TARGET_ARCH = x86_32
 XEN_ROOT = ../../../..
-CFLAGS :=
-include $(XEN_ROOT)/tools/Rules.mk
+include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 C_SRC = build.c dsdt.c static_tables.c
 H_SRC = $(wildcard *.h)
@@ -27,13 +25,7 @@ IASL_VER = acpica-unix-20060707
 IASL_VER = acpica-unix-20060707
 IASL_URL = 
http://developer.intel.com/technology/iapc/acpi/downloads/$(IASL_VER).tar.gz
 
-# Disable PIE/SSP if GCC supports them. They can break us.
-CFLAGS  += $(call cc-option,$(CC),-nopie,)
-CFLAGS  += $(call cc-option,$(CC),-fno-stack-protector,)
-CFLAGS  += $(call cc-option,$(CC),-fno-stack-protector-all,)
-
-CFLAGS  += -fno-builtin -O2 -msoft-float
-CFLAGS  += -I. -I.. $(CFLAGS_include)
+CFLAGS += -I. -I.. $(CFLAGS_include)
 
 vpath iasl $(PATH)
 all: acpi.a
diff -r 960c33a6bd59 -r fcc4b7c304d9 tools/firmware/rombios/32bit/Makefile
--- a/tools/firmware/rombios/32bit/Makefile     Wed Apr 02 10:28:56 2008 +0100
+++ b/tools/firmware/rombios/32bit/Makefile     Wed Apr 02 10:42:27 2008 +0100
@@ -1,16 +1,10 @@
-
-override XEN_TARGET_ARCH = x86_32
 XEN_ROOT = ../../../..
-CFLAGS :=
-include $(XEN_ROOT)/tools/Rules.mk
+include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 SOURCES = util.c
 TARGET = 32bitbios_flat.h
 
-CFLAGS += -fno-builtin -O2 -msoft-float -nostdlib
 CFLAGS += -I../ -DGCC_PROTOS
-CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
-CFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
 
 SUBDIRS = tcgbios
 
diff -r 960c33a6bd59 -r fcc4b7c304d9 
tools/firmware/rombios/32bit/tcgbios/Makefile
--- a/tools/firmware/rombios/32bit/tcgbios/Makefile     Wed Apr 02 10:28:56 
2008 +0100
+++ b/tools/firmware/rombios/32bit/tcgbios/Makefile     Wed Apr 02 10:42:27 
2008 +0100
@@ -1,16 +1,10 @@
-
-override XEN_TARGET_ARCH = x86_32
 XEN_ROOT = ../../../../..
-CFLAGS :=
-include $(XEN_ROOT)/tools/Rules.mk
+include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 TARGET  = tcgbiosext.o
 FILES   = tcgbios tpm_drivers
 OBJECTS = $(foreach f,$(FILES),$(f).o)
 
-CFLAGS += -fno-builtin -O2 -msoft-float -nostdlib
-CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
-CFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
 CFLAGS += -I../ -I../../ -DGCC_PROTOS
 
 .PHONY: all clean
diff -r 960c33a6bd59 -r fcc4b7c304d9 tools/tests/blowfish.mk
--- a/tools/tests/blowfish.mk   Wed Apr 02 10:28:56 2008 +0100
+++ b/tools/tests/blowfish.mk   Wed Apr 02 10:42:27 2008 +0100
@@ -5,11 +5,11 @@ include $(XEN_ROOT)/tools/Rules.mk
 include $(XEN_ROOT)/tools/Rules.mk
 
 # Disable PIE/SSP if GCC supports them. They can break us.
-CFLAGS  += $(call cc-option,$(CC),-nopie,)
-CFLAGS  += $(call cc-option,$(CC),-fno-stack-protector,)
-CFLAGS  += $(call cc-option,$(CC),-fno-stack-protector-all,)
+CFLAGS += $(call cc-option,$(CC),-nopie,)
+CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
+CFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
 
-CFLAGS  += -fno-builtin -O2 -msoft-float
+CFLAGS += -fno-builtin -msoft-float
 
 .PHONY: all
 all: blowfish.bin

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.