The current automatic detection might not always succeed.
On Xcode 7 with -fembed-bitcode, the current detection fails.
In this case, the detection is to try to compile and link a file
containing '__asm__ (".eabi_attribute 28, 1");'
With -fembed-bitcode, the assembler does print an error, but the
compiler process still returns a successful error code:
$ cat test.c
__asm__ (".eabi_attribute 28, 1");
int main(void) { return 0; }
$ clang -arch armv7 -c test.c -fembed-bitcode -miphoneos-version-min=6.0
<inline asm>:1:1: error: unknown directive
.eabi_attribute 28, 1
^
$ echo $?
0
This issue was pointed out by James Howe <[email protected]>.
---
James also suggested a patch that skips the float ABI detection
when --disable-vfp has been set. This also would work, but that
disables all the VFP instruction optimizations, which is
a different thing than whether float arguments are passed in
registers or not.
Better ways of detecting the float ABI used by apple's clang
are also welcomed. (In practice, it's always the soft ABI there,
so hardcoding it for --target-os=darwin would also work.)
The implementation, using an empty if clause, isn't too pretty,
but avoids too many extra changes to the rest of this code.
Alternatively, one could also change all the "enable vfp_args" to
enable_weak vfp_args, and adjust the condition for printing the
warning about guessing the ABI.
---
configure | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 2c3e77a..eb041d5 100755
--- a/configure
+++ b/configure
@@ -269,6 +269,7 @@ Toolchain options:
Advanced options (experts only):
--malloc-prefix=PREFIX prefix malloc and related names with PREFIX
--disable-symver disable symbol versioning
+ --disable-vfp-args use the soft float ABI (normally autodetected)
--enable-hardcoded-tables use hardcoded tables instead of runtime generation
--disable-safe-bitstream-reader
disable buffer boundary checking in bitreaders
@@ -1386,6 +1387,7 @@ BUILTIN_LIST="
HAVE_LIST_CMDLINE="
inline_asm
symver
+ vfp_args
yasm
"
@@ -1525,7 +1527,6 @@ TOOLCHAIN_FEATURES="
pragma_deprecated
symver_asm_label
symver_gnu_asm
- vfp_args
xform_asm
xmm_clobbers
"
@@ -4011,7 +4012,9 @@ elif enabled arm; then
check_cpp_condition stddef.h "defined __thumb__" && enable_weak thumb
enabled thumb && check_cflags -mthumb || check_cflags -marm
- if check_cpp_condition stddef.h "defined __ARM_PCS_VFP"; then
+ if enabled vfp_args || disabled vfp_args; then
+ true
+ elif check_cpp_condition stddef.h "defined __ARM_PCS_VFP"; then
enable vfp_args
elif check_cpp_condition stddef.h "defined _M_ARM_FP && _M_ARM_FP >= 30";
then
enable vfp_args
--
2.3.2 (Apple Git-55)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel