Skip to content

Commit

Permalink
OMAP4: enable smc instruction in new assembler versions
Browse files Browse the repository at this point in the history
New assemblers need -march=armv7-a+sec on command line or
.arch_extension sec inline to enable use of the smc instruction.

This patch uses as-instr to check the latter to conditionally
enable the former in AFLAGS for files that use smc.

Checked on both old and new binutils to verify that it does
not break old versions.

Signed-off-by: John Rigby <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
  • Loading branch information
John Rigby authored and tmlind committed Dec 18, 2010
1 parent 1a6b592 commit fe297dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/arm/mach-omap2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ obj-$(CONFIG_LOCAL_TIMERS) += timer-mpu.o
obj-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o
obj-$(CONFIG_ARCH_OMAP4) += omap44xx-smc.o omap4-common.o

AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a
AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a
plus_sec := $(call as-instr,.arch_extension sec,+sec)
AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec)
AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a$(plus_sec)

# Functions loaded to SRAM
obj-$(CONFIG_ARCH_OMAP2420) += sram242x.o
Expand Down

0 comments on commit fe297dd

Please sign in to comment.