Begin work on statically linked core.
This commit is contained in:
parent
a1c8d35f93
commit
e10c09cb3b
5
NR_NOTES
5
NR_NOTES
|
@ -1 +1,6 @@
|
||||||
-get python to build without GNU-compatible grep?
|
-get python to build without GNU-compatible grep?
|
||||||
|
-get everything under core/ to build statically?
|
||||||
|
-anything that relies on libz is an issue, it seems
|
||||||
|
-binutils is an issue
|
||||||
|
-so is eudev
|
||||||
|
-flex
|
||||||
|
|
|
@ -68,6 +68,10 @@ microarchitecture using the following CFLAGS (assuming GCC):
|
||||||
-Wl,--hash-style=gnu -Wl,-pie
|
-Wl,--hash-style=gnu -Wl,-pie
|
||||||
Linker arguments
|
Linker arguments
|
||||||
|
|
||||||
|
-fno-lto
|
||||||
|
Prevent LTO. You can discard this if and only if you are not using
|
||||||
|
a statically-linked gold or bfd as your primary linker.
|
||||||
|
|
||||||
A new subdir, bin, containing binaries built with the above CFLAGS (sans native)
|
A new subdir, bin, containing binaries built with the above CFLAGS (sans native)
|
||||||
will be added in the future. I, however, encourage you to build from source if
|
will be added in the future. I, however, encourage you to build from source if
|
||||||
possible.
|
possible.
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
CFLAGS="$CFLAGS -static "
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
CFLAGS="$CFLAGS -static -fPIC"
|
||||||
|
LDFLAGS="$LDFLAGS -static -fPIC -fno-lto -fno-use-linker-plugin -static -fPIC"
|
||||||
|
|
||||||
cat > makeinfo <<EOF
|
cat > makeinfo <<EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
printf 'makeinfo (GNU texinfo) 5.2\n'
|
printf 'makeinfo (GNU texinfo) 5.2\n'
|
||||||
|
@ -15,15 +18,17 @@ export PATH=$PATH:$PWD
|
||||||
--enable-deterministic-archives \
|
--enable-deterministic-archives \
|
||||||
--enable-gold \
|
--enable-gold \
|
||||||
--enable-ld=default \
|
--enable-ld=default \
|
||||||
--enable-plugins \
|
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
|
--with-static-standard-libraries \
|
||||||
--disable-werror \
|
--disable-werror \
|
||||||
--disable-gdb \
|
--disable-gdb \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
--disable-readline \
|
--disable-readline \
|
||||||
--disable-gprof \
|
--disable-gprof \
|
||||||
--with-mmap \
|
--with-mmap \
|
||||||
--with-system-zlib
|
--with-system-zlib \
|
||||||
|
--disable-lto \
|
||||||
|
--disable-plugins
|
||||||
|
|
||||||
make configure-host
|
make configure-host
|
||||||
make tooldir=/usr
|
make tooldir=/usr
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
CFLAGS="$CFLAGS -static"
|
||||||
|
LDFLAGS="$LDFLAGS -static -fPIC -fno-lto -fno-use-linker-plugin -static"
|
||||||
|
|
||||||
# Parallel builds seem to break bison
|
# Parallel builds seem to break bison
|
||||||
MAKEFLAGS=-j1
|
MAKEFLAGS=-j1
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,34 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
make CC="${CC:-cc} $CFLAGS -fPIC $LDFLAGS" -f Makefile-libbz2_so
|
CFLAGS="$CFLAGS -static -fPIC -fno-lto -fno-use-linker-plugin"
|
||||||
make CC="${CC:-cc} $CFLAGS -fPIC $LDFLAGS" bzip2recover libbz2.a
|
LDFLAGS="$LDFLAGS -static -fPIC -fno-lto -fno-use-linker-plugin"
|
||||||
|
|
||||||
for bin in bzip2-shared bzdiff bzgrep bzip2recover bzmore; do
|
sed -i 's/CFLAGS=.*//' Makefile
|
||||||
install -Dm755 "$bin" "$1/usr/bin/${bin%%-shared}"
|
sed -i 's/$(CFLAGS)/$(BIGFILES) $(LDFLAGS) $(CFLAGS)/g' Makefile
|
||||||
|
sed -i 's^$(PREFIX)^/$(DESTDIR)/$(PREFIX)^g' Makefile
|
||||||
|
sed -i s'^$(CC)^$(CC) $(LDFLAGS) $(CFLAGS)^g' Makefile-libbz2_so
|
||||||
|
sed -i 's/CFLAGS=.*//' Makefile-libbz2_so
|
||||||
|
|
||||||
|
make
|
||||||
|
# this is a temporary fix until we figure out what causes the shared object build to break
|
||||||
|
CFLAGS='-O2 -w -pipe -fPIC'
|
||||||
|
LDFLAGS='-fno-use-linker-plugin -fPIC'
|
||||||
|
make -f Makefile-libbz2_so
|
||||||
|
|
||||||
|
ln -sf bzip2 bunzip2
|
||||||
|
ln -sf bzip2 bzcat
|
||||||
|
for lib in libbz2.so libbz2.so.1 libbz2.so.1.0
|
||||||
|
do
|
||||||
|
ln -sf libbz2.so.1.0.8 $lib
|
||||||
done
|
done
|
||||||
|
|
||||||
|
make DESTDIR="$1" PREFIX=/usr install
|
||||||
install -Dm755 libbz2.so.1.0.8 "$1/usr/lib/libbz2.so.1.0.8"
|
install -Dm755 libbz2.so.1.0.8 "$1/usr/lib/libbz2.so.1.0.8"
|
||||||
install -Dm644 libbz2.a "$1/usr/lib/libbz2.a"
|
|
||||||
install -Dm644 bzip2.1 "$1/usr/share/man/man1/bzip2.1"
|
install -Dm644 bzip2.1 "$1/usr/share/man/man1/bzip2.1"
|
||||||
install -Dm644 bzlib.h "$1/usr/include/bzlib.h"
|
install -Dm644 bzlib.h "$1/usr/include/bzlib.h"
|
||||||
|
|
||||||
for lib in libbz2.so libbz2.so.1 libbz2.so.1.0; do
|
for lib in libbz2.so libbz2.so.1 libbz2.so.1.0
|
||||||
|
do
|
||||||
ln -sf libbz2.so.1.0.8 "$1/usr/lib/$lib"
|
ln -sf libbz2.so.1.0.8 "$1/usr/lib/$lib"
|
||||||
done
|
done
|
||||||
|
ls
|
||||||
ln -sf bzip2 "$1/usr/bin/bunzip2"
|
|
||||||
ln -sf bzip2 "$1/usr/bin/bzcat"
|
|
||||||
|
|
|
@ -5,8 +5,9 @@
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
--sbindir=/usr/bin \
|
--sbindir=/usr/bin \
|
||||||
--bindir=/usr/bin \
|
--bindir=/usr/bin \
|
||||||
|
--enable-fast-install \
|
||||||
|
--enable-static \
|
||||||
--enable-hwdb \
|
--enable-hwdb \
|
||||||
--enable-blkid=auto \
|
|
||||||
--disable-introspection
|
--disable-introspection
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr
|
--prefix=/usr \
|
||||||
|
--enable-shared \
|
||||||
|
--enable-static
|
||||||
|
|
||||||
make
|
make
|
||||||
make DESTDIR="$1" install
|
make DESTDIR="$1" install
|
||||||
|
|
|
@ -6,6 +6,14 @@
|
||||||
ac_cv_func_realloc_0_nonnull=yes
|
ac_cv_func_realloc_0_nonnull=yes
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
|
# We need to work around flex's makefile not working with static directives.
|
||||||
|
|
||||||
|
obj=flex-"buf.o flex-ccl.o flex-dfa.o flex-ecs.o flex-filter.o flex-gen.o flex-main.o flex-misc.o flex-nfa.o flex-options.o flex-parse.o flex-regex.o flex-scanflags.o flex-scanopt.o flex-skel.o flex-sym.o flex-tables.o flex-tables_shared.o flex-tblcmp.o flex-yylex.o flex-stage1scan.o"
|
||||||
|
cd src/
|
||||||
|
$CC $CFLAGS $LDFLAGS -o flex $obj -lintl -lm
|
||||||
|
cd ..
|
||||||
|
|
||||||
make DESTDIR="$1" install
|
make DESTDIR="$1" install
|
||||||
|
|
||||||
ln -s flex "$1/usr/bin/lex"
|
ln -s flex "$1/usr/bin/lex"
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--disable-nls \
|
|
||||||
--disable-generated-tests \
|
|
||||||
--enable-memcheck
|
|
||||||
|
|
||||||
make
|
make
|
||||||
make DESTDIR="$1" install
|
make DESTDIR="$1" install
|
||||||
|
install -Dm755 bin/bc "$1/usr/bin/bc"
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
CFLAGS="$CFLAGS -static -fPIC"
|
||||||
|
CXXFLAGS=$CFLAGS
|
||||||
|
LDFLAGS="$LDFLAGS -static -fPIC -fno-lto -fno-use-linker-plugin -static -fPIC"
|
||||||
|
|
||||||
cd gcc
|
cd gcc
|
||||||
patch -p1 < ../musl-jit.patch
|
patch -p1 < ../musl-jit.patch
|
||||||
cd ../
|
cd ../
|
||||||
|
@ -71,10 +76,3 @@ ln -s gcc "$1/usr/bin/cc"
|
||||||
# POSIX compliance.
|
# POSIX compliance.
|
||||||
install -Dm755 ../c99 "$1/usr/bin/c99"
|
install -Dm755 ../c99 "$1/usr/bin/c99"
|
||||||
|
|
||||||
# Symlink for LTO.
|
|
||||||
#{
|
|
||||||
# mkdir -p "$1/usr/lib/bfd-plugins"
|
|
||||||
#
|
|
||||||
# ln -s "/usr/lib/gcc/x86_64-pc-linux-musl/$2/liblto_plugin.so" \
|
|
||||||
# "$1/usr/lib/bfd-plugins/liblto_plugin.so"
|
|
||||||
#}
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ export CFLAGS="$CFLAGS -fPIC"
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--libdir=/usr/lib \
|
--libdir=/usr/lib \
|
||||||
|
--enable-static
|
||||||
|
|
||||||
make
|
make
|
||||||
make DESTDIR="$1" install
|
make DESTDIR="$1" install
|
||||||
|
|
|
@ -12,6 +12,7 @@ SBINDIR=/usr/bin
|
||||||
CC="${CC:-cc}"
|
CC="${CC:-cc}"
|
||||||
CFLAGS="$CFLAGS"
|
CFLAGS="$CFLAGS"
|
||||||
LN="ln -sf"
|
LN="ln -sf"
|
||||||
|
STATIC="-static -fno-lto -fno-use-linker-plugin"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
./configure
|
./configure
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
|
make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS -static -fPIC -fno-lto -fno-use-linker-plugin"
|
||||||
make DESTDIR="$1" PREFIX=/usr install
|
make DESTDIR="$1" PREFIX=/usr install
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
export BUILD_ZLIB=0
|
export BUILD_ZLIB=0
|
||||||
export BUILD_BZIP2=0
|
export BUILD_BZIP2=0
|
||||||
export LDFLAGS="$LDFLAGS -pthread"
|
export LDFLAGS="$LDFLAGS -static -fPIC -fno-lto -fno-use-linker-plugin -pthread"
|
||||||
export CFLAGS="$CFLAGS -DNO_POSIX_2008_LOCALE -D_GNU_SOURCE"
|
export CFLAGS="$CFLAGS -DNO_POSIX_2008_LOCALE -D_GNU_SOURCE"
|
||||||
|
|
||||||
./Configure \
|
./Configure \
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Install our pre-configured Makefile.
|
# Install our pre-configured Makefile.
|
||||||
cp makefile.mid ./Makefile
|
cp makefile.mid ./Makefile
|
||||||
|
|
||||||
make LDFLAGS="$LDFLAGS -static"
|
make LDFLAGS="$LDFLAGS -static -fPIC -fno-lto -fno-use-linker-plugin -static"
|
||||||
make DESTDIR="$1" PREFIX=/usr install
|
make DESTDIR="$1" PREFIX=/usr install
|
||||||
|
|
||||||
echo '#!/bin/sh
|
echo '#!/bin/sh
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
CFLAGS="$(echo $CFLAGS|sed 's/-static//g')"
|
||||||
|
LDFLAGS="$(echo $LDFLAGS|sed 's/-static//g')"
|
||||||
|
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--localstatedir=/var \
|
--localstatedir=/var \
|
||||||
|
@ -12,21 +16,25 @@
|
||||||
--without-python \
|
--without-python \
|
||||||
--without-systemd \
|
--without-systemd \
|
||||||
--disable-all-programs \
|
--disable-all-programs \
|
||||||
--enable-static-programs=fdisk,mount,umount \
|
--enable-static-programs=fdisk,mount,umount,ul,fsck,uuidgen,fstrim \
|
||||||
|
--enable-fdisks \
|
||||||
|
--enable-mount \
|
||||||
|
--enable-umount \
|
||||||
|
--enable-fsck \
|
||||||
|
--enable-uuidgen \
|
||||||
|
--enable-fstrim \
|
||||||
--enable-libuuid \
|
--enable-libuuid \
|
||||||
--enable-libblkid \
|
--enable-libblkid \
|
||||||
--enable-libfdisk \
|
--enable-libfdisk \
|
||||||
--enable-libsmartcols \
|
--enable-libsmartcols \
|
||||||
--enable-fsck \
|
|
||||||
--enable-uuidgen \
|
|
||||||
--enable-fstrim\
|
|
||||||
--enable-libmount \
|
--enable-libmount \
|
||||||
--enable-fdisks \
|
--enable-fdisks \
|
||||||
--enable-mount \
|
--enable-ul \
|
||||||
--enable-getopt \
|
|
||||||
--disable-bash-completion \
|
--disable-bash-completion \
|
||||||
--disable-colors-default \
|
--disable-colors-default \
|
||||||
--disable-nls
|
--enable-shared=libblkid \
|
||||||
|
--disable-nls \
|
||||||
|
--prefix=/usr --disable-rpath --without-udev --without-python --without-systemd --disable-all-programs --enable-static-programs=fdisk,mount,umount,ul,fsck,uuiden,fstrim --enable-libuuid --enable-libblkid --enable-libfdisk --enable-libsmartcols --enable-libmount --disable-bash-completion --disable-colors-default --enable-shared
|
||||||
|
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
cd src
|
||||||
|
|
||||||
|
make PREFIX="/usr/" DESTDIR="$1" install
|
|
@ -0,0 +1,2 @@
|
||||||
|
git+https://git.sdf.org/midfavila/mp-utils
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
git 1
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
cd src
|
||||||
|
|
||||||
|
make
|
||||||
|
make DESTDIR="$1" PREFIX="/usr" install
|
|
@ -0,0 +1 @@
|
||||||
|
077f0ee97a578523df1d06a50586bc2dd8e5edde878db7c05f80521afa57a558
|
|
@ -0,0 +1,2 @@
|
||||||
|
libXt
|
||||||
|
motif
|
|
@ -0,0 +1 @@
|
||||||
|
git+https://git.sdf.org/midfavila/Nebula
|
|
@ -0,0 +1 @@
|
||||||
|
0.5 1
|
|
@ -3,7 +3,10 @@
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--cc="${CC:-cc}" \
|
--cc="${CC:-cc}" \
|
||||||
--config-musl
|
--config-musl \
|
||||||
|
--enable-static
|
||||||
|
|
||||||
|
sed -i 's/-DC2STR/${CFLAGS} ${LDFLAGS} -DC2STR/g' Makefile
|
||||||
|
|
||||||
make
|
make
|
||||||
make DESTDIR="$1" install
|
make DESTDIR="$1" install
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
5d81f24fdc7cdb000d6ed5762459eda842b0b1f43fdad3a4be5e8edd5c8f7079
|
34ba2b78b640f8ff1eb8137bb87a24ab5452eddc0b42fa908e4d5a1a898cfdac
|
||||||
4bf732b952a121baedc79b07eb54ba6f37a146e8c497be73fb71ca34aeb90860
|
4bf732b952a121baedc79b07eb54ba6f37a146e8c497be73fb71ca34aeb90860
|
||||||
f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e
|
f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e
|
||||||
578146940874f8884f5ec69da948538dbd428de9405717ca24e6d5d80c7eb381
|
578146940874f8884f5ec69da948538dbd428de9405717ca24e6d5d80c7eb381
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
https://fossies.org/linux/www/palemoon-29.4.4.source.tar.xz
|
https://fossies.org/linux/www/palemoon-29.4.6.source.tar.xz
|
||||||
https://repo.palemoon.org/MoonchildProductions/UXP/archive/RELBASE_20210608.tar.gz platform/
|
https://repo.palemoon.org/MoonchildProductions/UXP/archive/RELBASE_20210608.tar.gz
|
||||||
https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz autoconf2.13/
|
https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz autoconf2.13/
|
||||||
files/mozconfig.in
|
files/mozconfig.in
|
||||||
patches/gcc11-fix.patch
|
patches/gcc11-fix.patch
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
./configure \
|
||||||
|
--prefix=/usr
|
||||||
|
|
||||||
|
make
|
||||||
|
make DESTDIR="$1" install
|
|
@ -0,0 +1 @@
|
||||||
|
077f0ee97a578523df1d06a50586bc2dd8e5edde878db7c05f80521afa57a558
|
|
@ -0,0 +1 @@
|
||||||
|
https://downloads.sourceforge.net/project/nebula-irc/nebula-irc/0.5/nebula-0.5.tar.gz
|
|
@ -0,0 +1 @@
|
||||||
|
0.5 1
|
Loading…
Reference in New Issue