diff options
author | davidovski <david@davidovski.xyz> | 2022-03-04 22:21:05 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-03-04 22:21:05 +0000 |
commit | 5bbf53467cd7b68557d8e37332968081c64e9908 (patch) | |
tree | ba66b660a35083ac68e147028f1a054ca9013d52 /repo | |
parent | 4af40fdd23ad45fb9466c101044dbecb5b8bb2b2 (diff) |
removing pic
Diffstat (limited to 'repo')
-rw-r--r-- | repo/devel/gcc.xibuild | 22 | ||||
-rw-r--r-- | repo/devel/rustc.xibuild | 23 | ||||
-rw-r--r-- | repo/skip/js78.xibuild | 55 | ||||
-rw-r--r-- | repo/system/binutils.xibuild | 7 | ||||
-rw-r--r-- | repo/system/js78.xibuild | 42 | ||||
-rw-r--r-- | repo/util/keyutils.xibuild | 9 | ||||
-rw-r--r-- | repo/xi/xipkg.xibuild | 2 | ||||
-rw-r--r-- | repo/xi/xiutils.xibuild | 10 |
8 files changed, 99 insertions, 71 deletions
diff --git a/repo/devel/gcc.xibuild b/repo/devel/gcc.xibuild index bceb9c2..18b6e2e 100644 --- a/repo/devel/gcc.xibuild +++ b/repo/devel/gcc.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="grep make dejagnu inetutils" +MAKEDEPS="grep make dejagnu inetutils flex" DEPS="musl binutils mpc mpfr gmp" PKG_VER=11.2.0 @@ -19,10 +19,8 @@ ADDITIONAL=" $PATCH_SRC/0007-Enable-Wtrampolines-by-default.patch $PATCH_SRC/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch $PATCH_SRC/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch - $PATCH_SRC/0011-libiberty-copy-PIC-objects-during-build-process.patch $PATCH_SRC/0012-libitm-disable-FORTIFY.patch $PATCH_SRC/0013-libgcc_s.patch - $PATCH_SRC/0014-nopie.patch $PATCH_SRC/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch $PATCH_SRC/0016-dlang-update-zlib-binding.patch $PATCH_SRC/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch @@ -79,11 +77,8 @@ prepare () { tar xf isl-$ISL_VER.tar.xz mv isl-$ISL_VER isl - - for p in *.patch; do - patch -Np1 -i $p || true - done - + + apply_patches } build () { @@ -115,7 +110,6 @@ build () { export FON+="--enable-tls " export FON+="--enable-libstdcxx-time " export FON+="--enable-fully-dynamic-string " - export FON+="--enable-default-pie " export FON+="--enable-default-ssp " export FON+="--enable-linker-build-id " export FON+="--enable-checking=release " @@ -137,9 +131,9 @@ build () { make && cd .. && - cc -fpie getent.c -o getent && - cc -fpie getconf.c -o getconf && - cc -fpie iconv.c -o iconv + cc getent.c -o getent && + cc getconf.c -o getconf && + cc iconv.c -o iconv } check () { @@ -177,5 +171,9 @@ package () { mkdir -p $PKG_DEST/usr/share/gdb/auto-load/usr/lib #mv $PKG_DEST/usr/lib/*gdb.py $PKG_DEST/usr/share/gdb/auto-load/usr/lib + for p in gcov gcc-ar gcc gcc-ranlib c++ g++ gcc-nm lto-dump gcov-tools gcov-dump cpp; do + ln -s $TRUPLE-$p $PKG_DEST/usr/bin/$p + done + } diff --git a/repo/devel/rustc.xibuild b/repo/devel/rustc.xibuild index d8cebf5..1e4df28 100644 --- a/repo/devel/rustc.xibuild +++ b/repo/devel/rustc.xibuild @@ -7,18 +7,25 @@ PKG_VER=1.58.1 SOURCE=https://static.rust-lang.org/dist/rustc-$PKG_VER-src.tar.gz DESC="Systems programming language focused on safety, speed and concurrency" +ADDITIONAL=" + https://git.alpinelinux.org/aports/plain/community/rust/link-musl-dynamically.patch +" + prepare () { + + apply_patches + mkdir -p $PKG_DEST/opt/rustc-$PKG_VER && ln -sf rustc-$PKG_VER $PKG_DEST/opt/rustc - openssl_file=vendor/openssl-sys/build/main.rs - checksum_before=$(sha256sum $openssl_file | cut -d' ' -f1) - sed -i "240i (3, 4, _) => ('3', '4', 'x')," $openssl_file - checksum_after=$(sha256sum $openssl_file | cut -d' ' -f1) - echo "checksum before: $checksum_before" - echo "checksum after: $checksum_after" + #openssl_file=vendor/openssl-sys/build/main.rs + #checksum_before=$(sha256sum $openssl_file | cut -d' ' -f1) + #sed -i "240i (3, 4, _) => ('3', '4', 'x')," $openssl_file + #checksum_after=$(sha256sum $openssl_file | cut -d' ' -f1) + #echo "checksum before: $checksum_before" + #echo "checksum after: $checksum_after" - sed -i "s/$checksum_before/$checksum_after/g" vendor/openssl-sys/.cargo-checksum.json + #sed -i "s/$checksum_before/$checksum_after/g" vendor/openssl-sys/.cargo-checksum.json } @@ -43,7 +50,7 @@ build () { --set="rust.musl-root=/usr" \ --set="rust.codegen-units=1" \ --set="rust.codegen-units-std=1" \ - --set="rust.parallel-compiler=false" \ + --set="rust.parallel-compiler=true" \ --set="target.$target.llvm-config=/usr/bin/llvm-config" \ --set="target.$target.musl-root=/usr" \ --set="target.$target.crt-static=false" \ diff --git a/repo/skip/js78.xibuild b/repo/skip/js78.xibuild new file mode 100644 index 0000000..8ac277c --- /dev/null +++ b/repo/skip/js78.xibuild @@ -0,0 +1,55 @@ +#!/bin/sh + +MAKEDEPS="gcc autoconf2-13 icu rustc zlib which zip llvm patch make" +DEPS="readline nspr bash zlib" + +PKG_VER=78.15.0 +SOURCE=https://archive.mozilla.org/pub/firefox/releases/${PKG_VER}esr/source/firefox-${PKG_VER}esr.source.tar.xz +ADDITIONAL=" + patches/js78/disable-jslint.patch + patches/js78/fd6847c9416f9eebde636e21d794d25d1be8791d.patch + patches/js78/fix-musl-build.patch + patches/js78/fix-python3.10-compilation.patch + " + +DESC="JavaScript interpreter and libraries - Version 78" + +prepare () { + apply_patches + + mountpoint -q /dev/shm || mount -t tmpfs devshm /dev/shm + export PATH=/opt/rustc/bin:$PATH + export LD_LIBRARY_PATH=/opt/rustc/lib:$LD_LIBRARY_PATH +} + +build () { + mkdir obj && + cd obj && + + CC=gcc CXX=g++ \ + CFLAGS="-fPIE -fPIC" CXXFLAGS="-fPIE -fPIC" SHELL=/bin/bash PYTHON=/usr/bin/python3 \ + ../js/src/configure --prefix=/usr \ + --disable-jemalloc \ + --disable-optimize \ + --enable-ctypes \ + --enable-readline \ + --enable-shared-js \ + --enable-system-ffi \ + --enable-tests \ + --with-intl-api \ + --with-system-icu \ + --with-system-nspr \ + --enable-hardening \ + --enable-release \ + --with-system-zlib \ + --host=x86_64-linux-musl + + make -j1 + +} + +package () { + make DESTDIR=$PKG_DEST install + [ -f $PKG_DEST/usr/lib/libjs_static.ajs ] && rm $PKG_DEST/usr/lib/libjs_static.ajs + sed -i '/@NSPR_CFLAGS@/d' $PKG_DEST/usr/bin/js78-config +} diff --git a/repo/system/binutils.xibuild b/repo/system/binutils.xibuild index d57d538..b8f383e 100644 --- a/repo/system/binutils.xibuild +++ b/repo/system/binutils.xibuild @@ -49,9 +49,8 @@ build () { --enable-threads \ --disable-multilib \ --with-mmap \ - --with-pic \ --enable-64-bit-bfd \ - --with-pic $EXTRA_CONFIG + $EXTRA_CONFIG make tooldir=/usr } @@ -65,8 +64,8 @@ package() { cd .. # how about we use binutils ld? - #rm -f $PKG_DEST/usr/bin/ld - #ln -sf /usr/bin/ld.bfd $PKG_DEST/usr/bin/ld + rm -f $PKG_DEST/usr/bin/ld + ln -sf /usr/bin/ld.bfd $PKG_DEST/usr/bin/ld install -m 644 include/libiberty.h $PKG_DEST/usr/include install -m 644 include/demangle.h $PKG_DEST/usr/include diff --git a/repo/system/js78.xibuild b/repo/system/js78.xibuild deleted file mode 100644 index 7b88f18..0000000 --- a/repo/system/js78.xibuild +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -MAKEDEPS="gcc autoconf2-13 icu rustc which zip llvm patch make" -DEPS="readline bash zlib" - -PKG_VER=78.15.0 -SOURCE=https://archive.mozilla.org/pub/firefox/releases/${PKG_VER}esr/source/firefox-${PKG_VER}esr.source.tar.xz -ADDITIONAL=" - https://www.linuxfromscratch.org/patches/blfs/svn/js-$PKG_VER-python_3_10-1.patch - " - -DESC="JavaScript interpreter and libraries - Version 78" - -prepare () { - patch -Np1 -i js-$PKG_VER-python_3_10-1.patch - - mountpoint -q /dev/shm || mount -t tmpfs devshm /dev/shm - export PATH=/opt/rustc/bin:$PATH - export LD_LIBRARY_PATH=/opt/rustc/lib:$LD_LIBRARY_PATH -} - -build () { - mkdir obj && - cd obj && - - CC=gcc CXX=g++ \ - ../js/src/configure --prefix=/usr \ - --with-intl-api \ - --with-system-zlib \ - --with-system-icu \ - --disable-jemalloc \ - --disable-debug-symbols \ - --enable-readline && - make - -} - -package () { - make DESTDIR=$PKG_DEST install - [ -f $PKG_DEST/usr/lib/libjs_static.ajs ] && rm $PKG_DEST/usr/lib/libjs_static.ajs - sed -i '/@NSPR_CFLAGS@/d' $PKG_DEST/usr/bin/js78-config -} diff --git a/repo/util/keyutils.xibuild b/repo/util/keyutils.xibuild index d1aa438..d966a89 100644 --- a/repo/util/keyutils.xibuild +++ b/repo/util/keyutils.xibuild @@ -1,6 +1,6 @@ #!/bin/sh -MAKEDEPS="make " +MAKEDEPS="make file" DEPS="musl sh" PKG_VER=1.6.3 @@ -12,5 +12,10 @@ build () { } package () { - make DESTDIR=$PKG_DEST install + make DESTDIR=$PKG_DEST \ + NO_ARLIB=1 \ + LIBDIR=/usr/lib \ + USRLIBDIR=/usr/lib \ + install + } diff --git a/repo/xi/xipkg.xibuild b/repo/xi/xipkg.xibuild index bebde6b..f98ab19 100644 --- a/repo/xi/xipkg.xibuild +++ b/repo/xi/xipkg.xibuild @@ -3,7 +3,7 @@ MAKEDEPS="make" DEPS="openssl curl dash xiutils findutils diffutils sed xichroot grep" -PKG_VER=1.0.4 +PKG_VER=1.1.0 SOURCE=https://git.davidovski.xyz/xilinux/xipkg.git BRANCH="v$PKG_VER" diff --git a/repo/xi/xiutils.xibuild b/repo/xi/xiutils.xibuild index c3b9a10..c8f7bf6 100644 --- a/repo/xi/xiutils.xibuild +++ b/repo/xi/xiutils.xibuild @@ -3,7 +3,7 @@ MAKEDEPS="gcc" DEPS="bash" -PKG_VER=1.0.1 +PKG_VER=1.0.2 SOURCE=https://git.davidovski.xyz/xilinux/xiutils.git BRANCH="v$PKG_VER" @@ -13,7 +13,13 @@ build () { make } +check () { + make check +} + package () { - mkdir -pv $PKG_DEST/usr/{include,bin,lib} + for dir in include bin lib; do + mkdir -p $PKG_DEST/usr/$dir + done make DESTDIR=$PKG_DEST install } |