Skip to content

Commit a40c338

Browse files
committed
Merge commit 'd5a55981986ac5d1a31aef3a8d16eaff8534a412'
* commit 'd5a55981986ac5d1a31aef3a8d16eaff8534a412': build: check if AS supports the '.func' directive Merged-by: Michael Niedermayer <[email protected]>
2 parents d5c9d05 + d5a5598 commit a40c338

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

configure

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,6 +1719,7 @@ SYSTEM_FUNCS="
17191719

17201720
TOOLCHAIN_FEATURES="
17211721
as_dn_directive
1722+
as_func
17221723
asm_mod_q
17231724
attribute_may_alias
17241725
attribute_packed
@@ -4279,6 +4280,11 @@ if enabled asm; then
42794280
\n: .int 0
42804281
.endm
42814282
m x
4283+
EOF
4284+
4285+
check_as <<EOF && enable as_func
4286+
.func test
4287+
.endfunc
42824288
EOF
42834289
fi
42844290

libavutil/aarch64/asm.S

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,28 @@
2626
# define ELF #
2727
#endif
2828

29+
#if HAVE_AS_FUNC
30+
# define FUNC
31+
#else
32+
# define FUNC #
33+
#endif
34+
2935
.macro function name, export=0, align=2
3036
.macro endfunc
3137
ELF .size \name, . - \name
32-
.endfunc
38+
FUNC .endfunc
3339
.purgem endfunc
3440
.endm
3541
.text
3642
.align \align
3743
.if \export
3844
.global EXTERN_ASM\name
3945
ELF .type EXTERN_ASM\name, %function
40-
.func EXTERN_ASM\name
46+
FUNC .func EXTERN_ASM\name
4147
EXTERN_ASM\name:
4248
.else
4349
ELF .type \name, %function
44-
.func \name
50+
FUNC .func \name
4551
\name:
4652
.endif
4753
.endm

libavutil/arm/asm.S

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
# define T @
3535
#endif
3636

37+
#if HAVE_AS_FUNC
38+
# define FUNC
39+
#else
40+
# define FUNC @
41+
#endif
42+
3743
#if HAVE_NEON
3844
.arch armv7-a
3945
#elif HAVE_ARMV6T2
@@ -66,19 +72,19 @@ ELF .section .note.GNU-stack,"",%progbits @ Mark stack as non-executable
6672
.noaltmacro
6773
.endif
6874
ELF .size \name, . - \name
69-
.endfunc
75+
FUNC .endfunc
7076
.purgem endfunc
7177
.endm
7278
.text
7379
.align \align
7480
.if \export
7581
.global EXTERN_ASM\name
7682
ELF .type EXTERN_ASM\name, %function
77-
.func EXTERN_ASM\name
83+
FUNC .func EXTERN_ASM\name
7884
EXTERN_ASM\name:
7985
.else
8086
ELF .type \name, %function
81-
.func \name
87+
FUNC .func \name
8288
\name:
8389
.endif
8490
.endm

0 commit comments

Comments
 (0)