Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote:
unfortunately, Solaris/SPARC results are miserable:
So without further investigation, we cannot use the leb128 directives
with Solaris/SPARC as.
I think Andrew was running GCN (not sure of the results there)
- but, I suppose that the simplest modification is to do
elif … target is darwin
and make it so that other (non-GNU-as) platforms have to opt in.
Agreed: that's certainly the safest option given that we're in stage3.
While it would be nice to be able to use the leb128 directives, I
wouldn't consider this crucial.
I’ll make a version that does this and test it locally.
Great, thanks.
testing this (which ought to be easy for GCN to opt into if wanted):
diff --git a/gcc/configure.ac b/gcc/configure.ac
index cc27d099f00..d9aa36d7f24 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3114,6 +3114,8 @@ AC_MSG_RESULT($gcc_cv_ld_ro_rw_mix)
gcc_AC_INITFINI_ARRAY
# Check if we have .[us]leb128, and support symbol arithmetic with it.
+# Some assemblers based on older GAS have a bug when the MSB is set for
+# a 64b value and used in a uleb128.
gcc_GAS_CHECK_FEATURE([.sleb128 and .uleb128], gcc_cv_as_leb128,
[elf,2,11,0],,
[ .data
@@ -3121,6 +3123,7 @@ gcc_GAS_CHECK_FEATURE([.sleb128 and .uleb128],
gcc_cv_as_leb128,
L1:
.uleb128 1280
.sleb128 -1010
+ .uleb128 0x8000000000000000
L2:],
[[# GAS versions before 2.11 do not support uleb128,
# despite appearing to.
@@ -3137,6 +3140,13 @@ L2:],
then :
else gcc_cv_as_leb128=yes
fi
+ else
+ # Allow targets to opt in if the leb128 test above is adequate to
+ # indicate it may be used.
+ case "$target" in
+ *-*-darwin*) gcc_cv_as_leb128=yes ;;
+ *) ;;
+ esac
fi]],
[AC_DEFINE(HAVE_AS_LEB128, 1,
[Define if your assembler supports .sleb128 and .uleb128.])],