Skip to content

Commit

Permalink
fix build errors using gcc-4.7
Browse files Browse the repository at this point in the history
Error: selected processor does not support ARM mode `smc #0'
error: DIV usage mismatch between arch/arm/boot/compressed/head.o and output
error: DIV usage mismatch between arch/arm/boot/compressed/misc.o and output
error: DIV usage mismatch between arch/arm/boot/compressed/decompress.o and output
error: DIV usage mismatch between arch/arm/boot/compressed/lib1funcs.o and output
error: DIV usage mismatch between arch/arm/boot/compressed/ashldi3.o and output

Change-Id: I1251b843bb9b4c74ba8039fd194e3aed2183cf5b

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
  • Loading branch information
codeworkx authored and shr-project committed Aug 9, 2012
1 parent 22300b6 commit 627c638
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions arch/arm/boot/compressed/Makefile
Expand Up @@ -5,6 +5,7 @@
#

OBJS =
plus_sec := $(call as-instr,.arch_extension sec,+sec)

# Ensure that MMCIF loader code appears early in the image
# to minimise that number of bocks that have to be read in
Expand All @@ -21,9 +22,16 @@ OBJS += sdhi-shmobile.o
OBJS += sdhi-sh7372.o
endif

AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET)
HEAD = head.o
OBJS += misc.o decompress.o
AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
AFLAGS_head.o += -Wa,-march=armv7-a$(plus_sec)
HEAD = head.o

AFLAGS_misc.o +=-Wa,-march=armv7-a$(plus_sec)
MISC = misc.o

AFLAGS_decompress.o += -Wa,-march=armv7-a$(plus_sec)
DECOMPRESS = decompress.o

FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c

# string library code (-Os is enforced to keep it much smaller)
Expand Down Expand Up @@ -112,7 +120,7 @@ endif

targets := vmlinux vmlinux.lds \
piggy.$(suffix_y) piggy.$(suffix_y).o \
lib1funcs.o lib1funcs.S font.o font.c head.o misc.o $(OBJS)
lib1funcs.o lib1funcs.S font.o font.c head.o misc.o decompress.o $(OBJS)

# Make sure files are removed during clean
extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S $(libfdt) $(libfdt_hdrs)
Expand Down Expand Up @@ -145,6 +153,7 @@ LDFLAGS_vmlinux += -X
LDFLAGS_vmlinux += -T

# For __aeabi_uidivmod
AFLAGS_lib1funcs.o +=-Wa,-march=armv7-a$(plus_sec)
lib1funcs = $(obj)/lib1funcs.o

$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S
Expand All @@ -170,7 +179,7 @@ if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \
false; \
fi

$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \
$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/$(MISC) $(obj)/$(DECOMPRESS) $(obj)/piggy.$(suffix_y).o \
$(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE
@$(check_for_multiple_zreladdr)
$(call if_changed,ld)
Expand All @@ -179,6 +188,7 @@ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \
$(obj)/piggy.$(suffix_y): $(obj)/../Image FORCE
$(call if_changed,$(suffix_y))

AFLAGS_piggy.$(suffix_y).o += -Wa,-march=armv7-a$(plus_sec)
$(obj)/piggy.$(suffix_y).o: $(obj)/piggy.$(suffix_y) FORCE

CFLAGS_font.o := -Dstatic=
Expand Down

0 comments on commit 627c638

Please sign in to comment.