Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Mar 2004 23:02:31 -0800 (PST)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 49612 for review
Message-ID:  <200403240702.i2O72V03068407@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403240702.i2O72V03068407>