diff options
author | obrien <obrien@FreeBSD.org> | 2004-08-24 17:33:42 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2004-08-24 17:33:42 +0000 |
commit | 7c80b82fd96b69556250536af8036d1bcd8d4dbd (patch) | |
tree | 7c9342700757b48f255806e7da0b363282ff2241 | |
parent | d13034e2e16bd5e689aed235c0c14c76a2dee231 (diff) | |
download | FreeBSD-src-7c80b82fd96b69556250536af8036d1bcd8d4dbd.zip FreeBSD-src-7c80b82fd96b69556250536af8036d1bcd8d4dbd.tar.gz |
Update for latest make(1) changes.
Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
-rw-r--r-- | tools/lib32/build32.sh | 56 |
1 files changed, 39 insertions, 17 deletions
diff --git a/tools/lib32/build32.sh b/tools/lib32/build32.sh index f6eed16..b08a020 100644 --- a/tools/lib32/build32.sh +++ b/tools/lib32/build32.sh @@ -11,41 +11,63 @@ # XXX installation of includes. ie: it will re-install some files in # XXX /usr/include for you. -mkdir /lib32 -mkdir /usr/lib32 -mkdir /usr/local/lib32 -mkdir /usr/X11R6/lib32 +mkdir -p /lib32 +mkdir -p /usr/lib32 +mkdir -p /usr/local/lib32 +mkdir -p /usr/X11R6/lib32 + +export MAKEOBJDIRPREFIX=/tmp/i386 +mkdir -p $MAKEOBJDIRPREFIX # Set up an obj tree -chflags -R noschg /tmp/i386 -rm -rf /tmp/i386 +chflags -R noschg $MAKEOBJDIRPREFIX +rm -rf $MAKEOBJDIRPREFIX +mkdir -p $MAKEOBJDIRPREFIX 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 -s MAKEOBJDIRPREFIX=/tmp/i386 DESTDIR=/tmp/i386/root MACHINE_ARCH=i386 hierarchy +mkdir -p $MAKEOBJDIRPREFIX/root + +export MACHINE_ARCH=i386 +export DESTDIR=$MAKEOBJDIRPREFIX/root + +make -s hierarchy # Now build 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 +make -s obj +make -s includes + +unset MACHINE_ARCH +unset DESTDIR # libncurses needs a build-tools pass first. I wish build-tools was a recursive target. -(cd lib/libncurses; make -s MAKEOBJDIRPREFIX=/tmp/i386 build-tools) +(cd lib/libncurses; make -s build-tools) # 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 +export LIBDIR=/usr/lib32 +export SHLIBDIR=/usr/lib32 +export MACHINE_ARCH=i386 +export CC="cc $CCARGS" +export CXX="c++ $CXXARGS" +export LD="ld -m elf_i386_fbsd -Y P,/usr/lib32" +make -s -DNO_BIND -DNOMAN -DNODOC -DNOINFO -k libraries # 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) +unset CC +export CC="cc -I/tmp/i386/root/usr/include/gnu $CCARGS" +(cd gnu/lib/libregex; make -k -DNOMAN -DNODOC -DNOINFOall install) # and now that we have enough libraries, build ld-elf32.so.1 cd libexec/rtld-elf -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 +export PROG=ld-elf32.so.1 +unset CC +export CC="cc $CCARGS -DCOMPAT_32BIT" +make -s -DNOMAN -DNODOC -DNOINFO -k obj +make -s -DNOMAN -DNODOC -DNOINFO -k depend +make -s -DNOMAN -DNODOC -DNOINFO -k +make -s -DNOMAN -DNODOC -DNOINFO -k install |