From be88a80858ea4febcc621f87166fbf4c1753e513 Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Mon, 7 Feb 2011 18:03:36 +0100 Subject: nptl:arm: add a wrapper for .cfi_sections pseudo-ops ARM disables by default the support for ASM CFI directives. Anyway using an old version of binutils that does not support some new pseudo-op, the build fails as below: AS libpthread/nptl/sysdeps/unix/sysv/linux/close.oS libpthread/nptl/sysdeps/unix/sysv/linux/close.S: Assembler messages: libpthread/nptl/sysdeps/unix/sysv/linux/close.S:9: Error: unknown pseudo-op: `.cfi_sections' The problem is that the .cfi_sections pseudo should be wrapped by a macro that expands to nothing when the CFI is off. Signed-off-by: Carmelo Amoroso CC: Khem Ray --- libc/sysdeps/linux/common/sysdep.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libc/sysdeps/linux/common/sysdep.h') diff --git a/libc/sysdeps/linux/common/sysdep.h b/libc/sysdeps/linux/common/sysdep.h index a7ec95480..156e5711a 100644 --- a/libc/sysdeps/linux/common/sysdep.h +++ b/libc/sysdeps/linux/common/sysdep.h @@ -51,6 +51,7 @@ /* Macros to generate eh_frame unwind information. */ # ifdef HAVE_ASM_CFI_DIRECTIVES +# define cfi_sections(sect...) .cfi_sections sect # define cfi_startproc .cfi_startproc # define cfi_endproc .cfi_endproc # define cfi_def_cfa(reg, off) .cfi_def_cfa reg, off @@ -71,6 +72,7 @@ # define cfi_lsda(enc, exp) .cfi_lsda enc, exp # else +# define cfi_sections(sect...) # define cfi_startproc # define cfi_endproc # define cfi_def_cfa(reg, off) @@ -95,6 +97,8 @@ # ifdef HAVE_ASM_CFI_DIRECTIVES # define CFI_STRINGIFY(Name) CFI_STRINGIFY2 (Name) # define CFI_STRINGIFY2(Name) #Name +# define CFI_SECTIONS(sect...) \ + ".cfi_sections " CFI_STRINGIFY(sect) # define CFI_STARTPROC ".cfi_startproc" # define CFI_ENDPROC ".cfi_endproc" # define CFI_DEF_CFA(reg, off) \ @@ -128,6 +132,7 @@ # define CFI_LSDA(enc, exp) \ ".cfi_lsda " CFI_STRINGIFY(enc) "," CFI_STRINGIFY(exp) # else +# define CFI_SECTIONS(sect...) # define CFI_STARTPROC # define CFI_ENDPROC # define CFI_DEF_CFA(reg, off) -- cgit v1.2.3