Merge commit 'd5a55981986ac5d1a31aef3a8d16eaff8534a412'

* commit 'd5a55981986ac5d1a31aef3a8d16eaff8534a412':
  build: check if AS supports the '.func' directive

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-06-04 12:45:29 +02:00
commit a40c338a00
3 changed files with 24 additions and 6 deletions

6
configure vendored
View File

@ -1719,6 +1719,7 @@ SYSTEM_FUNCS="
TOOLCHAIN_FEATURES=" TOOLCHAIN_FEATURES="
as_dn_directive as_dn_directive
as_func
asm_mod_q asm_mod_q
attribute_may_alias attribute_may_alias
attribute_packed attribute_packed
@ -4279,6 +4280,11 @@ if enabled asm; then
\n: .int 0 \n: .int 0
.endm .endm
m x m x
EOF
check_as <<EOF && enable as_func
.func test
.endfunc
EOF EOF
fi fi

View File

@ -26,10 +26,16 @@
# define ELF # # define ELF #
#endif #endif
#if HAVE_AS_FUNC
# define FUNC
#else
# define FUNC #
#endif
.macro function name, export=0, align=2 .macro function name, export=0, align=2
.macro endfunc .macro endfunc
ELF .size \name, . - \name ELF .size \name, . - \name
.endfunc FUNC .endfunc
.purgem endfunc .purgem endfunc
.endm .endm
.text .text
@ -37,11 +43,11 @@ ELF .size \name, . - \name
.if \export .if \export
.global EXTERN_ASM\name .global EXTERN_ASM\name
ELF .type EXTERN_ASM\name, %function ELF .type EXTERN_ASM\name, %function
.func EXTERN_ASM\name FUNC .func EXTERN_ASM\name
EXTERN_ASM\name: EXTERN_ASM\name:
.else .else
ELF .type \name, %function ELF .type \name, %function
.func \name FUNC .func \name
\name: \name:
.endif .endif
.endm .endm

View File

@ -34,6 +34,12 @@
# define T @ # define T @
#endif #endif
#if HAVE_AS_FUNC
# define FUNC
#else
# define FUNC @
#endif
#if HAVE_NEON #if HAVE_NEON
.arch armv7-a .arch armv7-a
#elif HAVE_ARMV6T2 #elif HAVE_ARMV6T2
@ -66,7 +72,7 @@ ELF .section .note.GNU-stack,"",%progbits @ Mark stack as non-executable
.noaltmacro .noaltmacro
.endif .endif
ELF .size \name, . - \name ELF .size \name, . - \name
.endfunc FUNC .endfunc
.purgem endfunc .purgem endfunc
.endm .endm
.text .text
@ -74,11 +80,11 @@ ELF .size \name, . - \name
.if \export .if \export
.global EXTERN_ASM\name .global EXTERN_ASM\name
ELF .type EXTERN_ASM\name, %function ELF .type EXTERN_ASM\name, %function
.func EXTERN_ASM\name FUNC .func EXTERN_ASM\name
EXTERN_ASM\name: EXTERN_ASM\name:
.else .else
ELF .type \name, %function ELF .type \name, %function
.func \name FUNC .func \name
\name: \name:
.endif .endif
.endm .endm