From: Janne Grunau <[email protected]>
---8<---
This is not as nice as one would hope. Another option would be
using a flags filter for -march. That would leave LD in the dark
about crosscompiling though.
I'm also not sure if -arch has the same meaning as -march=. Judging
from the compiler defines it does though:
'clang -arch armv7 -dM -E -x c /dev/null' differs from
'clang -arch armv7s ...'
So this ugly if in probe_cc is the best option I see.
Janne
---
configure | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/configure b/configure
index 59c19a8..7e4f169 100755
--- a/configure
+++ b/configure
@@ -2911,6 +2911,13 @@ probe_cc(){
_depflags='-MMD -MF $(@:.o=.d) -MT $@'
_cflags_speed='-O3'
_cflags_size='-Os'
+ # handle cross compilation for Apple's clang
+ if enabled cross_compile && [ $(expr "$_ident" : "Apple LLVM") = 10 ] ;
then
+ case $pfx in
+ as|cc|ld) _flags="-arch $arch";;
+ *) ;;
+ esac
+ fi
elif $_cc -V 2>&1 | grep -q Sun; then
_type=suncc
_ident=$($_cc -V 2>&1 | head -n1 | cut -d' ' -f 2-)
--
2.3.0
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel