diff options
Diffstat (limited to 'arch/sh/boot/compressed/Makefile')
-rw-r--r-- | arch/sh/boot/compressed/Makefile | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile index 780e083e4d17..23bc849d9c64 100644 --- a/arch/sh/boot/compressed/Makefile +++ b/arch/sh/boot/compressed/Makefile | |||
@@ -27,8 +27,6 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ | |||
27 | $(CONFIG_BOOT_LINK_OFFSET)]') | 27 | $(CONFIG_BOOT_LINK_OFFSET)]') |
28 | endif | 28 | endif |
29 | 29 | ||
30 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) | ||
31 | |||
32 | ifeq ($(CONFIG_MCOUNT),y) | 30 | ifeq ($(CONFIG_MCOUNT),y) |
33 | ORIG_CFLAGS := $(KBUILD_CFLAGS) | 31 | ORIG_CFLAGS := $(KBUILD_CFLAGS) |
34 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) | 32 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) |
@@ -37,7 +35,25 @@ endif | |||
37 | LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \ | 35 | LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \ |
38 | -T $(obj)/../../kernel/vmlinux.lds | 36 | -T $(obj)/../../kernel/vmlinux.lds |
39 | 37 | ||
40 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE | 38 | # |
39 | # Pull in the necessary libgcc bits from the in-kernel implementation. | ||
40 | # | ||
41 | lib1funcs-$(CONFIG_SUPERH32) := ashiftrt.S ashldi3.c ashrsi3.S ashlsi3.S \ | ||
42 | lshrsi3.S | ||
43 | lib1funcs-obj := \ | ||
44 | $(addsuffix .o, $(basename $(addprefix $(obj)/, $(lib1funcs-y)))) | ||
45 | |||
46 | lib1funcs-dir := $(srctree)/arch/$(SRCARCH)/lib | ||
47 | ifeq ($(BITS),64) | ||
48 | lib1funcs-dir := $(addsuffix $(BITS), $(lib1funcs-dir)) | ||
49 | endif | ||
50 | |||
51 | KBUILD_CFLAGS += -I$(lib1funcs-dir) | ||
52 | |||
53 | $(addprefix $(obj)/,$(lib1funcs-y)): $(obj)/%: $(lib1funcs-dir)/% FORCE | ||
54 | $(call cmd,shipped) | ||
55 | |||
56 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(lib1funcs-obj) FORCE | ||
41 | $(call if_changed,ld) | 57 | $(call if_changed,ld) |
42 | @: | 58 | @: |
43 | 59 | ||