# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1171549101 0
# Node ID 236687fb42d79b0dd408364eae4c8624c33010d8
# Parent 61de36b8be81a30bb10750e1ae6cde585fbc96f6
minios: build system cleanups.
- Added ARCH_LDFLAGS for architecture specific LDFLAGS
- Fixed build dependencies after changing makerule files
- Fixed ARCH_CFLAGS for 64bit guest, added ARCH_ASFLAGS
- Couple of variable renames
Signed-off-by: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Grzegorz Milos <gm281@xxxxxxxxx>
---
extras/mini-os/Makefile | 5 -----
extras/mini-os/arch/x86/Makefile | 5 +----
extras/mini-os/arch/x86/arch.mk | 5 +++--
extras/mini-os/minios.mk | 17 ++++++++++++-----
4 files changed, 16 insertions(+), 16 deletions(-)
diff -r 61de36b8be81 -r 236687fb42d7 extras/mini-os/Makefile
--- a/extras/mini-os/Makefile Thu Feb 15 14:17:00 2007 +0000
+++ b/extras/mini-os/Makefile Thu Feb 15 14:18:21 2007 +0000
@@ -44,10 +44,6 @@ ARCH_LINKS =
# This can be overwritten from arch specific rules.
EXTRA_INC =
-# Special build dependencies.
-# Build all after touching this/these file(s) (see minios.mk)
-SPEC_DEPENDS = minios.mk
-
# Include the architecture family's special makerules.
# This must be before include minios.mk!
include $(TARGET_ARCH_DIR)/arch.mk
@@ -57,7 +53,6 @@ include minios.mk
# Define some default flags for linking.
LDLIBS :=
-LDFLAGS :=
LDARCHLIB := -L$(TARGET_ARCH_DIR) -l$(ARCH_LIB_NAME)
LDFLAGS_FINAL := -N -T $(TARGET_ARCH_DIR)/minios-$(TARGET_ARCH).lds
diff -r 61de36b8be81 -r 236687fb42d7 extras/mini-os/arch/x86/Makefile
--- a/extras/mini-os/arch/x86/Makefile Thu Feb 15 14:17:00 2007 +0000
+++ b/extras/mini-os/arch/x86/Makefile Thu Feb 15 14:18:21 2007 +0000
@@ -2,9 +2,6 @@
# x86 architecture specific makefiles.
# It's is used for x86_32, x86_32y and x86_64
#
-
-# Rebuild all after touching this/these extra file(s) (see mini-os.mk)
-SPEC_DEP = arch.mk
# include arch.mk has to be before mini-os.mk!
include arch.mk
@@ -25,5 +22,5 @@ all: $(ARCH_LIB)
$(AR) rv $(ARCH_LIB) $(ARCH_OBJS)
clean:
- rm -f $(ARCH_LIB) $(ARCH_OBJS)
+ rm -f $(ARCH_LIB) $(ARCH_OBJS) $(HEAD_ARCH_OBJ)
diff -r 61de36b8be81 -r 236687fb42d7 extras/mini-os/arch/x86/arch.mk
--- a/extras/mini-os/arch/x86/arch.mk Thu Feb 15 14:17:00 2007 +0000
+++ b/extras/mini-os/arch/x86/arch.mk Thu Feb 15 14:18:21 2007 +0000
@@ -6,6 +6,7 @@ ifeq ($(TARGET_ARCH),x86_32)
ifeq ($(TARGET_ARCH),x86_32)
ARCH_CFLAGS := -m32 -march=i686
ARCH_LDFLAGS := -m elf_i386
+ARCH_ASFLAGS := -m32
EXTRA_INC += $(TARGET_ARCH_FAM)/$(TARGET_ARCH)
EXTRA_SRC += arch/$(EXTRA_INC)
endif
@@ -19,10 +20,10 @@ endif
ifeq ($(TARGET_ARCH),x86_64)
ARCH_CFLAGS := -m64 -mno-red-zone -fpic -fno-reorder-blocks
-ARCH_CFLAGS := -fno-asynchronous-unwind-tables
+ARCH_CFLAGS += -fno-asynchronous-unwind-tables
+ARCH_ASFLAGS := -m64
ARCH_LDFLAGS := -m elf_x86_64
EXTRA_INC += $(TARGET_ARCH_FAM)/$(TARGET_ARCH)
EXTRA_SRC += arch/$(EXTRA_INC)
endif
-
diff -r 61de36b8be81 -r 236687fb42d7 extras/mini-os/minios.mk
--- a/extras/mini-os/minios.mk Thu Feb 15 14:17:00 2007 +0000
+++ b/extras/mini-os/minios.mk Thu Feb 15 14:18:21 2007 +0000
@@ -11,6 +11,7 @@ DEF_CFLAGS += -D__XEN_INTERFACE_VERSION_
DEF_CFLAGS += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
DEF_ASFLAGS = -D__ASSEMBLY__
+DEF_LDFLAGS =
ifeq ($(debug),y)
DEF_CFLAGS += -g
@@ -23,21 +24,27 @@ endif
# ARCH_... flags may be defined in arch/$(TARGET_ARCH_FAM/rules.mk
CFLAGS := $(DEF_CFLAGS) $(ARCH_CFLAGS)
ASFLAGS := $(DEF_ASFLAGS) $(ARCH_ASFLAGS)
+LDFLAGS := $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
# The path pointing to the architecture specific header files.
-ARCH_SPEC_INC := $(MINI-OS_ROOT)/include/$(TARGET_ARCH_FAM)
+ARCH_INC := $(MINI-OS_ROOT)/include/$(TARGET_ARCH_FAM)
+
+# Special build dependencies.
+# Rebuild all after touching this/these file(s)
+EXTRA_DEPS = $(MINI-OS_ROOT)/minios.mk \
+ $(MINI-OS_ROOT)/$(TARGET_ARCH_DIR)/arch.mk
# Find all header files for checking dependencies.
HDRS := $(wildcard $(MINI-OS_ROOT)/include/*.h)
HDRS += $(wildcard $(MINI-OS_ROOT)/include/xen/*.h)
-HDRS += $(wildcard $(ARCH_SPEC_INC)/*.h)
+HDRS += $(wildcard $(ARCH_INC)/*.h)
# For special wanted header directories.
extra_heads := $(foreach dir,$(EXTRA_INC),$(wildcard $(dir)/*.h))
HDRS += $(extra_heads)
# Add the special header directories to the include paths.
extra_incl := $(foreach dir,$(EXTRA_INC),-I$(MINI-OS_ROOT)/include/$(dir))
-override CPPFLAGS := -I$(MINI-OS_ROOT)/include $(CPPFLAGS) -I$(ARCH_SPEC_INC)
$(extra_incl)
+override CPPFLAGS := -I$(MINI-OS_ROOT)/include $(CPPFLAGS) -I$(ARCH_INC)
$(extra_incl)
# The name of the architecture specific library.
# This is on x86_32: libx86_32.a
@@ -51,10 +58,10 @@ HEAD_OBJ := $(TARGET_ARCH_DIR)/$(HEAD_AR
HEAD_OBJ := $(TARGET_ARCH_DIR)/$(HEAD_ARCH_OBJ)
-%.o: %.c $(HDRS) Makefile $(SPEC_DEPENDS)
+%.o: %.c $(HDRS) Makefile $(EXTRA_DEPS)
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-%.o: %.S $(HDRS) Makefile $(SPEC_DEPENDS)
+%.o: %.S $(HDRS) Makefile $(EXTRA_DEPS)
$(CC) $(ASFLAGS) $(CPPFLAGS) -c $< -o $@
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|