]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
config.gcc (*-*-freebsd*): Enable creation of libgcc_s.so.
authorLoren J. Rittle <ljrittle@acm.org>
Fri, 29 Mar 2002 22:01:18 +0000 (22:01 +0000)
committerLoren J. Rittle <ljrittle@gcc.gnu.org>
Fri, 29 Mar 2002 22:01:18 +0000 (22:01 +0000)
* config.gcc (*-*-freebsd*): Enable creation of libgcc_s.so.
* config/t-slibgcc-elf-ver (SHLIB_LC): Add macro and use it.
No functional change except ...
* config/t-slibgcc-nolc-override (SHLIB_LC): Override it.  New file.
* doc/install.texi (*-*-freebsd*): Document port configuration.

From-SVN: r51574

gcc/ChangeLog
gcc/config.gcc
gcc/config/t-slibgcc-elf-ver
gcc/config/t-slibgcc-nolc-override [new file with mode: 0644]
gcc/doc/install.texi

index 1b85c02f6c84246efa7b1b0c310a0862c21c835a..b5309a2c27420414f9966039dd03c7fe84b10b00 100644 (file)
@@ -1,3 +1,11 @@
+2002-03-29  Loren J. Rittle  <ljrittle@acm.org>
+
+       * config.gcc (*-*-freebsd*): Enable creation of libgcc_s.so.
+       * config/t-slibgcc-elf-ver (SHLIB_LC): Add macro and use it.
+       No functional change except ...
+       * config/t-slibgcc-nolc-override (SHLIB_LC): Override it.  New file.
+       * doc/install.texi (*-*-freebsd*): Document port configuration.
+
 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * Makefile.in (convert.o, calls.o, expmed.o): Update.
index edef1ff391e667291d76343355daa02589948259..80aed452d93300f211e666beb2fdfa9168d4c4e0 100644 (file)
@@ -363,7 +363,7 @@ case $machine in
        *-*-freebsd6 | *-*-freebsd[6].*) fbsd_tm_file="freebsd6.h";;
        *) echo 'Please update *-*-freebsd* in gcc/config.gcc'; exit 1;;
        esac
-       tmake_file=t-freebsd
+       tmake_file="t-slibgcc-elf-ver t-freebsd"
        xmake_file=none
        xm_defines=POSIX
        case x${enable_threads} in
@@ -371,6 +371,12 @@ case $machine in
        x | xyes | xpthreads | xposix)
                thread_file='posix'
                tmake_file="${tmake_file} t-freebsd-thread"
+               # Before 5.0, FreeBSD can't bind shared libraries to -lc
+               # when "optionally" threaded via weak pthread_* checks.
+               case $machine in
+               *-*-freebsd[34] | *-*-freebsd[34].*)
+                       tmake_file="${tmake_file} t-slibgcc-nolc-override";;
+               esac
                ;;
        *) echo 'Unknown thread configuration for FreeBSD'; exit 1;;
        esac
index 2912e0aa50ea7c9b9eff063eea6eaf473f27197f..d6c89ff8acbdbcbbf0fc59a7f932cdeb0b0ce320 100644 (file)
@@ -6,11 +6,12 @@ SHLIB_NAME = @shlib_base_name@.so
 SHLIB_SONAME = @shlib_base_name@.so.1
 SHLIB_MAP = @shlib_map_file@
 SHLIB_OBJS = @shlib_objs@
+SHLIB_LC = -lc
 
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
        -Wl,--soname=$(SHLIB_SONAME) \
        -Wl,--version-script=$(SHLIB_MAP) \
-       -o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \
+       -o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
        rm -f $(SHLIB_SONAME) && \
        $(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
 # $(slibdir) double quoted to protect it from expansion while building
diff --git a/gcc/config/t-slibgcc-nolc-override b/gcc/config/t-slibgcc-nolc-override
new file mode 100644 (file)
index 0000000..959d2cc
--- /dev/null
@@ -0,0 +1 @@
+SHLIB_LC =
index c0901a4ae93b2f00dc6dacdc0fc4726e17f022db..3e3e258bff76564735b3dea2b190724dfd24b589 100644 (file)
@@ -2079,6 +2079,8 @@ should properly complete the bootstrap).  Other CPU architectures
 supported by FreeBSD will require additional configuration tuning in, at
 the very least, both boehm-gc and libffi.
 
+Shared @file{libgcc_s.so} is now built and installed by default.
+
 @html
 </p>
 <hr>