diff mbox series

Assuming the working GNU assembler with --with-gnu-as

Message ID 20240131185432.354052-1-hjl.tools@gmail.com
State New
Headers show
Series Assuming the working GNU assembler with --with-gnu-as | expand

Commit Message

H.J. Lu Jan. 31, 2024, 6:54 p.m. UTC
When configuring GCC with

--target=TARGET

to build a cross compiler to reproduce a compiler bug, as and collect have

ORIGINAL_AS_FOR_TARGET=""

As the result, many target features are disabled which makes it almost
impossible to reproduce the bug.  Without assembler, the GCC build won't
finish and the run-time libraries won't build.  But the GCC itself can
be built.  It is very useful for debugging GCC with a cross compiler.
Enable GNU assembler features for --with-gnu-as if assembler isn't
available.

	PR target/113684
	* acinclude.m4 (gcc_GAS_CHECK_FEATURE): Assuming the working GNU
	assembler for --with-gnu-as if assembler isn't available.
	* configure: Regenerated.
---
 gcc/acinclude.m4 |   3 +
 gcc/configure    | 492 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 495 insertions(+)
diff mbox series

Patch

diff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4
index 425146719cf..3c959748f97 100644
--- a/gcc/acinclude.m4
+++ b/gcc/acinclude.m4
@@ -493,6 +493,9 @@  AC_CACHE_CHECK([assembler for $1], [$2],
       cat conftest.s >&AS_MESSAGE_LOG_FD
     fi
     rm -f conftest.o conftest.s
+  elif test x$gcc_cv_as = x -a x$gas_flag = xyes ; then
+    AC_MSG_WARN([Assume the working GNU assembler])
+    [$2]=yes
   fi])
 ifelse([$6],,,[dnl
 if test $[$2] = yes; then