From owner-p4-projects@FreeBSD.ORG Tue Mar 23 23:02:33 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BAA8016A4D0; Tue, 23 Mar 2004 23:02:32 -0800 (PST) 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 8AA2716A4CE for ; Tue, 23 Mar 2004 23:02:32 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81A2443D46 for ; Tue, 23 Mar 2004 23:02:32 -0800 (PST) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i2O72WGe068419 for ; Tue, 23 Mar 2004 23:02:32 -0800 (PST) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i2O72V03068407 for perforce@freebsd.org; Tue, 23 Mar 2004 23:02:31 -0800 (PST) (envelope-from peter@freebsd.org) Date: Tue, 23 Mar 2004 23:02:31 -0800 (PST) Message-Id: <200403240702.i2O72V03068407@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 49612 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: Wed, 24 Mar 2004 07:02:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=49612 Change 49612 by peter@peter_overcee on 2004/03/23 23:02:03 Tidy up some more loose ends. Make libstdc++ build ok by actually passing the correct args in. Initial pass at tuning the 32 bit code for the known minimum cpu type. Affected files ... .. //depot/projects/hammer/build32.sh#6 edit Differences ... ==== //depot/projects/hammer/build32.sh#6 (text+kox) ==== @@ -1,5 +1,5 @@ #! /bin/sh -# $P4: //depot/projects/hammer/build32.sh#5 $ +# $P4: //depot/projects/hammer/build32.sh#6 $ # # This script is for running on a self-hosted amd64 machine, with an up-to-date # world and toolchain etc. ie: the installed world is assumed to match the sources. @@ -20,28 +20,32 @@ chflags -R noschg /tmp/i386 rm -rf /tmp/i386 +CCARGS="-m32 -march=athlon-xp -msse2 -mfancy-math-387 -I/tmp/i386/root/usr/include -L/usr/lib32 -B/usr/lib32" +CXXARGS="-m32 -march=athlon-xp -msse2 -mfancy-math-387 -I/tmp/i386/root/usr/include/c++/3.3 -I/tmp/i386/root/usr/include -L/usr/lib32 -B/usr/lib32" + # and a place to put the alternate include tree into. mkdir -p /tmp/i386/root -make MAKEOBJDIRPREFIX=/tmp/i386 DESTDIR=/tmp/i386/root MACHINE_ARCH=i386 hierarchy +make -s MAKEOBJDIRPREFIX=/tmp/i386 DESTDIR=/tmp/i386/root MACHINE_ARCH=i386 hierarchy # Now build includes -make MAKEOBJDIRPREFIX=/tmp/i386 DESTDIR=/tmp/i386/root MACHINE_ARCH=i386 obj -make MAKEOBJDIRPREFIX=/tmp/i386 DESTDIR=/tmp/i386/root MACHINE_ARCH=i386 includes +make -s MAKEOBJDIRPREFIX=/tmp/i386 DESTDIR=/tmp/i386/root MACHINE_ARCH=i386 obj +make -s MAKEOBJDIRPREFIX=/tmp/i386 DESTDIR=/tmp/i386/root MACHINE_ARCH=i386 includes # libncurses needs a build-tools pass first. I wish build-tools was a recursive target. -(cd lib/libncurses; make MAKEOBJDIRPREFIX=/tmp/i386 build-tools) +(cd lib/libncurses; make -s MAKEOBJDIRPREFIX=/tmp/i386 build-tools) -# Now the libraries. This doesn't work for bind, gnuregex and stdc++ yet. hence -k -make -DNOMAN -DNODOC -DNOINFO MAKEOBJDIRPREFIX=/tmp/i386 LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 MACHINE_ARCH=i386 CC="cc -m32 -I/tmp/i386/root/usr/include -L/usr/lib32 -B/usr/lib32" CXX="c++ -m32 -I/tmp/i386/root/usr/include/c++/3.3 -L/usr/lib32 -B/usr/lib32" LD="ld -m elf_i386_fbsd -Y P,/usr/lib32" -k libraries +# Now the libraries. This doesn't work for gnuregex yet. hence -k. +# libbind is just an internal target, ignore it. +make -s -DNO_BIND -DNOMAN -DNODOC -DNOINFO MAKEOBJDIRPREFIX=/tmp/i386 LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 MACHINE_ARCH=i386 CC="cc $CCARGS" CXX="c++ $CXXARGS" LD="ld -m elf_i386_fbsd -Y P,/usr/lib32" -k libraries -# bind isn't a problem, its an internal no-install lib, so let it fail. -# libstdc++ is a curious one. it looks like "c++ -m32" doesn't work. -# Hack to fix gnuregex which does evil hacks to the -I paths. -(cd gnu/lib/libregex; make -DNOMAN -DNODOC -DNOINFO MAKEOBJDIRPREFIX=/tmp/i386 LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 MACHINE_ARCH=i386 CC="cc -m32 -I/tmp/i386/root/usr/include/gnu -I/tmp/i386/root/usr/include -L/usr/lib32 -B/usr/lib32" CXX="c++ -m32 -I/tmp/i386/root/usr/include/c++/3.3 -L/usr/lib32 -B/usr/lib32" LD="ld -m elf_i386_fbsd -Y P,/usr/lib32" all install) +# Hack to fix gnuregex which does hacks to the -I path based on $DESTDIR. But, we cannot +# use DESTDIR during the libraries target, because we're just using alternate includes, not +# an alternate install directory. +(cd gnu/lib/libregex; make -s -DNOMAN -DNODOC -DNOINFO MAKEOBJDIRPREFIX=/tmp/i386 LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 MACHINE_ARCH=i386 CC="cc -I/tmp/i386/root/usr/include/gnu $CCARGS" CXX="c++ $CXXARGS" LD="ld -m elf_i386_fbsd -Y P,/usr/lib32" all install) # and now that we have enough libraries, build ld-elf32.so.1 cd libexec/rtld-elf -make -DNOMAN -DNODOC -DNOINFO PROG=ld-elf32.so.1 MAKEOBJDIRPREFIX=/tmp/i386 LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 MACHINE_ARCH=i386 CC="cc -m32 -I/tmp/i386/root/usr/include -L/usr/lib32 -B/usr/lib32 -DCOMPAT_32BIT" LD="ld -m elf_i386_fbsd -Y P,/usr/lib32" obj -make -DNOMAN -DNODOC -DNOINFO PROG=ld-elf32.so.1 MAKEOBJDIRPREFIX=/tmp/i386 LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 MACHINE_ARCH=i386 CC="cc -m32 -I/tmp/i386/root/usr/include -L/usr/lib32 -B/usr/lib32 -DCOMPAT_32BIT" LD="ld -m elf_i386_fbsd -Y P,/usr/lib32" depend -make -DNOMAN -DNODOC -DNOINFO PROG=ld-elf32.so.1 MAKEOBJDIRPREFIX=/tmp/i386 LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 MACHINE_ARCH=i386 CC="cc -m32 -I/tmp/i386/root/usr/include -L/usr/lib32 -B/usr/lib32 -DCOMPAT_32BIT" LD="ld -m elf_i386_fbsd -Y P,/usr/lib32" -make -DNOMAN -DNODOC -DNOINFO PROG=ld-elf32.so.1 MAKEOBJDIRPREFIX=/tmp/i386 LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 MACHINE_ARCH=i386 CC="cc -m32 -I/tmp/i386/root/usr/include -L/usr/lib32 -B/usr/lib32 -DCOMPAT_32BIT" LD="ld -m elf_i386_fbsd -Y P,/usr/lib32" install +make -s -DNOMAN -DNODOC -DNOINFO PROG=ld-elf32.so.1 MAKEOBJDIRPREFIX=/tmp/i386 LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 MACHINE_ARCH=i386 CC="cc $CCARGS -DCOMPAT_32BIT" LD="ld -m elf_i386_fbsd -Y P,/usr/lib32" obj +make -s -DNOMAN -DNODOC -DNOINFO PROG=ld-elf32.so.1 MAKEOBJDIRPREFIX=/tmp/i386 LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 MACHINE_ARCH=i386 CC="cc $CCARGS -DCOMPAT_32BIT" LD="ld -m elf_i386_fbsd -Y P,/usr/lib32" depend +make -s -DNOMAN -DNODOC -DNOINFO PROG=ld-elf32.so.1 MAKEOBJDIRPREFIX=/tmp/i386 LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 MACHINE_ARCH=i386 CC="cc $CCARGS -DCOMPAT_32BIT" LD="ld -m elf_i386_fbsd -Y P,/usr/lib32" +make -s -DNOMAN -DNODOC -DNOINFO PROG=ld-elf32.so.1 MAKEOBJDIRPREFIX=/tmp/i386 LIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32 MACHINE_ARCH=i386 CC="cc $CCARGS -DCOMPAT_32BIT" LD="ld -m elf_i386_fbsd -Y P,/usr/lib32" install