Date: Thu, 21 Oct 2010 19:56:26 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r214164 - in user/ed/compiler-rt: . contrib/llvm/tools/clang/lib/Driver gnu/usr.bin/cc/cc_tools Message-ID: <201010211956.o9LJuQMH001993@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Thu Oct 21 19:56:26 2010 New Revision: 214164 URL: http://svn.freebsd.org/changeset/base/214164 Log: Let both GCC and Clang use -lcompiler_rt instead of -lgcc. Modified: user/ed/compiler-rt/Makefile.inc1 user/ed/compiler-rt/contrib/llvm/tools/clang/lib/Driver/Tools.cpp user/ed/compiler-rt/gnu/usr.bin/cc/cc_tools/freebsd-native.h Modified: user/ed/compiler-rt/Makefile.inc1 ============================================================================== --- user/ed/compiler-rt/Makefile.inc1 Thu Oct 21 19:44:28 2010 (r214163) +++ user/ed/compiler-rt/Makefile.inc1 Thu Oct 21 19:56:26 2010 (r214164) @@ -1123,7 +1123,7 @@ libraries: # # static libgcc.a prerequisite for shared libc # -_prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc +_prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc lib/libcompiler_rt # These dependencies are not automatically generated: # @@ -1139,6 +1139,7 @@ _startup_libs+= lib/csu/${MACHINE_ARCH} _startup_libs+= lib/csu/${MACHINE_CPUARCH} .endif _startup_libs+= gnu/lib/libgcc +_startup_libs+= lib/libcompiler_rt _startup_libs+= lib/libc gnu/lib/libgcc__L: lib/libc__L Modified: user/ed/compiler-rt/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- user/ed/compiler-rt/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Thu Oct 21 19:44:28 2010 (r214163) +++ user/ed/compiler-rt/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Thu Oct 21 19:56:26 2010 (r214164) @@ -2928,7 +2928,7 @@ void freebsd::Link::ConstructJob(Compila } // FIXME: For some reason GCC passes -lgcc and -lgcc_s before adding // the default system libraries. Just mimic this for now. - CmdArgs.push_back("-lgcc"); + CmdArgs.push_back("-lcompiler_rt"); if (Args.hasArg(options::OPT_static)) { CmdArgs.push_back("-lgcc_eh"); } else { @@ -2941,7 +2941,7 @@ void freebsd::Link::ConstructJob(Compila CmdArgs.push_back("-lpthread"); CmdArgs.push_back("-lc"); - CmdArgs.push_back("-lgcc"); + CmdArgs.push_back("-lcompiler_rt"); if (Args.hasArg(options::OPT_static)) { CmdArgs.push_back("-lgcc_eh"); } else { Modified: user/ed/compiler-rt/gnu/usr.bin/cc/cc_tools/freebsd-native.h ============================================================================== --- user/ed/compiler-rt/gnu/usr.bin/cc/cc_tools/freebsd-native.h Thu Oct 21 19:44:28 2010 (r214163) +++ user/ed/compiler-rt/gnu/usr.bin/cc/cc_tools/freebsd-native.h Thu Oct 21 19:56:26 2010 (r214164) @@ -48,16 +48,16 @@ #if 0 #define LIBGCC_SPEC "%{shared: -lgcc_pic} \ - %{!shared: %{!pg: -lgcc} %{pg: -lgcc_p}}" + %{!shared: %{!pg: -lcompiler_rt} %{pg: -lgcc_p}}" #endif #define LIBSTDCXX_PROFILE "-lstdc++_p" #define MATH_LIBRARY_PROFILE "-lm_p" #define FORTRAN_LIBRARY_PROFILE "-lg2c_p" -#define LIBGCC_SPEC "-lgcc" +#define LIBGCC_SPEC "-lcompiler_rt" /* For the native system compiler, we actually build libgcc in a profiled version. So we should use it with -pg. */ -#define LIBGCC_STATIC_LIB_SPEC "%{pg: -lgcc_p;:-lgcc}" +#define LIBGCC_STATIC_LIB_SPEC "%{pg: -lgcc_p;:-lcompiler_rt}" #define LIBGCC_EH_STATIC_LIB_SPEC "%{pg: -lgcc_eh_p;:-lgcc_eh}" /* FreeBSD is 4.4BSD derived */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010211956.o9LJuQMH001993>