direct-io.hg

changeset 13962:236687fb42d7

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@fujitsu-siemens.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
author kfraser@localhost.localdomain
date Thu Feb 15 14:18:21 2007 +0000 (2007-02-15)
parents 61de36b8be81
children 296d7aa451a3
files extras/mini-os/Makefile extras/mini-os/arch/x86/Makefile extras/mini-os/arch/x86/arch.mk extras/mini-os/minios.mk
line diff
     1.1 --- a/extras/mini-os/Makefile	Thu Feb 15 14:17:00 2007 +0000
     1.2 +++ b/extras/mini-os/Makefile	Thu Feb 15 14:18:21 2007 +0000
     1.3 @@ -44,10 +44,6 @@ ARCH_LINKS =
     1.4  # This can be overwritten from arch specific rules.
     1.5  EXTRA_INC =
     1.6  
     1.7 -# Special build dependencies.
     1.8 -# Build all after touching this/these file(s) (see minios.mk)
     1.9 -SPEC_DEPENDS = minios.mk
    1.10 -
    1.11  # Include the architecture family's special makerules.
    1.12  # This must be before include minios.mk!
    1.13  include $(TARGET_ARCH_DIR)/arch.mk
    1.14 @@ -57,7 +53,6 @@ include minios.mk
    1.15  
    1.16  # Define some default flags for linking.
    1.17  LDLIBS := 
    1.18 -LDFLAGS := 
    1.19  LDARCHLIB := -L$(TARGET_ARCH_DIR) -l$(ARCH_LIB_NAME)
    1.20  LDFLAGS_FINAL := -N -T $(TARGET_ARCH_DIR)/minios-$(TARGET_ARCH).lds
    1.21  
     2.1 --- a/extras/mini-os/arch/x86/Makefile	Thu Feb 15 14:17:00 2007 +0000
     2.2 +++ b/extras/mini-os/arch/x86/Makefile	Thu Feb 15 14:18:21 2007 +0000
     2.3 @@ -3,9 +3,6 @@
     2.4  # It's is used for x86_32, x86_32y and x86_64
     2.5  #
     2.6  
     2.7 -# Rebuild all after touching this/these extra file(s) (see mini-os.mk)
     2.8 -SPEC_DEP = arch.mk
     2.9 -
    2.10  # include arch.mk has to be before mini-os.mk!
    2.11  include arch.mk
    2.12  include ../../minios.mk
    2.13 @@ -25,5 +22,5 @@ all: $(ARCH_LIB)
    2.14  	$(AR) rv $(ARCH_LIB) $(ARCH_OBJS)
    2.15  
    2.16  clean:
    2.17 -	rm -f $(ARCH_LIB) $(ARCH_OBJS)
    2.18 +	rm -f $(ARCH_LIB) $(ARCH_OBJS) $(HEAD_ARCH_OBJ)
    2.19  
     3.1 --- a/extras/mini-os/arch/x86/arch.mk	Thu Feb 15 14:17:00 2007 +0000
     3.2 +++ b/extras/mini-os/arch/x86/arch.mk	Thu Feb 15 14:18:21 2007 +0000
     3.3 @@ -6,6 +6,7 @@
     3.4  ifeq ($(TARGET_ARCH),x86_32)
     3.5  ARCH_CFLAGS  := -m32 -march=i686
     3.6  ARCH_LDFLAGS := -m elf_i386
     3.7 +ARCH_ASFLAGS := -m32
     3.8  EXTRA_INC += $(TARGET_ARCH_FAM)/$(TARGET_ARCH)
     3.9  EXTRA_SRC += arch/$(EXTRA_INC)
    3.10  endif
    3.11 @@ -19,10 +20,10 @@ endif
    3.12  
    3.13  ifeq ($(TARGET_ARCH),x86_64)
    3.14  ARCH_CFLAGS := -m64 -mno-red-zone -fpic -fno-reorder-blocks
    3.15 -ARCH_CFLAGS := -fno-asynchronous-unwind-tables
    3.16 +ARCH_CFLAGS += -fno-asynchronous-unwind-tables
    3.17 +ARCH_ASFLAGS := -m64
    3.18  ARCH_LDFLAGS := -m elf_x86_64
    3.19  EXTRA_INC += $(TARGET_ARCH_FAM)/$(TARGET_ARCH)
    3.20  EXTRA_SRC += arch/$(EXTRA_INC)
    3.21  endif
    3.22  
    3.23 -
     4.1 --- a/extras/mini-os/minios.mk	Thu Feb 15 14:17:00 2007 +0000
     4.2 +++ b/extras/mini-os/minios.mk	Thu Feb 15 14:18:21 2007 +0000
     4.3 @@ -11,6 +11,7 @@ DEF_CFLAGS += -Wstrict-prototypes -Wnest
     4.4  DEF_CFLAGS += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
     4.5  
     4.6  DEF_ASFLAGS = -D__ASSEMBLY__
     4.7 +DEF_LDFLAGS =
     4.8  
     4.9  ifeq ($(debug),y)
    4.10  DEF_CFLAGS += -g
    4.11 @@ -23,21 +24,27 @@ endif
    4.12  # ARCH_... flags may be defined in arch/$(TARGET_ARCH_FAM/rules.mk
    4.13  CFLAGS := $(DEF_CFLAGS) $(ARCH_CFLAGS)
    4.14  ASFLAGS := $(DEF_ASFLAGS) $(ARCH_ASFLAGS)
    4.15 +LDFLAGS := $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
    4.16  
    4.17  # The path pointing to the architecture specific header files.
    4.18 -ARCH_SPEC_INC := $(MINI-OS_ROOT)/include/$(TARGET_ARCH_FAM)
    4.19 +ARCH_INC := $(MINI-OS_ROOT)/include/$(TARGET_ARCH_FAM)
    4.20 +
    4.21 +# Special build dependencies.
    4.22 +# Rebuild all after touching this/these file(s)
    4.23 +EXTRA_DEPS = $(MINI-OS_ROOT)/minios.mk \
    4.24 +		$(MINI-OS_ROOT)/$(TARGET_ARCH_DIR)/arch.mk
    4.25  
    4.26  # Find all header files for checking dependencies.
    4.27  HDRS := $(wildcard $(MINI-OS_ROOT)/include/*.h)
    4.28  HDRS += $(wildcard $(MINI-OS_ROOT)/include/xen/*.h)
    4.29 -HDRS += $(wildcard $(ARCH_SPEC_INC)/*.h)
    4.30 +HDRS += $(wildcard $(ARCH_INC)/*.h)
    4.31  # For special wanted header directories.
    4.32  extra_heads := $(foreach dir,$(EXTRA_INC),$(wildcard $(dir)/*.h))
    4.33  HDRS += $(extra_heads)
    4.34  
    4.35  # Add the special header directories to the include paths.
    4.36  extra_incl := $(foreach dir,$(EXTRA_INC),-I$(MINI-OS_ROOT)/include/$(dir))
    4.37 -override CPPFLAGS := -I$(MINI-OS_ROOT)/include $(CPPFLAGS) -I$(ARCH_SPEC_INC)	$(extra_incl)
    4.38 +override CPPFLAGS := -I$(MINI-OS_ROOT)/include $(CPPFLAGS) -I$(ARCH_INC)	$(extra_incl)
    4.39  
    4.40  # The name of the architecture specific library.
    4.41  # This is on x86_32: libx86_32.a
    4.42 @@ -51,10 +58,10 @@ HEAD_ARCH_OBJ := $(TARGET_ARCH).o
    4.43  HEAD_OBJ := $(TARGET_ARCH_DIR)/$(HEAD_ARCH_OBJ)
    4.44  
    4.45  
    4.46 -%.o: %.c $(HDRS) Makefile $(SPEC_DEPENDS)
    4.47 +%.o: %.c $(HDRS) Makefile $(EXTRA_DEPS)
    4.48  	$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
    4.49  
    4.50 -%.o: %.S $(HDRS) Makefile $(SPEC_DEPENDS)
    4.51 +%.o: %.S $(HDRS) Makefile $(EXTRA_DEPS)
    4.52  	$(CC) $(ASFLAGS) $(CPPFLAGS) -c $< -o $@
    4.53  
    4.54