diff mbox series

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

Message ID yddwooh677e.fsf@CeBiTec.Uni-Bielefeld.DE
State New
Headers show
Series Don't try to use libgcc-unwind.map with --disable-shared (PR bootstrap/65725) | expand

Commit Message

Rainer Orth Dec. 10, 2018, 9:51 a.m. UTC
When configuring with --disable-shared, Solaris bootstrap with the
system ld fails since libgcc-unwind.map 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
diff mbox series

Patch

# HG changeset patch
# Parent  aefe43ddbbcf7dca119fa6cb2121526461337953
Don't try to use libgcc-unwind.map 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"
 #endif
 
-#ifndef USE_GLD
+#if !defined(USE_GLD) && defined(ENABLE_SHARED_LIBGCC)
 /* With Sun ld, use mapfile to enforce direct binding to libgcc_s unwinder.  */
 #define LINK_LIBGCC_MAPFILE_SPEC \
   "%{shared|shared-libgcc:-M %slibgcc-unwind.map}"