updated
This commit is contained in:
parent
bc26b67553
commit
d4888352ff
27 changed files with 110 additions and 176 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
*.iso
|
*.iso
|
||||||
sources
|
*.tar.xz
|
||||||
packages
|
*.img
|
||||||
|
|
||||||
|
|
|
@ -108,6 +108,10 @@ source $CWD/config
|
||||||
|
|
||||||
PATH=/tools/bin:/bin:/usr/bin
|
PATH=/tools/bin:/bin:/usr/bin
|
||||||
|
|
||||||
|
TCDIR=$CWD/toolchain
|
||||||
|
PATCHDIR=$CWD/patches
|
||||||
|
FILEDIR=$CWD/files
|
||||||
|
|
||||||
export LC_ALL=C PATH MAKEFLAGS LFS LFS_TGT
|
export LC_ALL=C PATH MAKEFLAGS LFS LFS_TGT
|
||||||
|
|
||||||
mkdir -p $TCDIR $SRCDIR $WORKDIR
|
mkdir -p $TCDIR $SRCDIR $WORKDIR
|
||||||
|
|
21
02-base
21
02-base
|
@ -75,19 +75,6 @@ umount_pseudo() {
|
||||||
unmount $LFS/sys
|
unmount $LFS/sys
|
||||||
}
|
}
|
||||||
|
|
||||||
mountbind_cache() {
|
|
||||||
# mount bind cachedir
|
|
||||||
mkdir -p $LFS/var/lib/pkg/{pkg,src} $CWD/{sources,packages}
|
|
||||||
mount --bind $CWD/sources $LFS/var/lib/pkg/src
|
|
||||||
mount --bind $CWD/packages $LFS/var/lib/pkg/pkg
|
|
||||||
}
|
|
||||||
|
|
||||||
umountbind_cache() {
|
|
||||||
# umount binded cachedir
|
|
||||||
unmount $LFS/var/lib/pkg/src
|
|
||||||
unmount $LFS/var/lib/pkg/pkg
|
|
||||||
}
|
|
||||||
|
|
||||||
unmount() {
|
unmount() {
|
||||||
while true; do
|
while true; do
|
||||||
mountpoint -q $1 || break
|
mountpoint -q $1 || break
|
||||||
|
@ -95,7 +82,6 @@ unmount() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
runinchroot() {
|
runinchroot() {
|
||||||
pushd $LFS &>/dev/null
|
pushd $LFS &>/dev/null
|
||||||
mount_pseudo
|
mount_pseudo
|
||||||
|
@ -117,7 +103,6 @@ interrupted() {
|
||||||
|
|
||||||
die() {
|
die() {
|
||||||
[ "$@" ] && printerror $@
|
[ "$@" ] && printerror $@
|
||||||
umountbind_cache
|
|
||||||
umount_pseudo
|
umount_pseudo
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -155,13 +140,11 @@ if [ ! -f $LFS/var/lib/pkg/db ]; then
|
||||||
lfs_dirs
|
lfs_dirs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm -fr $LFS/usr/ports
|
||||||
mkdir -p $LFS/usr/ports/
|
mkdir -p $LFS/usr/ports/
|
||||||
#runinchroot ports -u || die
|
|
||||||
echo "==> Copying ports"
|
echo "==> Copying ports"
|
||||||
cp -Ra ports/* $LFS/usr/ports/
|
cp -Ra ports/* $LFS/usr/ports/
|
||||||
|
|
||||||
mountbind_cache
|
|
||||||
|
|
||||||
for pkg in $PKGS; do
|
for pkg in $PKGS; do
|
||||||
case $pkg in
|
case $pkg in
|
||||||
filesystem|gcc|bash|perl|coreutils) runinchroot pkgin -i -ic $pkg || die;;
|
filesystem|gcc|bash|perl|coreutils) runinchroot pkgin -i -ic $pkg || die;;
|
||||||
|
@ -169,6 +152,4 @@ for pkg in $PKGS; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
umountbind_cache
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
28
03-mkiso
28
03-mkiso
|
@ -18,11 +18,18 @@ mount_pseudofs() {
|
||||||
}
|
}
|
||||||
|
|
||||||
umount_pseudofs() {
|
umount_pseudofs() {
|
||||||
umount $LFS/dev/pts &>/dev/null
|
unmount $LFS/dev/pts
|
||||||
umount $LFS/dev &>/dev/null
|
unmount $LFS/dev
|
||||||
umount $LFS/run &>/dev/null
|
unmount $LFS/run
|
||||||
umount $LFS/proc &>/dev/null
|
unmount $LFS/proc
|
||||||
umount $LFS/sys &>/dev/null
|
unmount $LFS/sys
|
||||||
|
}
|
||||||
|
|
||||||
|
unmount() {
|
||||||
|
while true; do
|
||||||
|
mountpoint -q $1 || break
|
||||||
|
umount $1 2>/dev/null
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
interrupted() {
|
interrupted() {
|
||||||
|
@ -30,7 +37,6 @@ interrupted() {
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
#rm -fr $LFS
|
|
||||||
rm -fr $WDIR
|
rm -fr $WDIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,13 +56,17 @@ printerror() {
|
||||||
}
|
}
|
||||||
|
|
||||||
CWD=$PWD
|
CWD=$PWD
|
||||||
|
LFS="/mnt/lfs"
|
||||||
|
WORKDIR="$LFS/tmp"
|
||||||
|
WDIR="$WORKDIR/iso"
|
||||||
|
LABEL="LFSLIVECD"
|
||||||
|
OUTPUT="lfs-livecd-$(date +"%Y%m%d").iso"
|
||||||
|
FILEDIR="$CWD/files"
|
||||||
|
|
||||||
source $CWD/config
|
. $CWD/config
|
||||||
|
|
||||||
isolinux_files="chain.c32 isolinux.bin ldlinux.c32 libutil.c32 reboot.c32 menu.c32 libcom32.c32 poweroff.c32"
|
isolinux_files="chain.c32 isolinux.bin ldlinux.c32 libutil.c32 reboot.c32 menu.c32 libcom32.c32 poweroff.c32"
|
||||||
|
|
||||||
OUTPUT=$OUTPUT.iso
|
|
||||||
|
|
||||||
rm -fr $WDIR
|
rm -fr $WDIR
|
||||||
mkdir -p $WDIR
|
mkdir -p $WDIR
|
||||||
|
|
||||||
|
|
10
backuptoolchain.sh
Executable file
10
backuptoolchain.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ./config
|
||||||
|
|
||||||
|
CWD=$PWD
|
||||||
|
|
||||||
|
cd $LFS
|
||||||
|
tar cvJpf $CWD/toolchain.tar.xz tools
|
||||||
|
|
||||||
|
exit 0
|
17
config
17
config
|
@ -1,16 +1,9 @@
|
||||||
|
# config file for toolchain scripts
|
||||||
|
# modify according your needs
|
||||||
|
|
||||||
MAKEFLAGS="-j$(nproc)"
|
MAKEFLAGS="-j$(nproc)"
|
||||||
LFS="/mnt/lfs"
|
LFS="/mnt/lfs"
|
||||||
LFS_TGT=$(uname -m)-lfs-linux-gnu
|
LFS_TGT=$(uname -m)-lfs-linux-gnu
|
||||||
|
LFS_TGT32=i686-lfs-linux-gnu
|
||||||
TCDIR=$CWD/toolchain
|
SRCDIR=$LFS/var/lib/pkg/src
|
||||||
SRCDIR=$CWD/sources
|
WORKDIR=$LFS/tmp
|
||||||
PATCHDIR=$CWD/patches
|
|
||||||
FILEDIR=$CWD/files
|
|
||||||
WORKDIR=/tmp
|
|
||||||
|
|
||||||
LABEL=LFSLIVECD
|
|
||||||
OUTPUT=lfs-livecd-$(date +"%Y%m%d")
|
|
||||||
WDIR=/tmp/lfsiso
|
|
||||||
|
|
||||||
#MULTILIB=yes
|
|
||||||
|
|
|
@ -9,16 +9,12 @@ release=1
|
||||||
source=(https://ftp.gnu.org/gnu/binutils/$name-$version.tar.xz)
|
source=(https://ftp.gnu.org/gnu/binutils/$name-$version.tar.xz)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
multilibopt="--enable-multilib --with-lib-path=/usr/lib:/lib:/usr/lib32"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $name-$version
|
cd $name-$version
|
||||||
|
|
||||||
mkdir -v build
|
mkdir -v build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
../configure $multilibopt \
|
../configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--enable-gold \
|
--enable-gold \
|
||||||
--enable-ld=default \
|
--enable-ld=default \
|
||||||
|
@ -26,7 +22,9 @@ build() {
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
--disable-werror \
|
--disable-werror \
|
||||||
--enable-64-bit-bfd \
|
--enable-64-bit-bfd \
|
||||||
--with-system-zlib
|
--with-system-zlib \
|
||||||
|
--enable-multilib \
|
||||||
|
--with-lib-path=/usr/lib:/lib:/usr/lib32
|
||||||
make tooldir=/usr
|
make tooldir=/usr
|
||||||
make tooldir=/usr DESTDIR=$PKG install
|
make tooldir=/usr DESTDIR=$PKG install
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,12 +9,6 @@ release=1
|
||||||
source=(https://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.xz)
|
source=(https://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.xz)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
multilibopt="--enable-multilib"
|
|
||||||
else
|
|
||||||
multilibopt="--disable-multilib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $name-$version
|
cd $name-$version
|
||||||
|
|
||||||
sed -e '/m64=/s/lib64/lib/' \
|
sed -e '/m64=/s/lib64/lib/' \
|
||||||
|
@ -28,11 +22,12 @@ build() {
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
SED=sed \
|
SED=sed \
|
||||||
../configure $multilibopt \
|
../configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--enable-languages=c,c++ \
|
--enable-languages=c,c++ \
|
||||||
--disable-bootstrap \
|
--disable-bootstrap \
|
||||||
--with-system-zlib
|
--with-system-zlib \
|
||||||
|
--enable-multilib
|
||||||
make
|
make
|
||||||
make -j1 DESTDIR=$PKG install
|
make -j1 DESTDIR=$PKG install
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,6 @@ source=(https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz
|
||||||
http://www.linuxfromscratch.org/patches/lfs/9.1/$name-$version-fhs-1.patch)
|
http://www.linuxfromscratch.org/patches/lfs/9.1/$name-$version-fhs-1.patch)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
multilibopt="--enable-multi-arch"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $name-$version
|
cd $name-$version
|
||||||
|
|
||||||
patch -Np1 -i ../$name-$version-fhs-1.patch
|
patch -Np1 -i ../$name-$version-fhs-1.patch
|
||||||
|
@ -26,12 +22,13 @@ build() {
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
CC="gcc -ffile-prefix-map=/tools=/usr" \
|
CC="gcc -ffile-prefix-map=/tools=/usr" \
|
||||||
../configure $multilibopt \
|
../configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--disable-werror \
|
--disable-werror \
|
||||||
--enable-kernel=3.2 \
|
--enable-kernel=3.2 \
|
||||||
--enable-stack-protector=strong \
|
--enable-stack-protector=strong \
|
||||||
--with-headers=/usr/include \
|
--with-headers=/usr/include \
|
||||||
|
--enable-multi-arch \
|
||||||
libc_cv_slibdir=/lib
|
libc_cv_slibdir=/lib
|
||||||
make
|
make
|
||||||
mkdir -p $PKG/etc
|
mkdir -p $PKG/etc
|
||||||
|
@ -45,7 +42,6 @@ build() {
|
||||||
make install_root=$PKG localedata/install-locales
|
make install_root=$PKG localedata/install-locales
|
||||||
|
|
||||||
# 32bit
|
# 32bit
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
mkdir -v ../build32
|
mkdir -v ../build32
|
||||||
cd ../build32
|
cd ../build32
|
||||||
CC="gcc -m32" \
|
CC="gcc -m32" \
|
||||||
|
@ -72,7 +68,6 @@ build() {
|
||||||
ln -sv ../lib/locale $PKG/usr/lib32/locale
|
ln -sv ../lib/locale $PKG/usr/lib32/locale
|
||||||
echo "/usr/lib32" > $PKG/etc/ld.so.conf.d/lib32.conf
|
echo "/usr/lib32" > $PKG/etc/ld.so.conf.d/lib32.conf
|
||||||
cd -
|
cd -
|
||||||
fi
|
|
||||||
|
|
||||||
cat > $PKG/etc/nsswitch.conf << "EOF"
|
cat > $PKG/etc/nsswitch.conf << "EOF"
|
||||||
# Begin /etc/nsswitch.conf
|
# Begin /etc/nsswitch.conf
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
name=libevent
|
name=libevent
|
||||||
version=2.1.11
|
version=2.1.11
|
||||||
release=2
|
release=1
|
||||||
source=(https://github.com/libevent/libevent/releases/download/release-$version-stable/libevent-$version-stable.tar.gz)
|
source=(https://github.com/libevent/libevent/releases/download/release-$version-stable/libevent-$version-stable.tar.gz)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|
|
@ -24,9 +24,4 @@ build () {
|
||||||
-e 's/ -static//' Makefile
|
-e 's/ -static//' Makefile
|
||||||
make DESTDIR=$PKG install
|
make DESTDIR=$PKG install
|
||||||
install -m644 $SRC/pkgmk.conf $PKG/etc/pkgmk.conf
|
install -m644 $SRC/pkgmk.conf $PKG/etc/pkgmk.conf
|
||||||
|
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
sed -i 's/#export MULTILIB=/export MULTILIB=/' \
|
|
||||||
$PKG/etc/pkgmk.conf
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@ export CXXFLAGS="${CFLAGS}"
|
||||||
|
|
||||||
export JOBS=$(nproc)
|
export JOBS=$(nproc)
|
||||||
export MAKEFLAGS="-j $JOBS"
|
export MAKEFLAGS="-j $JOBS"
|
||||||
#export MULTILIB="yes"
|
|
||||||
|
|
||||||
case ${PKGMK_ARCH} in
|
case ${PKGMK_ARCH} in
|
||||||
"64"|"")
|
"64"|"")
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
name=wpa_supplicant
|
name=wpa_supplicant
|
||||||
version=2.9
|
version=2.9
|
||||||
bootscriptsversion=20191204
|
bootscriptsversion=20191204
|
||||||
release=2
|
release=1
|
||||||
source=(https://w1.fi/releases/wpa_supplicant-$version.tar.gz
|
source=(https://w1.fi/releases/wpa_supplicant-$version.tar.gz
|
||||||
http://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/blfs-bootscripts-$bootscriptsversion.tar.xz
|
http://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/blfs-bootscripts-$bootscriptsversion.tar.xz
|
||||||
wpa_supplicant.conf)
|
wpa_supplicant.conf)
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
# Begin /etc/fstab
|
# Begin /etc/fstab
|
||||||
|
|
||||||
# black fstab for liveiso
|
# file system mount-point type options dump fsck order
|
||||||
|
#/dev/<xxx> / <fff> defaults 1 1
|
||||||
|
#/dev/<yyy> swap swap pri=1 0 0
|
||||||
|
#proc /proc proc nosuid,noexec,nodev 0 0
|
||||||
|
#sysfs /sys sysfs nosuid,noexec,nodev 0 0
|
||||||
|
devpts /dev/pts devpts gid=5,mode=620 0 0
|
||||||
|
#tmpfs /run tmpfs defaults 0 0
|
||||||
|
#devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
|
||||||
|
|
||||||
# End /etc/fstab
|
# End /etc/fstab
|
||||||
|
|
18
run_qemu
Executable file
18
run_qemu
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ -f venom-vm.img ] || {
|
||||||
|
qemu-img create -f qcow2 venom-vm.img 50G
|
||||||
|
}
|
||||||
|
|
||||||
|
exec qemu-system-x86_64 -enable-kvm \
|
||||||
|
-cpu host \
|
||||||
|
-drive file=venom-vm.img,if=virtio \
|
||||||
|
-netdev user,id=vmnic,hostname=Venom \
|
||||||
|
-device virtio-net,netdev=vmnic \
|
||||||
|
-device virtio-rng-pci \
|
||||||
|
-m 2G \
|
||||||
|
-smp 4 \
|
||||||
|
-monitor stdio \
|
||||||
|
-name "VenomLinux VM" \
|
||||||
|
-boot d \
|
||||||
|
-cdrom $@
|
|
@ -3,25 +3,20 @@ version=2.34
|
||||||
source=(http://ftp.gnu.org/gnu/binutils/binutils-$version.tar.xz)
|
source=(http://ftp.gnu.org/gnu/binutils/binutils-$version.tar.xz)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
multilibopt="--with-lib-path=/tools/lib:/tools/lib32"
|
|
||||||
else
|
|
||||||
multilibopt="--with-lib-path=/tools/lib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $name-$version
|
cd $name-$version
|
||||||
|
|
||||||
mkdir -v build
|
mkdir -v build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
../configure $multilibopt \
|
../configure \
|
||||||
--prefix=/tools \
|
--prefix=/tools \
|
||||||
--with-sysroot=$LFS \
|
--with-sysroot=$LFS \
|
||||||
--target=$LFS_TGT \
|
--target=$LFS_TGT \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
--disable-werror
|
--disable-werror \
|
||||||
|
--with-lib-path=/tools/lib:/tools/lib32
|
||||||
make
|
make
|
||||||
mkdir -v /tools/lib && ln -sv lib /tools/lib64
|
mkdir -v /tools/lib && ln -sv lib /tools/lib64
|
||||||
[ "$MULTILIB" = "yes" ] && mkdir -p /tools/lib32
|
mkdir -p /tools/lib32
|
||||||
make install
|
make install
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,12 +9,6 @@ source=(http://ftp.gnu.org/gnu/gcc/gcc-$version/gcc-$version.tar.xz
|
||||||
http://www.mpfr.org/mpfr-$mpfr_version/mpfr-$mpfr_version.tar.xz)
|
http://www.mpfr.org/mpfr-$mpfr_version/mpfr-$mpfr_version.tar.xz)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
multilibopt="--with-multilib-list=m32,m64"
|
|
||||||
else
|
|
||||||
multilibopt="--disable-multilib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $name-$version
|
cd $name-$version
|
||||||
|
|
||||||
mv -v ../mpfr-$mpfr_version mpfr
|
mv -v ../mpfr-$mpfr_version mpfr
|
||||||
|
@ -34,19 +28,14 @@ build() {
|
||||||
touch $file.orig
|
touch $file.orig
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
sed -i -e 's@/lib/ld-linux.so.2@/lib32/ld-linux.so.2@g' gcc/config/i386/linux64.h
|
sed -i -e 's@/lib/ld-linux.so.2@/lib32/ld-linux.so.2@g' gcc/config/i386/linux64.h
|
||||||
sed -i -e '/MULTILIB_OSDIRNAMES/d' gcc/config/i386/t-linux64
|
sed -i -e '/MULTILIB_OSDIRNAMES/d' gcc/config/i386/t-linux64
|
||||||
echo "MULTILIB_OSDIRNAMES = m64=../lib m32=../lib32 mx32=../libx32" >> gcc/config/i386/t-linux64
|
echo "MULTILIB_OSDIRNAMES = m64=../lib m32=../lib32 mx32=../libx32" >> gcc/config/i386/t-linux64
|
||||||
else
|
|
||||||
sed -e '/m64=/s/lib64/lib/' \
|
|
||||||
-i.orig gcc/config/i386/t-linux64
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -v build
|
mkdir -v build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
../configure $multilibopt \
|
../configure \
|
||||||
--target=$LFS_TGT \
|
--target=$LFS_TGT \
|
||||||
--prefix=/tools \
|
--prefix=/tools \
|
||||||
--with-glibc-version=2.11 \
|
--with-glibc-version=2.11 \
|
||||||
|
@ -66,7 +55,8 @@ build() {
|
||||||
--disable-libssp \
|
--disable-libssp \
|
||||||
--disable-libvtv \
|
--disable-libvtv \
|
||||||
--disable-libstdcxx \
|
--disable-libstdcxx \
|
||||||
--enable-languages=c,c++
|
--enable-languages=c,c++ \
|
||||||
|
--with-multilib-list=m32,m64
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,14 +5,13 @@ source=(http://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz)
|
||||||
build() {
|
build() {
|
||||||
cd $name-$version
|
cd $name-$version
|
||||||
|
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
mkdir -v build32
|
mkdir -v build32
|
||||||
cd build32
|
cd build32
|
||||||
|
|
||||||
echo slibdir=/tools/lib32 > configparms
|
echo slibdir=/tools/lib32 > configparms
|
||||||
../configure \
|
../configure \
|
||||||
--prefix=/tools \
|
--prefix=/tools \
|
||||||
--host=i686-lfs-linux-gnu \
|
--host=$LFS_TGT32 \
|
||||||
--build=$(../scripts/config.guess) \
|
--build=$(../scripts/config.guess) \
|
||||||
--libdir=/tools/lib32 \
|
--libdir=/tools/lib32 \
|
||||||
--enable-kernel=3.2 \
|
--enable-kernel=3.2 \
|
||||||
|
@ -22,7 +21,6 @@ build() {
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
cd -
|
cd -
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -v build
|
mkdir -v build
|
||||||
cd build
|
cd build
|
||||||
|
|
|
@ -5,7 +5,6 @@ source=(http://ftp.gnu.org/gnu/gcc/gcc-$version/gcc-$version.tar.xz)
|
||||||
build() {
|
build() {
|
||||||
cd $name-$version
|
cd $name-$version
|
||||||
|
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
mkdir -v build32
|
mkdir -v build32
|
||||||
cd build32
|
cd build32
|
||||||
|
|
||||||
|
@ -23,7 +22,6 @@ build() {
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
cd -
|
cd -
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -v build
|
mkdir -v build
|
||||||
cd build
|
cd build
|
||||||
|
|
|
@ -20,10 +20,6 @@ build() {
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
make -C ld clean
|
make -C ld clean
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
make -C ld LIB_PATH=/usr/lib:/lib:/usr/lib32
|
||||||
make -C ld LIB_PATH=/usr/lib:/lib:/usr/lib32:/lib32
|
|
||||||
else
|
|
||||||
make -C ld LIB_PATH=/usr/lib:/lib
|
|
||||||
fi
|
|
||||||
cp -v ld/ld-new /tools/bin
|
cp -v ld/ld-new /tools/bin
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,12 +9,6 @@ source=(http://ftp.gnu.org/gnu/gcc/gcc-$version/gcc-$version.tar.xz
|
||||||
http://www.mpfr.org/mpfr-$mpfr_version/mpfr-$mpfr_version.tar.xz)
|
http://www.mpfr.org/mpfr-$mpfr_version/mpfr-$mpfr_version.tar.xz)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
multilibopt="--with-multilib-list=m32,m64"
|
|
||||||
else
|
|
||||||
multilibopt="--disable-multilib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $name-$version
|
cd $name-$version
|
||||||
|
|
||||||
mv -v ../mpfr-$mpfr_version mpfr
|
mv -v ../mpfr-$mpfr_version mpfr
|
||||||
|
@ -37,14 +31,9 @@ build() {
|
||||||
touch $file.orig
|
touch $file.orig
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
sed -i -e 's@/lib/ld-linux.so.2@/lib32/ld-linux.so.2@g' gcc/config/i386/linux64.h
|
sed -i -e 's@/lib/ld-linux.so.2@/lib32/ld-linux.so.2@g' gcc/config/i386/linux64.h
|
||||||
sed -i -e '/MULTILIB_OSDIRNAMES/d' gcc/config/i386/t-linux64
|
sed -i -e '/MULTILIB_OSDIRNAMES/d' gcc/config/i386/t-linux64
|
||||||
echo "MULTILIB_OSDIRNAMES = m64=../lib m32=../lib32 mx32=../libx32" >> gcc/config/i386/t-linux64
|
echo "MULTILIB_OSDIRNAMES = m64=../lib m32=../lib32 mx32=../libx32" >> gcc/config/i386/t-linux64
|
||||||
else
|
|
||||||
sed -e '/m64=/s/lib64/lib/' \
|
|
||||||
-i.orig gcc/config/i386/t-linux64
|
|
||||||
fi
|
|
||||||
|
|
||||||
# fix a problem introduced by Glibc-2.31
|
# fix a problem introduced by Glibc-2.31
|
||||||
sed -e '1161 s|^|//|' \
|
sed -e '1161 s|^|//|' \
|
||||||
|
@ -57,14 +46,15 @@ build() {
|
||||||
CXX=$LFS_TGT-g++ \
|
CXX=$LFS_TGT-g++ \
|
||||||
AR=$LFS_TGT-ar \
|
AR=$LFS_TGT-ar \
|
||||||
RANLIB=$LFS_TGT-ranlib \
|
RANLIB=$LFS_TGT-ranlib \
|
||||||
../configure $multilibopt \
|
../configure \
|
||||||
--prefix=/tools \
|
--prefix=/tools \
|
||||||
--with-local-prefix=/tools \
|
--with-local-prefix=/tools \
|
||||||
--with-native-system-header-dir=/tools/include \
|
--with-native-system-header-dir=/tools/include \
|
||||||
--enable-languages=c,c++ \
|
--enable-languages=c,c++ \
|
||||||
--disable-libstdcxx-pch \
|
--disable-libstdcxx-pch \
|
||||||
--disable-bootstrap \
|
--disable-bootstrap \
|
||||||
--disable-libgomp
|
--disable-libgomp \
|
||||||
|
--with-multilib-list=m32,m64
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
ln -sv gcc /tools/bin/cc
|
ln -sv gcc /tools/bin/cc
|
||||||
|
|
|
@ -27,7 +27,6 @@ export CXXFLAGS="${CFLAGS}"
|
||||||
|
|
||||||
export JOBS=$(nproc)
|
export JOBS=$(nproc)
|
||||||
export MAKEFLAGS="-j $JOBS"
|
export MAKEFLAGS="-j $JOBS"
|
||||||
#export MULTILIB="yes"
|
|
||||||
|
|
||||||
PKGMK_SOURCE_DIR="/var/lib/pkg/src"
|
PKGMK_SOURCE_DIR="/var/lib/pkg/src"
|
||||||
PKGMK_PACKAGE_DIR="/var/lib/pkg/pkg"
|
PKGMK_PACKAGE_DIR="/var/lib/pkg/pkg"
|
||||||
|
@ -38,9 +37,4 @@ PKGMK_COMPRESSION_MODE="xz"
|
||||||
|
|
||||||
# End of file
|
# End of file
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
sed -i 's/#export MULTILIB=/export MULTILIB=/' \
|
|
||||||
/tools/etc/pkgmk.conf
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
name=httpup
|
|
||||||
version=0.5.0
|
|
||||||
source=(https://crux.nu/files/$name-$version.tar.xz)
|
|
||||||
|
|
||||||
build() {
|
|
||||||
cd $name-$version
|
|
||||||
make
|
|
||||||
make DESTDIR=$PKG prefix=/tools mandir=/tools/share/man install
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
name=ports
|
|
||||||
version=1.6
|
|
||||||
source=(https://crux.nu/files/tools/ports/$name-$version.tar.gz)
|
|
||||||
|
|
||||||
build() {
|
|
||||||
cd $name-$version
|
|
||||||
make
|
|
||||||
make DESTDIR=$PKG BINDIR=/tools/bin ETCDIR=/tools/etc/ports PORTSDIR=/tools/etc/ports MANDIR=/tools/share/man install
|
|
||||||
install -D -m 755 $FILEDIR/httpup /tools/etc/ports/drivers/httpup
|
|
||||||
install -m 644 $FILEDIR/core.httpup /tools/etc/ports/core.httpup
|
|
||||||
sed 's,etc/ports,tools/etc/ports,g' -i /tools/bin/ports
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
name=nano
|
|
||||||
version=4.8
|
|
||||||
source=(https://www.nano-editor.org/dist/v${version::1}/nano-$version.tar.xz)
|
|
||||||
|
|
||||||
build() {
|
|
||||||
cd $name-$version
|
|
||||||
./configure --prefix=/tools
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
}
|
|
|
@ -6,8 +6,6 @@ build() {
|
||||||
rm -rf /tools{,/share}/{info,man,doc}
|
rm -rf /tools{,/share}/{info,man,doc}
|
||||||
find /tools/{lib,libexec} -name \*.la -delete
|
find /tools/{lib,libexec} -name \*.la -delete
|
||||||
|
|
||||||
if [ "$MULTILIB" = "yes" ]; then
|
|
||||||
strip --strip-debug /tools/lib32/* || true
|
strip --strip-debug /tools/lib32/* || true
|
||||||
find /tools/lib32 -name \*.la -delete
|
find /tools/lib32 -name \*.la -delete
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue