Don't try to use with --disable-shared (PR bootstrap/65725)

Message ID yddwooh677e.fsf@CeBiTec.Uni-Bielefeld.DE
State New
Headers show
  • Don't try to use with --disable-shared (PR bootstrap/65725)
Related show

Commit Message

Rainer Orth Dec. 10, 2018, 9:51 a.m.
When configuring with --disable-shared, Solaris bootstrap with the
system ld fails since is missing.  This is no wonder,
given that the file is only generated with --enable-shared.  The
following patch, from the PR, fixes this.

Bootstrapped on amd64-pc-solaris2.11, installed on mainline.

There were many unrelated issues, usually occuring on Linux as well as
Solaris, for a --disable-shared configuration, which I'll either fix or
report separately.


Rainer Orth, Center for Biotechnology, Bielefeld University

2018-12-09  Fredrik Nyström  <>

	PR bootstrap/65725
	* config/sol2.h: Only use if


# HG changeset patch
# Parent  aefe43ddbbcf7dca119fa6cb2121526461337953
Don't try to use with --disable-shared (PR bootstrap/65725)

diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
--- a/gcc/config/sol2.h
+++ b/gcc/config/sol2.h
@@ -397,7 +397,7 @@  along with GCC; see the file COPYING3.  
 #define SYSROOT_SPEC "-z sysroot=%R"
-#ifndef USE_GLD
+#if !defined(USE_GLD) && defined(ENABLE_SHARED_LIBGCC)
 /* With Sun ld, use mapfile to enforce direct binding to libgcc_s unwinder.  */