https://gcc.gnu.org/g:786cab9c4b7539eaa9189853f709c0462ac3fa51
commit r17-2041-g786cab9c4b7539eaa9189853f709c0462ac3fa51 Author: Rainer Orth <[email protected]> Date: Wed Jul 1 10:36:00 2026 +0200 build: Remove --with-gnu-as The removal of HAVE_GNU_AS and the gas variable in config.gcc etc. also makes the --with-gnu-as configure option unnecessary. This patch removes it together with gas_flag. The latter is also used to annotate the DEFAULT_ASSEMBLER message in configure.ac. Given that the vast majority of configurations uses gas, this doesn't carry much information and is also removed. 2026-04-13 Rainer Orth <[email protected]> gcc: * configure.ac: Remove --with-gnu-as, gas_flag. * configure: Regenerate. * config.gcc: Remove gas_flag. * doc/install.texi (Configuration, --with-gnu-as): Remove. (Specific, hppa64-hp-hpux11*): Remove --with-gnu-as reference. (Specific, ia64-*-hpux*): Likewise. Recomment --with-as instead. * doc/invoke.texi (IA-64 Options, -mgnu-as): Remove comment. contrib: * config-list.mk (sparc64-sun-solaris2.11): Remove --with-gnu-as. contrib/regression: * btest-gcc.sh (withopt): Remove --with-gnu-as. Diff: --- contrib/config-list.mk | 2 +- contrib/regression/btest-gcc.sh | 2 +- gcc/config.gcc | 4 ---- gcc/configure | 25 +++---------------------- gcc/configure.ac | 14 +------------- gcc/doc/install.texi | 33 ++++++--------------------------- gcc/doc/invoke.texi | 2 -- 7 files changed, 12 insertions(+), 70 deletions(-) diff --git a/contrib/config-list.mk b/contrib/config-list.mk index 54ca15a78089..795e97d56fa7 100644 --- a/contrib/config-list.mk +++ b/contrib/config-list.mk @@ -99,7 +99,7 @@ LIST = \ sh-rtems sh-wrs-vxworks sparc-elf \ sparc-leon-elf sparc-rtems sparc-linux-gnu \ sparc-leon3-linux-gnuOPT-enable-target=all sparc-netbsdelf \ - sparc64-sun-solaris2.11OPT-with-gnu-ldOPT-with-gnu-asOPT-enable-threads=posix \ + sparc64-sun-solaris2.11OPT-with-gnu-ldOPT-enable-threads=posix \ sparc-wrs-vxworks sparc64-elf sparc64-rtems sparc64-linux \ sparc64-netbsd sparc64-openbsd \ v850e1-elf v850e-elf v850-elf v850-rtems vax-linux-gnu \ diff --git a/contrib/regression/btest-gcc.sh b/contrib/regression/btest-gcc.sh index 492e03e0d5c2..b198e02952c7 100755 --- a/contrib/regression/btest-gcc.sh +++ b/contrib/regression/btest-gcc.sh @@ -138,7 +138,7 @@ if [ $H_HOST = $H_TARGET ] ; then make $dashj all || exit 1 fi else - withopt="--with-gnu-ld --with-gnu-as" + withopt="--with-gnu-ld" case "$H_TARGET" in *-linux*) ;; *) withopt="$withopt --with-newlib";; diff --git a/gcc/config.gcc b/gcc/config.gcc index 3c1b40d6f7cd..d1269d40f9e4 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -55,10 +55,6 @@ # $default_gnu_indirect_function is set to # "no" except for targets which are known to be OK. # -# gas_flag One of yes, no or "" depending on whether GNU as was -# explicitly requested, explicitly not requested or -# unspecified. -# # gnu_ld_flag One of yes, no or "" depending on whether GNU ld was # explicitly requested, explicitly not requested or # unspecified. diff --git a/gcc/configure b/gcc/configure index 57f9498b961b..5f598d43978c 100755 --- a/gcc/configure +++ b/gcc/configure @@ -975,7 +975,6 @@ with_gnu_ld with_ld with_demangler_in_ld with_dsymutil -with_gnu_as with_as with_windres enable_largefile @@ -1875,7 +1874,6 @@ Optional Packages: --with-demangler-in-ld try to use demangler in GNU ld --with-dsymutil arrange to use the specified dsymutil (full pathname) - --with-gnu-as arrange to work with GNU as --with-as arrange to use the specified as (full pathname) --with-windres arrange to use the specified windres (full pathname) --with-stack-clash-protection-guard-size=size @@ -4033,16 +4031,6 @@ fi # Find default assembler # ---------------------- -# With GNU as - -# Check whether --with-gnu-as was given. -if test "${with_gnu_as+set}" = set; then : - withval=$with_gnu_as; gas_flag="$with_gnu_as" -else - gas_flag= -fi - - # Check whether --with-as was given. if test "${with_as+set}" = set; then : @@ -4052,8 +4040,6 @@ fi if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then if test ! -x "$DEFAULT_ASSEMBLER"; then as_fn_error $? "cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" "$LINENO" 5 - elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then - gas_flag=yes fi cat >>confdefs.h <<_ACEOF @@ -4065,13 +4051,8 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a default assembler was specified" >&5 $as_echo_n "checking whether a default assembler was specified... " >&6; } if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then - if test x"$gas_flag" != x"yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER)" >&5 $as_echo "yes ($DEFAULT_ASSEMBLER)" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 -$as_echo "yes ($DEFAULT_ASSEMBLER - GNU as)" >&6; } - fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -21965,7 +21946,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 21968 "configure" +#line 21949 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -22071,7 +22052,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 22074 "configure" +#line 22055 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index ab07f2cba72c..5f8866662221 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -411,20 +411,12 @@ fi # Find default assembler # ---------------------- -# With GNU as -AC_ARG_WITH(gnu-as, -[AS_HELP_STRING([--with-gnu-as], [arrange to work with GNU as])], -gas_flag="$with_gnu_as", -gas_flag=) - AC_ARG_WITH(as, [AS_HELP_STRING([--with-as], [arrange to use the specified as (full pathname)])], DEFAULT_ASSEMBLER="$with_as") if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then if test ! -x "$DEFAULT_ASSEMBLER"; then AC_MSG_ERROR([cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER]) - elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then - gas_flag=yes fi AC_DEFINE_UNQUOTED(DEFAULT_ASSEMBLER,"$DEFAULT_ASSEMBLER", [Define to enable the use of a default assembler.]) @@ -432,11 +424,7 @@ fi AC_MSG_CHECKING([whether a default assembler was specified]) if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then - if test x"$gas_flag" != x"yes"; then - AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER)]) - else - AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER - GNU as)]) - fi + AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER)]) else AC_MSG_RESULT(no) fi diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 6297e23744a5..1adb7493585d 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -1176,26 +1176,6 @@ Specify that the @emph{host} executables should be linked with the option symbols when the executables are started, and that in turn allows RELRO to mark the GOT read-only, resulting in better security. -@item @anchor{with-gnu-as}--with-gnu-as -Specify that the compiler should assume that the -assembler it finds is the GNU assembler. However, this does not modify -the rules to find an assembler and will result in confusion if the -assembler found is not actually the GNU assembler. (Confusion may also -result if the compiler finds the GNU assembler but has not been -configured with @option{--with-gnu-as}.) If you have more than one -assembler installed on your system, you may want to use this option in -connection with @option{--with-as=@var{pathname}} or -@option{--with-build-time-tools=@var{pathname}}. - -The following systems are the only ones where it makes a difference -whether you use the GNU assembler. On any other system, -@option{--with-gnu-as} has no effect. - -@itemize @bullet -@item @samp{hppa*-@var{any}-@var{any}} -@item @samp{*-*-solaris2.11} -@end itemize - @item @anchor{with-as}--with-as=@var{pathname} Specify that the compiler should use the assembler pointed to by @var{pathname}, rather than the one found by the standard rules to find @@ -4375,11 +4355,9 @@ Renesas H8/300 series of processors. Only the 64-bit @samp{hppa} target is supported on HP-UX. Support for 32-bit @samp{hppa} was discontinued in GCC 13. -We require using gas on all hppa platforms. - -It may be helpful to configure GCC with the -@uref{./configure.html#with-gnu-as,,@option{--with-gnu-as}} and -@option{--with-as=@dots{}} options to ensure that GCC can find GAS@. +We require using gas on all hppa platforms. It may be helpful to +configure GCC with the @option{--with-as=@dots{}} option to ensure +that GCC can find GAS@. The DCE thread library is not supported, so @option{--enable-threads=dce} does not work. @@ -4426,8 +4404,9 @@ later. @anchor{ia64-x-hpux} @heading ia64-*-hpux* Building GCC on this target requires the GNU Assembler. The bundled HP -assembler will not work. To prevent GCC from using the wrong assembler, -the option @option{--with-gnu-as} may be necessary. +assembler will not work. It may be helpful to configure GCC with +the @option{--with-as=@dots{}} option to ensure that GCC can find +GAS@. @html <hr /> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index dd03c6e334d6..247e95e968ff 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -27392,8 +27392,6 @@ and GNU/Linux. @item -mgnu-as @itemx -mno-gnu-as Generate (or don't) code for the GNU assembler. This is the default. -@c Also, this is the default if the configure option @option{--with-gnu-as} -@c is used. @opindex mgnu-ld @opindex mno-gnu-ld
