To-be-committed: fix configure case when assembler COMDAT group support is lacking
diff mbox

Message ID
State New
Headers show

Commit Message

Hans-Peter Nilsson Aug. 26, 2012, 10:20 p.m. UTC
If the out-of-tree target assembler supports neither:
.section .text,"axG",@progbits,.foo,comdat
(tsk tsk no leading space, though that's a red herring)
.section .text,"axG",%progbits,.foo,comdat
then gcc/ drops through into the system-specific case seen
in the patch, where for *-*-solaris2*, gcc_cv_as_comdat_group_group is
set.  (If one of the above syntaxes work, then
gcc_cv_as_comdat_group_group is forced to "no".)  For other systems,
it is not set.  In subsequent code (setting HAVE_COMDAT_GROUP), a test
of that variable for such systems is seen in the build log as an error
message from "test":
checking assembler for section merging support... yes
checking assembler for COMDAT group support (GNU as)... no
checking assembler for COMDAT group support (GNU as, %type)... no
/mnt/2/tmp/hp/testgcc/tmp/st3/gcc/gcc/configure: line 23125: test: =: unary operator expected
checking assembler for line table discriminator support... yes
I'll commit this in a while as obvious.  The idiom for testing that
the variable is set (N.B. "manual" settings are supposed to work) is
copied from the closest variant, also the least objectionable one
among the extant ones.  There are lots of variants in there. :/

	* (gcc_cv_as_comdat_group_group): Default to no.
	* configure: Regenerate.

diff mbox

Index: gcc/
--- gcc/	(revision 190682)
+++ gcc/	(working copy)
@@ -2630,6 +2630,9 @@  else
  if test $gcc_cv_as_comdat_group_percent = yes; then
+   if test -z "${gcc_cv_as_comdat_group_group+set}"; then
+     gcc_cv_as_comdat_group_group=no
+   fi
    case "${target}" in
      # Sun as uses a completely different syntax.