Discussion:
[RFC PATCH 1/2] configure: Add probe identification of MS armasm
(too old to reply)
Martin Storsjö
2014-08-09 19:48:28 UTC
Permalink
---
configure | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/configure b/configure
index 7e3f6ff..4d2439e 100755
--- a/configure
+++ b/configure
@@ -2881,6 +2881,10 @@ probe_cc(){
_cflags_size="-O2 -Munroll=c:1 $opt_common"
_cflags_noopt="-O1"
_flags_filter=pgi_flags
+ elif $_cc 2>&1 | grep Microsoft | grep Assembler | grep -q ARM ; then
+ _type=armasm
+ _ident=$($_cc | head -n1)
+ _flags="-nologo -ignore 4509"
elif $_cc 2>&1 | grep -q Microsoft; then
_type=msvc
_ident=$($cc 2>&1 | head -n1)
--
1.8.1.2
Martin Storsjö
2014-08-09 19:48:29 UTC
Permalink
---
This goes on top of Diego's RFC patch.
---
configure | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 4d2439e..877f240 100755
--- a/configure
+++ b/configure
@@ -3782,17 +3782,18 @@ if enabled_any arm aarch64 || enabled_all ppc altivec && enabled asm; then
nogas=:
enabled_any arm aarch64 && nogas=die
enabled_all ppc altivec && nogas=warn
+ as_noop=-v

- case $as_type
- arm*) gaspp_as_type=armasm ;;
+ case $as_type in
+ arm*) gaspp_as_type=armasm; as_noop=-h ;;
gcc) gaspp_as_type=gas ;;
*) gaspp_as_type=$as_type ;;
esac

[ $target_os = "darwin" ] && gaspp_as_type="apple-$as_type"

- check_cmd gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type &&
- gas="gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type $as"
+ check_cmd gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type -- $as $as_noop &&
+ gas="gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type -- $as"

if ! check_gas ; then
as=${gas:=$as}
--
1.8.1.2
Diego Biurrun
2014-08-09 20:12:37 UTC
Permalink
Post by Martin Storsjö
---
This goes on top of Diego's RFC patch.
---
configure | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
LGTM

Diego
Janne Grunau
2014-08-10 10:16:10 UTC
Permalink
Post by Martin Storsjö
---
This goes on top of Diego's RFC patch.
---
configure | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index 4d2439e..877f240 100755
--- a/configure
+++ b/configure
@@ -3782,17 +3782,18 @@ if enabled_any arm aarch64 || enabled_all ppc altivec && enabled asm; then
enabled_any arm aarch64 && nogas=die
enabled_all ppc altivec && nogas=warn
+ as_noop=-v
- case $as_type
- arm*) gaspp_as_type=armasm ;;
+ case $as_type in
+ arm*) gaspp_as_type=armasm; as_noop=-h ;;
gcc) gaspp_as_type=gas ;;
*) gaspp_as_type=$as_type ;;
esac
[ $target_os = "darwin" ] && gaspp_as_type="apple-$as_type"
- check_cmd gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type &&
- gas="gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type $as"
+ check_cmd gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type -- $as $as_noop &&
+ gas="gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type -- $as"
tested on linux and darwin with llvm/clang. clang -no-integrated-as gets
misdetected as apple-clang although it uses apple's outdated gnu as.

I'm not sure how we can fix that. In practice this doesn't matter since
-as-type apple-gas and apple-clang doesn't seem to make a difference.
Also Xcode 5.1's 'clang -no-integrated-as' can't be used as compiler
since it produces asm apple's gas can't handle.

I have no setup to test apple's gcc-4.2 with gas.

patch ok

Janne
Martin Storsjö
2014-08-10 11:14:23 UTC
Permalink
Post by Janne Grunau
Post by Martin Storsjö
---
This goes on top of Diego's RFC patch.
---
configure | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index 4d2439e..877f240 100755
--- a/configure
+++ b/configure
@@ -3782,17 +3782,18 @@ if enabled_any arm aarch64 || enabled_all ppc altivec && enabled asm; then
enabled_any arm aarch64 && nogas=die
enabled_all ppc altivec && nogas=warn
+ as_noop=-v
- case $as_type
- arm*) gaspp_as_type=armasm ;;
+ case $as_type in
+ arm*) gaspp_as_type=armasm; as_noop=-h ;;
gcc) gaspp_as_type=gas ;;
*) gaspp_as_type=$as_type ;;
esac
[ $target_os = "darwin" ] && gaspp_as_type="apple-$as_type"
- check_cmd gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type &&
- gas="gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type $as"
+ check_cmd gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type -- $as $as_noop &&
+ gas="gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type -- $as"
tested on linux and darwin with llvm/clang. clang -no-integrated-as gets
misdetected as apple-clang although it uses apple's outdated gnu as.
I'm not sure how we can fix that. In practice this doesn't matter since
-as-type apple-gas and apple-clang doesn't seem to make a difference.
Also Xcode 5.1's 'clang -no-integrated-as' can't be used as compiler
since it produces asm apple's gas can't handle.
I have no setup to test apple's gcc-4.2 with gas.
Tested, almost works, requires the following fixup:

- [ $target_os = "darwin" ] && gaspp_as_type="apple-$as_type"
+ [ $target_os = "darwin" ] && gaspp_as_type="apple-$gaspp_as_type"

With that, all in all, all issues related to these patches should be
resolved, and all of it can be pushed, no?

// Martin
Janne Grunau
2014-08-10 12:17:40 UTC
Permalink
Post by Martin Storsjö
Post by Janne Grunau
I have no setup to test apple's gcc-4.2 with gas.
- [ $target_os = "darwin" ] && gaspp_as_type="apple-$as_type"
+ [ $target_os = "darwin" ] && gaspp_as_type="apple-$gaspp_as_type"
With that, all in all, all issues related to these patches should be
resolved, and all of it can be pushed, no?
I think so. Since it requires a recentish gas-preprocessor please change
the nogas message to 'install/update'

Most of my fate configs needs to have the explicit --as removed.

Janne
Martin Storsjö
2014-08-10 13:02:45 UTC
Permalink
Post by Janne Grunau
Post by Martin Storsjö
Post by Janne Grunau
I have no setup to test apple's gcc-4.2 with gas.
- [ $target_os = "darwin" ] && gaspp_as_type="apple-$as_type"
+ [ $target_os = "darwin" ] && gaspp_as_type="apple-$gaspp_as_type"
With that, all in all, all issues related to these patches should be
resolved, and all of it can be pushed, no?
I think so. Since it requires a recentish gas-preprocessor please change
the nogas message to 'install/update'
Ok, will do.
Post by Janne Grunau
Most of my fate configs needs to have the explicit --as removed.
At least for armasm, the explicit --as should still work, since that one
passes all tests, so it never goes on to actually try the fallback
suggested by configure.

// Martin
Janne Grunau
2014-08-10 13:08:23 UTC
Permalink
Post by Martin Storsjö
Post by Janne Grunau
Most of my fate configs needs to have the explicit --as removed.
At least for armasm, the explicit --as should still work, since that
one passes all tests, so it never goes on to actually try the
fallback suggested by configure.
same is true for my configs, I hope. There iss non-written '... to test
the fallback gas-preprocesser mode'.

Janne

Luca Barbato
2014-08-09 19:51:36 UTC
Permalink
Post by Martin Storsjö
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
index 7e3f6ff..4d2439e 100755
--- a/configure
+++ b/configure
@@ -2881,6 +2881,10 @@ probe_cc(){
_cflags_size="-O2 -Munroll=c:1 $opt_common"
_cflags_noopt="-O1"
_flags_filter=pgi_flags
+ elif $_cc 2>&1 | grep Microsoft | grep Assembler | grep -q ARM ; then
+ _type=armasm
+ _ident=$($_cc | head -n1)
+ _flags="-nologo -ignore 4509"
elif $_cc 2>&1 | grep -q Microsoft; then
_type=msvc
_ident=$($cc 2>&1 | head -n1)
Looks ok.
Martin Storsjö
2014-08-09 19:54:19 UTC
Permalink
Post by Martin Storsjö
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
index 7e3f6ff..4d2439e 100755
--- a/configure
+++ b/configure
@@ -2881,6 +2881,10 @@ probe_cc(){
_cflags_size="-O2 -Munroll=c:1 $opt_common"
_cflags_noopt="-O1"
_flags_filter=pgi_flags
+ elif $_cc 2>&1 | grep Microsoft | grep Assembler | grep -q ARM ; then
+ _type=armasm
+ _ident=$($_cc | head -n1)
+ _flags="-nologo -ignore 4509"
Amended locally with a description of what error 4509 is ("This form of
conditional instruction is deprecated").

(Also amended and removed the stray space before ; in "elif .. ; then".

// Martin
Diego Biurrun
2014-08-09 20:11:37 UTC
Permalink
Post by Martin Storsjö
---
configure | 4 ++++
1 file changed, 4 insertions(+)
OK

Diego
Janne Grunau
2014-08-10 10:03:31 UTC
Permalink
Post by Martin Storsjö
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
index 7e3f6ff..4d2439e 100755
--- a/configure
+++ b/configure
@@ -2881,6 +2881,10 @@ probe_cc(){
_cflags_size="-O2 -Munroll=c:1 $opt_common"
_cflags_noopt="-O1"
_flags_filter=pgi_flags
+ elif $_cc 2>&1 | grep Microsoft | grep Assembler | grep -q ARM ; then
do you expect the order of the order of the three words to change? if
not please use grep -q 'Microsoft.*Assembler.*ARM' assuming that is th
correct order

otherwise ok

Janne
Loading...