Index: gnu/lib/libgcc/Makefile =========================================================================== --- gnu/lib/libgcc/Makefile 2003/06/04 16:20:16 #13 +++ gnu/lib/libgcc/Makefile 2003/06/04 16:20:16 @@ -12,6 +12,9 @@ #SHLIB_MAJOR= 1 +# We need to install libgcc_pic.a as well, for use by shared libs. +INSTALL_PIC_ARCHIVE= yes + # # XXX This is a hack, but it seems to work. # libgcc2.a is meant to be compiled by *this* version of gcc. Index: gnu/lib/libstdc++/Makefile =========================================================================== --- gnu/lib/libstdc++/Makefile 2003/06/04 16:20:16 #18 +++ gnu/lib/libstdc++/Makefile 2003/06/04 16:20:16 @@ -8,11 +8,6 @@ ${SRCDIR}/config/locale/generic ${SRCDIR} ${SRCDIR}/std \ ${SUPDIR} ${GCCDIR} -.if ${MACHINE_ARCH} == "amd64" -NOPIC= broken # need libgcc.so or libgcc_pic.a -NOSHARED= broken -.endif - #SUBDIR= doc LIB= stdc++ Index: gnu/usr.bin/cc/cc_tools/freebsd-native.h =========================================================================== --- gnu/usr.bin/cc/cc_tools/freebsd-native.h 2003/06/04 16:20:16 #13 +++ gnu/usr.bin/cc/cc_tools/freebsd-native.h 2003/06/04 16:20:16 @@ -48,7 +48,8 @@ /* For the native system compiler, we actually build libgcc in a profiled version. So we should use it with -pg. */ -#define LIBGCC_SPEC "%{!pg: -lgcc} %{pg: -lgcc_p}" +#define LIBGCC_SPEC "%{shared: -lgcc_pic} \ + %{!shared: %{!pg: -lgcc} %{pg: -lgcc_p}}" #define LIBSTDCXX_PROFILE "-lstdc++_p" #define MATH_LIBRARY_PROFILE "-lm_p" #define FORTRAN_LIBRARY_PROFILE "-lg2c_p" Index: share/mk/bsd.libnames.mk =========================================================================== --- share/mk/bsd.libnames.mk 2003/06/04 16:20:16 #21 +++ share/mk/bsd.libnames.mk 2003/06/04 16:20:16 @@ -38,6 +38,7 @@ LIBFTPIO?= ${DESTDIR}${LIBDIR}/libftpio.a LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a LIBGCC?= ${DESTDIR}${LIBDIR}/libgcc.a +LIBGCC_PIC?= ${DESTDIR}${LIBDIR}/libgccc_pic.a LIBGEOM?= ${DESTDIR}${LIBDIR}/libgeom.a LIBGNUREGEX?= ${DESTDIR}${LIBDIR}/libgnuregex.a LIBGSSAPI?= ${DESTDIR}${LIBDIR}/libgssapi.a # XXX in secure dist, not base