Skip to content

Commit

Permalink
fix build errors using gcc-4.7
Browse files Browse the repository at this point in the history
error: DIV usage mismatch between arch/arm/boot/compressed/misc.o and output
error: DIV usage mismatch between arch/arm/boot/compressed/lib1funcs.o and output

Change-Id: I1251b843bb9b4c74ba8039fd194e3aed2183cf5b

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>

Conflicts:

	arch/arm/boot/compressed/Makefile
  • Loading branch information
codeworkx authored and shr-project committed Aug 23, 2012
1 parent c865ec4 commit 37b0bac
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 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 @@ -114,7 +122,7 @@ endif
targets := vmlinux vmlinux.lds \
piggy.$(suffix_y) piggy.$(suffix_y).o \
lib1funcs.o lib1funcs.S ashldi3.o ashldi3.S \
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 piggy.xzkern \
Expand Down Expand Up @@ -149,12 +157,14 @@ 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
$(call cmd,shipped)

# For __aeabi_llsl
AFLAGS_ashldi3.o +=-Wa,-march=armv7-a$(plus_sec)
ashldi3 = $(obj)/ashldi3.o

$(obj)/ashldi3.S: $(srctree)/arch/$(SRCARCH)/lib/ashldi3.S
Expand All @@ -180,7 +190,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) $(ashldi3) FORCE
@$(check_for_multiple_zreladdr)
$(call if_changed,ld)
Expand All @@ -189,6 +199,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 37b0bac

Please sign in to comment.