mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-25 18:12:57 +01:00
Remove the build32.sh hack, it is now slightly broken (missing some
compile args) and would be harmful to use. Leave the README pointing to WITH_LIB32 for now.
This commit is contained in:
parent
448d1e830b
commit
c5b83a1b43
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138073
@ -1,15 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
This script is a stopgap for building tuned 32 bit (but i386 ABI compatable)
|
||||
libraries for amd64 systems. We *know* we have things like CMOV, SSE2 etc
|
||||
so take advantage of it.
|
||||
Set WITH_LIB32=yes in /etc/make.conf and do a buildworld/installworld.
|
||||
|
||||
At some point libc would be configured to use the fast syscall/sysret
|
||||
instructions (instead of int 0x80) since we have a known minimum feature
|
||||
set and don't have to do runtime tests for it.
|
||||
|
||||
libpthread could use the amd64 sysarch syscalls for setting %fs/%gs
|
||||
since we don't have USER_LDT. This would be a heck of a lot easier than
|
||||
trying to run a real i386-built libc/libpthread.
|
||||
|
||||
Again, this hack is a stopgap until something is integrated into world.
|
||||
Alternatively, if you have just done a buildworld/installworld, you
|
||||
might be able to 'make build32' and 'make install32' in the top of the
|
||||
/usr/src tree.
|
||||
|
@ -1,70 +0,0 @@
|
||||
#! /bin/sh
|
||||
# $FreeBSD$
|
||||
#
|
||||
# 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.
|
||||
# It is rude, crude and brutal. But its the only option for now.
|
||||
#
|
||||
# Its purpose is to build a 32 bit library set and a ld-elf32.so.1.
|
||||
|
||||
# XXX beware.. some of the library targets have no way to disable
|
||||
# XXX installation of includes. ie: it will re-install some files in
|
||||
# XXX /usr/include for you.
|
||||
|
||||
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 $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.4 -I/tmp/i386/root/usr/include -L/usr/lib32 -B/usr/lib32"
|
||||
|
||||
# and a place to put the alternate include tree into.
|
||||
mkdir -p $MAKEOBJDIRPREFIX/root
|
||||
|
||||
export MACHINE_ARCH=i386
|
||||
export DESTDIR=$MAKEOBJDIRPREFIX/root
|
||||
|
||||
make -s hierarchy
|
||||
|
||||
# Now build 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 build-tools)
|
||||
(cd lib/libmagic; make -s build-tools)
|
||||
|
||||
# Now the libraries. This doesn't work for gnuregex yet. hence -k.
|
||||
# libbind is just an internal target, ignore it.
|
||||
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"
|
||||
export AS="as --32"
|
||||
make -s -DNO_BIND -DNOMAN -DNODOC -DNOINFO libraries
|
||||
|
||||
# and now that we have enough libraries, build ld-elf32.so.1
|
||||
cd libexec/rtld-elf
|
||||
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
|
||||
|
||||
chflags -R noschg $MAKEOBJDIRPREFIX
|
Loading…
Reference in New Issue
Block a user