Discussion:
[x264-devel] [PATCH] configure: Only use gas-preprocessor with armasm for compiler=CL
Martin Storsjö
2018-03-30 21:10:14 UTC
Permalink
This picks the right assembler automatically for arm and aarch64
llvm-mingw targets.

This doesn't get the right assembler for clang setups when clang
acts like MSVC and uses MSVC headers though (where it perhaps
should use armasm as before), but that's probably an even more
obscure setup.
---
configure | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 79f76cd..362aeb2 100755
--- a/configure
+++ b/configure
@@ -798,8 +798,10 @@ case $host_cpu in
CFLAGS="$CFLAGS -arch armv7"
LDFLAGS="$LDFLAGS -arch armv7"
fi
- elif [ "$SYS" = WINDOWS ] ; then
+ elif [ "$SYS" = WINDOWS ] && [ "$compiler" = CL ] ; then
AS="${AS-${SRCPATH}/tools/gas-preprocessor.pl -arch arm -as-type armasm -force-thumb -- armasm -nologo -ignore 4509}"
+ elif [ "$SYS" = WINDOWS ] ; then
+ AS="${AS-${SRCPATH}/tools/gas-preprocessor.pl -arch arm -as-type clang -force-thumb -- ${CC} -mimplicit-it=always}"
else
AS="${AS-${CC}}"
fi
@@ -810,7 +812,7 @@ case $host_cpu in
if [ "$SYS" = MACOSX ] ; then
AS="${AS-${CC}}"
ASFLAGS="$ASFLAGS -DPREFIX -DPIC"
- elif [ "$SYS" = WINDOWS ] ; then
+ elif [ "$SYS" = WINDOWS ] && [ "$compiler" = CL ] ; then
AS="${AS-${SRCPATH}/tools/gas-preprocessor.pl -arch aarch64 -as-type armasm -- armasm64 -nologo}"
else
AS="${AS-${CC}}"
--
2.7.4
Janne Grunau
2018-03-31 12:26:31 UTC
Permalink
Post by Martin Storsjö
This picks the right assembler automatically for arm and aarch64
llvm-mingw targets.
This doesn't get the right assembler for clang setups when clang
acts like MSVC and uses MSVC headers though (where it perhaps
should use armasm as before), but that's probably an even more
obscure setup.
---
configure | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 79f76cd..362aeb2 100755
--- a/configure
+++ b/configure
@@ -798,8 +798,10 @@ case $host_cpu in
CFLAGS="$CFLAGS -arch armv7"
LDFLAGS="$LDFLAGS -arch armv7"
fi
- elif [ "$SYS" = WINDOWS ] ; then
+ elif [ "$SYS" = WINDOWS ] && [ "$compiler" = CL ] ; then
AS="${AS-${SRCPATH}/tools/gas-preprocessor.pl -arch arm -as-type armasm -force-thumb -- armasm -nologo -ignore 4509}"
+ elif [ "$SYS" = WINDOWS ] ; then
+ AS="${AS-${SRCPATH}/tools/gas-preprocessor.pl -arch arm -as-type clang -force-thumb -- ${CC} -mimplicit-it=always}"
else
AS="${AS-${CC}}"
fi
@@ -810,7 +812,7 @@ case $host_cpu in
if [ "$SYS" = MACOSX ] ; then
AS="${AS-${CC}}"
ASFLAGS="$ASFLAGS -DPREFIX -DPIC"
- elif [ "$SYS" = WINDOWS ] ; then
+ elif [ "$SYS" = WINDOWS ] && [ "$compiler" = CL ] ; then
AS="${AS-${SRCPATH}/tools/gas-preprocessor.pl -arch aarch64 -as-type armasm -- armasm64 -nologo}"
else
AS="${AS-${CC}}"
looks good and I agree

Janne
Henrik Gramner
2018-03-31 13:52:09 UTC
Permalink
Post by Martin Storsjö
This picks the right assembler automatically for arm and aarch64
llvm-mingw targets.
This doesn't get the right assembler for clang setups when clang
acts like MSVC and uses MSVC headers though (where it perhaps
should use armasm as before), but that's probably an even more
obscure setup.
Pushed to sandbox. Thanks.

Loading...