|
@@ -23,19 +23,23 @@ all: $(obj)/zImage
|
|
compress-$(CONFIG_KERNEL_GZIP) := CONFIG_KERNEL_GZIP
|
|
compress-$(CONFIG_KERNEL_GZIP) := CONFIG_KERNEL_GZIP
|
|
compress-$(CONFIG_KERNEL_XZ) := CONFIG_KERNEL_XZ
|
|
compress-$(CONFIG_KERNEL_XZ) := CONFIG_KERNEL_XZ
|
|
|
|
|
|
|
|
+ifdef CROSS32_COMPILE
|
|
|
|
+ BOOTCC := $(CROSS32_COMPILE)gcc
|
|
|
|
+ BOOTAR := $(CROSS32_COMPILE)ar
|
|
|
|
+else
|
|
|
|
+ BOOTCC := $(CC)
|
|
|
|
+ BOOTAR := $(AR)
|
|
|
|
+endif
|
|
|
|
+
|
|
BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
|
BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
|
-fno-strict-aliasing -Os -msoft-float -pipe \
|
|
-fno-strict-aliasing -Os -msoft-float -pipe \
|
|
-fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
|
|
-fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
|
|
-D$(compress-y)
|
|
-D$(compress-y)
|
|
|
|
|
|
-BOOTCC := $(CC)
|
|
|
|
ifdef CONFIG_PPC64_BOOT_WRAPPER
|
|
ifdef CONFIG_PPC64_BOOT_WRAPPER
|
|
BOOTCFLAGS += -m64
|
|
BOOTCFLAGS += -m64
|
|
else
|
|
else
|
|
BOOTCFLAGS += -m32
|
|
BOOTCFLAGS += -m32
|
|
-ifdef CROSS32_COMPILE
|
|
|
|
- BOOTCC := $(CROSS32_COMPILE)gcc
|
|
|
|
-endif
|
|
|
|
endif
|
|
endif
|
|
|
|
|
|
BOOTCFLAGS += -isystem $(shell $(BOOTCC) -print-file-name=include)
|
|
BOOTCFLAGS += -isystem $(shell $(BOOTCC) -print-file-name=include)
|
|
@@ -49,6 +53,8 @@ endif
|
|
|
|
|
|
BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
|
|
BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
|
|
|
|
|
|
|
|
+BOOTARFLAGS := -cr$(KBUILD_ARFLAGS)
|
|
|
|
+
|
|
ifdef CONFIG_DEBUG_INFO
|
|
ifdef CONFIG_DEBUG_INFO
|
|
BOOTCFLAGS += -g
|
|
BOOTCFLAGS += -g
|
|
endif
|
|
endif
|
|
@@ -202,7 +208,7 @@ quiet_cmd_bootas = BOOTAS $@
|
|
cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $<
|
|
cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $<
|
|
|
|
|
|
quiet_cmd_bootar = BOOTAR $@
|
|
quiet_cmd_bootar = BOOTAR $@
|
|
- cmd_bootar = $(CROSS32AR) -cr$(KBUILD_ARFLAGS) $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@
|
|
|
|
|
|
+ cmd_bootar = $(BOOTAR) $(BOOTARFLAGS) $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@
|
|
|
|
|
|
$(obj-libfdt): $(obj)/%.o: $(srctree)/scripts/dtc/libfdt/%.c FORCE
|
|
$(obj-libfdt): $(obj)/%.o: $(srctree)/scripts/dtc/libfdt/%.c FORCE
|
|
$(call if_changed_dep,bootcc)
|
|
$(call if_changed_dep,bootcc)
|