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 19, 2012
1 parent 0333777 commit e465ff7
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions arch/arm/boot/compressed/Makefile
Expand Up @@ -4,9 +4,19 @@
# create a compressed vmlinuz image from the original vmlinux
#

AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET)
HEAD = head.o
OBJS = misc.o decompress.o
plus_sec := $(call as-instr,.arch_extension sec,+sec)


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

#
Expand Down Expand Up @@ -66,7 +76,7 @@ suffix_$(CONFIG_KERNEL_LZMA) = lzma

targets := vmlinux vmlinux.lds \
piggy.$(suffix_y) piggy.$(suffix_y).o \
font.o font.c head.o misc.o $(OBJS)
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
Expand Down Expand Up @@ -96,19 +106,21 @@ 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 FORCE
$(call cmd,shipped)

$(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
$(call if_changed,ld)
@:

$(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 e465ff7

Please sign in to comment.