From owner-p4-projects@FreeBSD.ORG Fri May 23 23:53:02 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 59BC237B404; Fri, 23 May 2003 23:53:01 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AD1937B401 for ; Fri, 23 May 2003 23:53:01 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3F8543F85 for ; Fri, 23 May 2003 23:53:00 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4O6r00U031340 for ; Fri, 23 May 2003 23:53:00 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4O6r0pm031337 for perforce@freebsd.org; Fri, 23 May 2003 23:53:00 -0700 (PDT) Date: Fri, 23 May 2003 23:53:00 -0700 (PDT) Message-Id: <200305240653.h4O6r0pm031337@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31770 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2003 06:53:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=31770 Change 31770 by peter@peter_hammer on 2003/05/23 23:52:13 This is wrong, but it cant be helped while we persist with libgcc.a. libstdc references the dwarf2 unwind code, which gets pulled in from libgcc.a and is non-PIC. This Is Very Bad(TM), because there are now potentially two copies of the unwinder. It also causes a fatal error at build time on amd64. I'm pretty sure it is also responsible for some of the bogusness on the other platforms where we have TEXTREL relocations as a result. We really need the libgcc.so with the correct --version-script, since that is the official way to solve the problem. Affected files ... .. //depot/projects/hammer/gnu/lib/libgcc/Makefile#4 edit .. //depot/projects/hammer/gnu/lib/libstdc++/Makefile#6 edit .. //depot/projects/hammer/share/mk/bsd.libnames.mk#9 edit Differences ... ==== //depot/projects/hammer/gnu/lib/libgcc/Makefile#4 (text+ko) ==== @@ -10,6 +10,7 @@ LIB= gcc .endif +INSTALL_PIC_ARCHIVE= YES #SHLIB_MAJOR= 1 # ==== //depot/projects/hammer/gnu/lib/libstdc++/Makefile#6 (text+ko) ==== @@ -18,8 +18,8 @@ CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections -Wno-deprecated #LDFLAGS+= -Wl,-version-info,4:0:0 -Wl,--version-script=${SRCDIR}/src/linker.map -LDADD+= -lm -DPADD+= ${LIBM} +LDADD+= -lgcc_pic -lm +DPADD+= ${LIBGCC_PIC} ${LIBM} # libstdc++ sources (libstdc++/src/Makefile.in, do not reorder) SRCS+= globals.cc limits.cc basic_file_stdio.cc complex_io.cc ios.cc \ ==== //depot/projects/hammer/share/mk/bsd.libnames.mk#9 (text+ko) ==== @@ -38,6 +38,7 @@ LIBFTPIO?= ${DESTDIR}${LIBDIR}/libftpio.a LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a LIBGCC?= ${DESTDIR}${LIBDIR}/libgcc.a +LIBGCC_PIC?= ${DESTDIR}${LIBDIR}/libgcc_pic.a LIBGEOM?= ${DESTDIR}${LIBDIR}/libgeom.a LIBGNUREGEX?= ${DESTDIR}${LIBDIR}/libgnuregex.a LIBGSSAPI?= ${DESTDIR}${LIBDIR}/libgssapi.a # XXX in secure dist, not base