diff mbox

[build] Restore Sun as COMDAT group support

Message ID ydd61hygc5w.fsf@lokon.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Aug. 12, 2014, 11:50 a.m. UTC
While looking at another failure, I noticed that COMDAT group support on
Solaris with Sun as has been accidentally disabled for quite some time
by this patch:

	https://gcc.gnu.org/ml/gcc-patches/2012-08/msg01847.html

Unfortunately, the fix was anything but obvious: by setting
gcc_cv_as_comdat_group_group to no *before* the Solaris test, it
effectively disabled COMDAT group on that platform ;-(

This can be fixed by providing the no default only *after* the Solaris
test has been run: for all other targets, this is a no-op, on Solaris it
allows the test to do its work.

Bootstrapped without regressions on i386-pc-solaris2.11 and
sparc-sun-solaris2.11, no Solaris 10 testing necessary since COMDAT
group with as is disabled there due to missing linker support.

One test started to FAIL after this change:
g++.dg/debug/dwarf2/nested-4.C.  The test was untested before due to no
COMDAT support; will submit a fix shortly.

Will commit to mainline shortly.

	Rainer

2014-08-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* configure.ac (gcc_cv_as_comdat_group_group): Only default to no
	if unset.
	* configure: Regenerate.
diff mbox

Patch

# HG changeset patch
# Parent 4db8e90a5543cdee793f797fd94cb4587105f89e
Restore Sun as COMDAT group support

diff --git a/gcc/configure.ac b/gcc/configure.ac
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2787,9 +2787,6 @@  else
  if test $gcc_cv_as_comdat_group_percent = yes; then
    gcc_cv_as_comdat_group_group=no
  else
-   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.
      *-*-solaris2*)
@@ -2816,6 +2813,9 @@  else
          ,, [$conftest_s])
        ;;
    esac
+   if test -z "${gcc_cv_as_comdat_group_group+set}"; then
+     gcc_cv_as_comdat_group_group=no
+   fi
  fi
 fi
 if test x"$ld_is_gold" = xyes; then