From 1f65ed53da16e383416ae034b585fd52682f5ea7 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 13 Mar 2016 11:09:01 +0000 Subject: [build] Allow assembler section type character to vary by architecture On some architectures (such as ARM) the "@" character is used as a comment delimiter. A section type argument such as "@progbits" therefore becomes "%progbits". This is further complicated by the fact that the "%" character has special meaning for inline assembly when input or output operands are used, in which cases "@progbits" becomes "%%progbits". Allow the section type character(s) to be defined via Makefile variables. Signed-off-by: Michael Brown --- src/Makefile.housekeeping | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Makefile.housekeeping') diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index 0a80d2ac..4280f398 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -491,6 +491,11 @@ LDFLAGS += -static # CFLAGS += -include include/compiler.h +# The section type character (e.g. "@" in "@progbits") varies by +# architecture. +# +CFLAGS += -DASM_TCHAR='$(ASM_TCHAR)' -DASM_TCHAR_OPS='$(ASM_TCHAR_OPS)' + # CFLAGS for specific object types # CFLAGS_c += @@ -896,7 +901,7 @@ endif # Device ID tables (using IDs from ROM definition file) # define obj_pci_id_asm - .section ".pci_devlist.$(1)", "a", @progbits + .section ".pci_devlist.$(1)", "a", $(ASM_TCHAR)progbits .globl pci_devlist_$(1) pci_devlist_$(1): .short ( 0x$(1) & 0xffff ) -- cgit v1.2.3-55-g7522