mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

commit f92ad80e82a53f2904d50cd0b16c9a40b092eb06
parent 35eaa89b343aa46bde708ae060c8b045d1d2659e
Author: Jan Pobrislo <ccx@te2000.cz>
Date:   Wed,  3 Dec 2025 22:39:50 +0000

Upgrade old mcm packages to gcc-14.3.0, WIP separate toolchain packages

Diffstat:
Atemplates/gmp | 15+++++++++++++++
Atemplates/pkg/binutils | 39+++++++++++++++++++++++++++++++++++++++
Atemplates/pkg/mpc | 15+++++++++++++++
Atemplates/pkg/mpfr | 16++++++++++++++++
Mtemplates/pkg/musl-cross-make:old | 8++++----
Mtemplates/pkg/musl-cross-make:oldbootstrap-1 | 8++++----
Avariants/ccx-x86_64/binutils | 151++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mvariants/ccx-x86_64/busybox:old | 6+++---
Mvariants/ccx-x86_64/busybox:oldbootstrap | 8++++----
Mvariants/ccx-x86_64/gnu-make:old | 6+++---
Mvariants/ccx-x86_64/gnu-make:oldbootstrap | 4++--
Avariants/ccx-x86_64/mpc | 131+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Avariants/ccx-x86_64/mpfr | 132+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mvariants/ccx-x86_64/musl-cross-make:old | 14+++++++-------
Mvariants/ccx-x86_64/musl-cross-make:oldbootstrap-1 | 8++++----
Mvariants/ccx-x86_64/oldbootstrap.environment | 8++++----
Mvariants/ccx-x86_64/oldsystem.environment | 8++++----
Avariants/root-x86_64/binutils | 151++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mvariants/root-x86_64/busybox:old | 6+++---
Mvariants/root-x86_64/busybox:oldbootstrap | 8++++----
Mvariants/root-x86_64/gnu-make:old | 6+++---
Mvariants/root-x86_64/gnu-make:oldbootstrap | 4++--
Avariants/root-x86_64/mpc | 131+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Avariants/root-x86_64/mpfr | 132+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mvariants/root-x86_64/musl-cross-make:old | 14+++++++-------
Mvariants/root-x86_64/musl-cross-make:oldbootstrap-1 | 8++++----
Mvariants/root-x86_64/oldbootstrap.environment | 8++++----
Mvariants/root-x86_64/oldsystem.environment | 8++++----
28 files changed, 983 insertions(+), 70 deletions(-)

diff --git a/templates/gmp b/templates/gmp @@ -0,0 +1,15 @@ +{%- set pkg_version="6.3.0" -%} +{%- set pkg_source="tar.xz" -%} +{% extends "autotools_static_mini" %} +{%- block template_deps %}{% endblock %} +{% block package_deps -%} +#+{{pkg_install_name("musl-cross-make:bootstrap-1")}} +#+{{pkg_install_name("gnu-make:bootstrap")}} +#+{{pkg_install_name("busybox:bootstrap")}} +{% endblock %} +{% block configure_args %}--disable-nls{% endblock %} +{% block genlinks_begin %} + {{- super() }} + x["./{{libdir}}/libgmp.a"]=1 + x["./{{includedir}}/gmp.h"]=1 +{% endblock %} diff --git a/templates/pkg/binutils b/templates/pkg/binutils @@ -0,0 +1,39 @@ +{%- set pkg_version="2.44" -%} +{%- set pkg_source="tar.gz" -%} +{% extends "autotools_static_mini" %} +{%- block template_deps %}{% endblock %} +{% block package_deps -%} +#+{{pkg_install_name("musl-cross-make:bootstrap-1")}} +#+{{pkg_install_name("gnu-make:bootstrap")}} +#+{{pkg_install_name("busybox:bootstrap")}} +{% endblock %} +{% block configure_args -%} + --disable-nls \ + --disable-werror \ + --disable-multilib \ + --enable-deterministic-archives +{%- endblock %} +{% block check -%} +check_static {{bindir}}/ar +check_static {{bindir}}/as +check_static {{bindir}}/ld +check_static {{bindir}}/nm +check_static {{bindir}}/objdump +check_static {{bindir}}/objcopy +check_static {{bindir}}/ranlib +check_static {{bindir}}/readelf +check_static {{bindir}}/strip + +{% endblock %} +{% block genlinks_begin %} + {{- super() }} + x["./{{bindir}}/ar"]=1 + x["./{{bindir}}/as"]=1 + x["./{{bindir}}/ld"]=1 + x["./{{bindir}}/nm"]=1 + x["./{{bindir}}/objdump"]=1 + x["./{{bindir}}/objcopy"]=1 + x["./{{bindir}}/ranlib"]=1 + x["./{{bindir}}/readelf"]=1 + x["./{{bindir}}/strip"]=1 +{% endblock %} diff --git a/templates/pkg/mpc b/templates/pkg/mpc @@ -0,0 +1,15 @@ +{%- set pkg_version="1.3.1" -%} +{%- set pkg_source="tar.gz" -%} +{% extends "autotools_static_mini" %} +{%- block template_deps %}{% endblock %} +{% block package_deps -%} +#+{{pkg_install_name("musl-cross-make:bootstrap-1")}} +#+{{pkg_install_name("gnu-make:bootstrap")}} +#+{{pkg_install_name("busybox:bootstrap")}} +{% endblock %} +{% block configure_args %}--disable-nls{% endblock %} +{% block genlinks_begin %} + {{- super() }} + x["./{{libdir}}/libmpc.a"]=1 + x["./{{includedir}}/mpc.h"]=1 +{% endblock %} diff --git a/templates/pkg/mpfr b/templates/pkg/mpfr @@ -0,0 +1,16 @@ +{%- set pkg_version="4.2.2" -%} +{%- set pkg_source="tar.xz" -%} +{% extends "autotools_static_mini" %} +{%- block template_deps %}{% endblock %} +{% block package_deps -%} +#+{{pkg_install_name("musl-cross-make:bootstrap-1")}} +#+{{pkg_install_name("gnu-make:bootstrap")}} +#+{{pkg_install_name("busybox:bootstrap")}} +{% endblock %} +{% block configure_args %}--disable-nls{% endblock %} +{% block genlinks_begin %} + {{- super() }} + x["./{{libdir}}/libmpfr.a"]=1 + x["./{{includedir}}/mpfr.h"]=1 + x["./{{includedir}}/mpf2mpfr.h"]=1 +{% endblock %} diff --git a/templates/pkg/musl-cross-make:old b/templates/pkg/musl-cross-make:old @@ -4,7 +4,7 @@ #+{{pkg_install_name("gnu-make:oldbootstrap")}} #+{{pkg_install_name("busybox:oldbootstrap")}} {{ ps.mcm_sources( - gcc="gcc-11.2.0.tar.xz", + gcc="gcc-14.3.0.tar.xz", linux="linux-6.5.4.tar.xz", musl="musl-1.2.5.tar.gz", binutils="binutils-2.44.tar.gz", @@ -29,7 +29,7 @@ printf '%s\n' 'int main(void) { return 0; }' >true.c printf '%s\n' >musl-cross-make/config.mak \ "OUTPUT=${pthbs_destdir%/}{{versions}}/$pthbs_package" \ "TARGET=x86_64-linux-musl" \ - 'GCC_VER=11.2.0' \ + 'GCC_VER=14.3.0' \ 'LINUX_VER=6.5.4' \ 'MUSL_VER=1.2.5' \ 'BINUTILS_VER=2.44' \ @@ -48,8 +48,8 @@ touch musl-cross-make/sources/* # Patch linker path for dynamic executables -make -C musl-cross-make gcc-11.2.0 -sed -i -e 's|/lib/ld-musl-|{{versions}}/'"$pthbs_package"'/x86_64-linux-musl/lib/ld-musl-|' musl-cross-make/gcc-11.2.0/gcc/config/*/linux*.h +make -C musl-cross-make gcc-14.3.0 +sed -i -e 's|/lib/ld-musl-|{{versions}}/'"$pthbs_package"'/x86_64-linux-musl/lib/ld-musl-|' musl-cross-make/gcc-14.3.0/gcc/config/*/linux*.h make -j${JOBS:-1} -l$((1+${JOBS:-1})) -C musl-cross-make || exit $? make -C musl-cross-make install || exit $? diff --git a/templates/pkg/musl-cross-make:oldbootstrap-1 b/templates/pkg/musl-cross-make:oldbootstrap-1 @@ -4,7 +4,7 @@ #@pragma:nopath #+{{pkg_install_name("musl-cross-make:oldbootstrap-0")}} {{ ps.mcm_sources( - gcc="gcc-11.2.0.tar.xz", + gcc="gcc-14.3.0.tar.xz", linux="linux-headers-4.19.88-2.tar.xz", musl="musl-1.2.5.tar.gz", binutils="binutils-2.44.tar.gz", @@ -29,7 +29,7 @@ printf '%s\n' 'int main(void) { return 0; }' >true.c printf '%s\n' >musl-cross-make/config.mak \ "OUTPUT=${pthbs_destdir%/}{{versions}}/$pthbs_package" \ - 'GCC_VER=11.2.0' \ + 'GCC_VER=14.3.0' \ 'MUSL_VER=1.2.5' \ 'BINUTILS_VER=2.44' \ 'GMP_VER=6.3.0' \ @@ -46,8 +46,8 @@ touch musl-cross-make/sources/* # Patch linker path for dynamic executables -make -C musl-cross-make gcc-11.2.0 -sed -i -e 's|/lib/ld-musl-|{{versions}}/'"$pthbs_package"'/x86_64-linux-musl/lib/ld-musl-|' musl-cross-make/gcc-11.2.0/gcc/config/*/linux*.h +make -C musl-cross-make gcc-14.3.0 +sed -i -e 's|/lib/ld-musl-|{{versions}}/'"$pthbs_package"'/x86_64-linux-musl/lib/ld-musl-|' musl-cross-make/gcc-14.3.0/gcc/config/*/linux*.h export PATH="$bootstrap/bin:$PATH" make -j${JOBS:-1} -l$((1+${JOBS:-1})) -C musl-cross-make diff --git a/variants/ccx-x86_64/binutils b/variants/ccx-x86_64/binutils @@ -0,0 +1,151 @@ +#!/usr/bin/env pthbs-build +#+musl-cross-make.76cf279d5ad4a8701de2ea5025aa8e2e94f0bcbf79eee534d7e66197c6c853c1 +#+gnu-make.f2ed650e0fc6741ae940145d114a932779251b577642c9c7b42f5d3fc1b8a7cb +#+busybox.1088391ecd6b6f76bc9fcf85cdfee4899ed5d5a4265e996dd1b5ff06eef39a7e +#@untar:-z:sha256:0cdd76777a0dfd3dd3a63f215f030208ddb91c2361d2bcc02acec0f1c16b6a2e:. + + +# - build script start - + +autotools_config() { + prefix=/home/ccx/versions/$pthbs_package + ./configure -C \ + --prefix="$prefix" \ + --build="$(${CC:-gcc} -dumpmachine)" \ + --bindir="$prefix/command" \ + --sbindir="$prefix/command" \ + --infodir="$prefix/info" \ + --localedir="$prefix/locale" \ + --mandir="$prefix/man" \ + --libdir="$prefix/library" \ + --docdir="$prefix/doc/binutils" \ + --datadir="$prefix/data" \ + --datarootdir="$prefix/data" \ + --localstatedir='/var/pthbs' \ + "$@" + +} + +autotools_config_static() { + autotools_config "$@" --enable-static --disable-shared +} + +build_env_static() { + export LD_LIBRARY_PATH="$pthbs_build_environment/library" + export CPATH="$pthbs_build_environment/include" + export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS" +} + +check_static() { + local exe || true + exe=$pthbs_destdir'/home/ccx/versions'/$pthbs_package/$1 + if ! test -f $exe; then + printf '%s\n' "Error: file '$1' doesn't exist!" + exit 1 + fi + local interp_info || true + interp_info=$(readelf --string-dump=.interp "$exe") || exit $? + if test x '!=' "x$interp_info"; then + printf '%s\n' "Error: '$1' is a dynamic binary!" + exit 1 + fi +} + +prefix=/home/ccx/versions/$pthbs_package +dest=${pthbs_destdir%/}${prefix} +cd 'binutils-2.44' + + +build_env_static +autotools_config_static --disable-nls \ + --disable-werror \ + --disable-multilib \ + --enable-deterministic-archives + + +make -j${JOBS:-1} -l$((1+${JOBS:-1})) + +make DESTDIR="$pthbs_destdir" install + + + +check_static command/ar +check_static command/as +check_static command/ld +check_static command/nm +check_static command/objdump +check_static command/objcopy +check_static command/ranlib +check_static command/readelf +check_static command/strip + + + +cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { + x["./command/ar"]=1 + x["./command/as"]=1 + x["./command/ld"]=1 + x["./command/nm"]=1 + x["./command/objdump"]=1 + x["./command/objcopy"]=1 + x["./command/ranlib"]=1 + x["./command/readelf"]=1 + x["./command/strip"]=1 +} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} +$2 == "env" { link($0); next } +$2 == ".env-template" { link($0); next } + +$2 == "command" { link($0); next } +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } +$2 == "sbin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 == "info" { link(s1("info", r1($0))); next } +$2 == "share" && $3 == "man" { link(s1("man", r1($0))); next } +$2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next } + +$2 == "config" { link($0); next } +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + retcode = 0 + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + retcode = 3 + } + } + exit retcode +}' >.install-links.new +mv .install-links.new .install-links + diff --git a/variants/ccx-x86_64/busybox:old b/variants/ccx-x86_64/busybox:old @@ -1,7 +1,7 @@ #!/usr/bin/env pthbs-build -#+musl-cross-make.d38c8a7463c544495c98f05e7bbf3f5bd506dce1767e49107171106181beee38 -#+gnu-make.d64fe629f7325849098525d750e08b69851d98c538fddf567b60d3747a37414e -#+busybox.10583373cf491e61c81eb70d3456459dad19454f9ebf8b4c292910ee954ac7d8 +#+musl-cross-make.f5a4abf5bfeae7b350908fea7ad7ebd08beb000f82f37752535cb21fd03867a6 +#+gnu-make.4914f09b4a50c385733bf1ab720076dd22771fad7f1675c043e6c15b535965f8 +#+busybox.ff42a163f10913129299f6bad062442e6efdd3422b7fd441e7f2f3845e4d317c #@sha256:31b8f61d2173fa36d4409e8e91f52088691d6ba4db13efe19ea7ae7512e64275:busybox/.config #@git:3621595939e43a831d66f6b757d4f410029bff95:busybox diff --git a/variants/ccx-x86_64/busybox:oldbootstrap b/variants/ccx-x86_64/busybox:oldbootstrap @@ -1,13 +1,13 @@ #!/usr/bin/env pthbs-build #@pragma:nosandbox #@pragma:nopath -#+musl-cross-make.ac2edd573c23ae77e5f98b4ec8d02e0b15db39d6154ff0a67e5f28f1baa5bfd6 -#+gnu-make.d64fe629f7325849098525d750e08b69851d98c538fddf567b60d3747a37414e +#+musl-cross-make.f5bbce43c2ebda8f0ef1df1c294c6612f93737264b11a58f066e9ac4f6957c6b +#+gnu-make.4914f09b4a50c385733bf1ab720076dd22771fad7f1675c043e6c15b535965f8 #@git:aa4d303a3139107919f73cece4eaf85a7dc75db6:busybox #@sha256:9ee52091d7a41e7e492d508574573fbebe64155d85a07980128f21105eaad1e2:busybox/.config -mcm=/home/ccx/versions/musl-cross-make.ac2edd573c23ae77e5f98b4ec8d02e0b15db39d6154ff0a67e5f28f1baa5bfd6 -make=/home/ccx/versions/gnu-make.d64fe629f7325849098525d750e08b69851d98c538fddf567b60d3747a37414e +mcm=/home/ccx/versions/musl-cross-make.f5bbce43c2ebda8f0ef1df1c294c6612f93737264b11a58f066e9ac4f6957c6b +make=/home/ccx/versions/gnu-make.4914f09b4a50c385733bf1ab720076dd22771fad7f1675c043e6c15b535965f8 export PATH="$mcm/bin:$make/command:$PATH" export CC="$mcm/bin/x86_64-linux-musl-gcc" diff --git a/variants/ccx-x86_64/gnu-make:old b/variants/ccx-x86_64/gnu-make:old @@ -1,7 +1,7 @@ #!/usr/bin/env pthbs-build -#+musl-cross-make.d38c8a7463c544495c98f05e7bbf3f5bd506dce1767e49107171106181beee38 -#+gnu-make.d64fe629f7325849098525d750e08b69851d98c538fddf567b60d3747a37414e -#+busybox.10583373cf491e61c81eb70d3456459dad19454f9ebf8b4c292910ee954ac7d8 +#+musl-cross-make.f5a4abf5bfeae7b350908fea7ad7ebd08beb000f82f37752535cb21fd03867a6 +#+gnu-make.4914f09b4a50c385733bf1ab720076dd22771fad7f1675c043e6c15b535965f8 +#+busybox.ff42a163f10913129299f6bad062442e6efdd3422b7fd441e7f2f3845e4d317c #@untar:-z:sha256:dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3:. diff --git a/variants/ccx-x86_64/gnu-make:oldbootstrap b/variants/ccx-x86_64/gnu-make:oldbootstrap @@ -1,7 +1,7 @@ #!/usr/bin/env pthbs-build #@pragma:nosandbox #@pragma:nopath -#+musl-cross-make.ac2edd573c23ae77e5f98b4ec8d02e0b15db39d6154ff0a67e5f28f1baa5bfd6 +#+musl-cross-make.f5bbce43c2ebda8f0ef1df1c294c6612f93737264b11a58f066e9ac4f6957c6b #@untar:-z:sha256:dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3:. @@ -36,7 +36,7 @@ dest=${pthbs_destdir%/}${prefix} cd 'make-4.4.1' -mcm=/home/ccx/versions/musl-cross-make.ac2edd573c23ae77e5f98b4ec8d02e0b15db39d6154ff0a67e5f28f1baa5bfd6 +mcm=/home/ccx/versions/musl-cross-make.f5bbce43c2ebda8f0ef1df1c294c6612f93737264b11a58f066e9ac4f6957c6b export PATH="$mcm/bin:$PATH" export CC="$mcm/bin/x86_64-linux-musl-gcc" diff --git a/variants/ccx-x86_64/mpc b/variants/ccx-x86_64/mpc @@ -0,0 +1,131 @@ +#!/usr/bin/env pthbs-build +#+musl-cross-make.76cf279d5ad4a8701de2ea5025aa8e2e94f0bcbf79eee534d7e66197c6c853c1 +#+gnu-make.f2ed650e0fc6741ae940145d114a932779251b577642c9c7b42f5d3fc1b8a7cb +#+busybox.1088391ecd6b6f76bc9fcf85cdfee4899ed5d5a4265e996dd1b5ff06eef39a7e +#@untar:-z:sha256:ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8:. + + +# - build script start - + +autotools_config() { + prefix=/home/ccx/versions/$pthbs_package + ./configure -C \ + --prefix="$prefix" \ + --build="$(${CC:-gcc} -dumpmachine)" \ + --bindir="$prefix/command" \ + --sbindir="$prefix/command" \ + --infodir="$prefix/info" \ + --localedir="$prefix/locale" \ + --mandir="$prefix/man" \ + --libdir="$prefix/library" \ + --docdir="$prefix/doc/mpc" \ + --datadir="$prefix/data" \ + --datarootdir="$prefix/data" \ + --localstatedir='/var/pthbs' \ + "$@" + +} + +autotools_config_static() { + autotools_config "$@" --enable-static --disable-shared +} + +build_env_static() { + export LD_LIBRARY_PATH="$pthbs_build_environment/library" + export CPATH="$pthbs_build_environment/include" + export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS" +} + +check_static() { + local exe || true + exe=$pthbs_destdir'/home/ccx/versions'/$pthbs_package/$1 + if ! test -f $exe; then + printf '%s\n' "Error: file '$1' doesn't exist!" + exit 1 + fi + local interp_info || true + interp_info=$(readelf --string-dump=.interp "$exe") || exit $? + if test x '!=' "x$interp_info"; then + printf '%s\n' "Error: '$1' is a dynamic binary!" + exit 1 + fi +} + +prefix=/home/ccx/versions/$pthbs_package +dest=${pthbs_destdir%/}${prefix} +cd 'mpc-1.3.1' + + +build_env_static +autotools_config_static --disable-nls + + +make -j${JOBS:-1} -l$((1+${JOBS:-1})) + +make DESTDIR="$pthbs_destdir" install + + + + + +cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { + x["./library/libmpc.a"]=1 + x["./include/mpc.h"]=1 +} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} +$2 == "env" { link($0); next } +$2 == ".env-template" { link($0); next } + +$2 == "command" { link($0); next } +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } +$2 == "sbin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 == "info" { link(s1("info", r1($0))); next } +$2 == "share" && $3 == "man" { link(s1("man", r1($0))); next } +$2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next } + +$2 == "config" { link($0); next } +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + retcode = 0 + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + retcode = 3 + } + } + exit retcode +}' >.install-links.new +mv .install-links.new .install-links + diff --git a/variants/ccx-x86_64/mpfr b/variants/ccx-x86_64/mpfr @@ -0,0 +1,132 @@ +#!/usr/bin/env pthbs-build +#+musl-cross-make.76cf279d5ad4a8701de2ea5025aa8e2e94f0bcbf79eee534d7e66197c6c853c1 +#+gnu-make.f2ed650e0fc6741ae940145d114a932779251b577642c9c7b42f5d3fc1b8a7cb +#+busybox.1088391ecd6b6f76bc9fcf85cdfee4899ed5d5a4265e996dd1b5ff06eef39a7e +#@untar:-J:sha256:b67ba0383ef7e8a8563734e2e889ef5ec3c3b898a01d00fa0a6869ad81c6ce01:. + + +# - build script start - + +autotools_config() { + prefix=/home/ccx/versions/$pthbs_package + ./configure -C \ + --prefix="$prefix" \ + --build="$(${CC:-gcc} -dumpmachine)" \ + --bindir="$prefix/command" \ + --sbindir="$prefix/command" \ + --infodir="$prefix/info" \ + --localedir="$prefix/locale" \ + --mandir="$prefix/man" \ + --libdir="$prefix/library" \ + --docdir="$prefix/doc/mpfr" \ + --datadir="$prefix/data" \ + --datarootdir="$prefix/data" \ + --localstatedir='/var/pthbs' \ + "$@" + +} + +autotools_config_static() { + autotools_config "$@" --enable-static --disable-shared +} + +build_env_static() { + export LD_LIBRARY_PATH="$pthbs_build_environment/library" + export CPATH="$pthbs_build_environment/include" + export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS" +} + +check_static() { + local exe || true + exe=$pthbs_destdir'/home/ccx/versions'/$pthbs_package/$1 + if ! test -f $exe; then + printf '%s\n' "Error: file '$1' doesn't exist!" + exit 1 + fi + local interp_info || true + interp_info=$(readelf --string-dump=.interp "$exe") || exit $? + if test x '!=' "x$interp_info"; then + printf '%s\n' "Error: '$1' is a dynamic binary!" + exit 1 + fi +} + +prefix=/home/ccx/versions/$pthbs_package +dest=${pthbs_destdir%/}${prefix} +cd 'mpfr-4.2.2' + + +build_env_static +autotools_config_static --disable-nls + + +make -j${JOBS:-1} -l$((1+${JOBS:-1})) + +make DESTDIR="$pthbs_destdir" install + + + + + +cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { + x["./library/libmpfr.a"]=1 + x["./include/mpfr.h"]=1 + x["./include/mpf2mpfr.h"]=1 +} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} +$2 == "env" { link($0); next } +$2 == ".env-template" { link($0); next } + +$2 == "command" { link($0); next } +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } +$2 == "sbin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 == "info" { link(s1("info", r1($0))); next } +$2 == "share" && $3 == "man" { link(s1("man", r1($0))); next } +$2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next } + +$2 == "config" { link($0); next } +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + retcode = 0 + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + retcode = 3 + } + } + exit retcode +}' >.install-links.new +mv .install-links.new .install-links + diff --git a/variants/ccx-x86_64/musl-cross-make:old b/variants/ccx-x86_64/musl-cross-make:old @@ -1,13 +1,13 @@ #!/usr/bin/env pthbs-build -#+musl-cross-make.ac2edd573c23ae77e5f98b4ec8d02e0b15db39d6154ff0a67e5f28f1baa5bfd6 -#+gnu-make.d64fe629f7325849098525d750e08b69851d98c538fddf567b60d3747a37414e -#+busybox.10583373cf491e61c81eb70d3456459dad19454f9ebf8b4c292910ee954ac7d8 +#+musl-cross-make.f5bbce43c2ebda8f0ef1df1c294c6612f93737264b11a58f066e9ac4f6957c6b +#+gnu-make.4914f09b4a50c385733bf1ab720076dd22771fad7f1675c043e6c15b535965f8 +#+busybox.ff42a163f10913129299f6bad062442e6efdd3422b7fd441e7f2f3845e4d317c #@sha256:0cdd76777a0dfd3dd3a63f215f030208ddb91c2361d2bcc02acec0f1c16b6a2e:musl-cross-make/sources/binutils-2.44.tar.gz #@sha256:a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898:musl-cross-make/sources/gmp-6.3.0.tar.xz #@sha256:b67ba0383ef7e8a8563734e2e889ef5ec3c3b898a01d00fa0a6869ad81c6ce01:musl-cross-make/sources/mpfr-4.2.2.tar.xz #@sha256:bdf76c15229b241e578046b8486106f09534d754ea4cbf105e0660e551fb1669:musl-cross-make/sources/linux-6.5.4.tar.xz #@sha256:ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8:musl-cross-make/sources/mpc-1.3.1.tar.gz -#@sha256:d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b:musl-cross-make/sources/gcc-11.2.0.tar.xz +#@sha256:e0dc77297625631ac8e50fa92fffefe899a4eb702592da5c32ef04e2293aca3a:musl-cross-make/sources/gcc-14.3.0.tar.xz #@sha256:a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4:musl-cross-make/sources/musl-1.2.5.tar.gz #@sha256:75d5d255a2a273b6e651f82eecfabf6cbcd8eaeae70e86b417384c8f4a58d8d3:musl-cross-make/sources/config.sub #@sha256:4213e75809588e3f32ae0fde8fb11df2dfd6e0e013762ff5ee951c3aadb7ffc0:musl-cross-make/patches/linux-6.5.4/0001-no-rsync-headers.diff @@ -27,7 +27,7 @@ printf '%s\n' 'int main(void) { return 0; }' >true.c printf '%s\n' >musl-cross-make/config.mak \ "OUTPUT=${pthbs_destdir%/}/home/ccx/versions/$pthbs_package" \ "TARGET=x86_64-linux-musl" \ - 'GCC_VER=11.2.0' \ + 'GCC_VER=14.3.0' \ 'LINUX_VER=6.5.4' \ 'MUSL_VER=1.2.5' \ 'BINUTILS_VER=2.44' \ @@ -46,8 +46,8 @@ touch musl-cross-make/sources/* # Patch linker path for dynamic executables -make -C musl-cross-make gcc-11.2.0 -sed -i -e 's|/lib/ld-musl-|/home/ccx/versions/'"$pthbs_package"'/x86_64-linux-musl/lib/ld-musl-|' musl-cross-make/gcc-11.2.0/gcc/config/*/linux*.h +make -C musl-cross-make gcc-14.3.0 +sed -i -e 's|/lib/ld-musl-|/home/ccx/versions/'"$pthbs_package"'/x86_64-linux-musl/lib/ld-musl-|' musl-cross-make/gcc-14.3.0/gcc/config/*/linux*.h make -j${JOBS:-1} -l$((1+${JOBS:-1})) -C musl-cross-make || exit $? make -C musl-cross-make install || exit $? diff --git a/variants/ccx-x86_64/musl-cross-make:oldbootstrap-1 b/variants/ccx-x86_64/musl-cross-make:oldbootstrap-1 @@ -7,7 +7,7 @@ #@sha256:b67ba0383ef7e8a8563734e2e889ef5ec3c3b898a01d00fa0a6869ad81c6ce01:musl-cross-make/sources/mpfr-4.2.2.tar.xz #@sha256:dc7abf734487553644258a3822cfd429d74656749e309f2b25f09f4282e05588:musl-cross-make/sources/linux-headers-4.19.88-2.tar.xz #@sha256:ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8:musl-cross-make/sources/mpc-1.3.1.tar.gz -#@sha256:d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b:musl-cross-make/sources/gcc-11.2.0.tar.xz +#@sha256:e0dc77297625631ac8e50fa92fffefe899a4eb702592da5c32ef04e2293aca3a:musl-cross-make/sources/gcc-14.3.0.tar.xz #@sha256:a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4:musl-cross-make/sources/musl-1.2.5.tar.gz #@sha256:75d5d255a2a273b6e651f82eecfabf6cbcd8eaeae70e86b417384c8f4a58d8d3:musl-cross-make/sources/config.sub #@git:cf9b601eba1b8c4a3c0655ba25d7fc8cfa365cbc:musl-cross-make @@ -27,7 +27,7 @@ printf '%s\n' 'int main(void) { return 0; }' >true.c printf '%s\n' >musl-cross-make/config.mak \ "OUTPUT=${pthbs_destdir%/}/home/ccx/versions/$pthbs_package" \ - 'GCC_VER=11.2.0' \ + 'GCC_VER=14.3.0' \ 'MUSL_VER=1.2.5' \ 'BINUTILS_VER=2.44' \ 'GMP_VER=6.3.0' \ @@ -44,8 +44,8 @@ touch musl-cross-make/sources/* # Patch linker path for dynamic executables -make -C musl-cross-make gcc-11.2.0 -sed -i -e 's|/lib/ld-musl-|/home/ccx/versions/'"$pthbs_package"'/x86_64-linux-musl/lib/ld-musl-|' musl-cross-make/gcc-11.2.0/gcc/config/*/linux*.h +make -C musl-cross-make gcc-14.3.0 +sed -i -e 's|/lib/ld-musl-|/home/ccx/versions/'"$pthbs_package"'/x86_64-linux-musl/lib/ld-musl-|' musl-cross-make/gcc-14.3.0/gcc/config/*/linux*.h export PATH="$bootstrap/bin:$PATH" make -j${JOBS:-1} -l$((1+${JOBS:-1})) -C musl-cross-make diff --git a/variants/ccx-x86_64/oldbootstrap.environment b/variants/ccx-x86_64/oldbootstrap.environment @@ -1,4 +1,4 @@ #!/usr/bin/env pthbs-build -#+busybox.10583373cf491e61c81eb70d3456459dad19454f9ebf8b4c292910ee954ac7d8 -#+gnu-make.d64fe629f7325849098525d750e08b69851d98c538fddf567b60d3747a37414e -#+musl-cross-make.ac2edd573c23ae77e5f98b4ec8d02e0b15db39d6154ff0a67e5f28f1baa5bfd6- \ No newline at end of file +#+busybox.ff42a163f10913129299f6bad062442e6efdd3422b7fd441e7f2f3845e4d317c +#+gnu-make.4914f09b4a50c385733bf1ab720076dd22771fad7f1675c043e6c15b535965f8 +#+musl-cross-make.f5bbce43c2ebda8f0ef1df1c294c6612f93737264b11a58f066e9ac4f6957c6b+ \ No newline at end of file diff --git a/variants/ccx-x86_64/oldsystem.environment b/variants/ccx-x86_64/oldsystem.environment @@ -1,4 +1,4 @@ #!/usr/bin/env pthbs-build -#+musl-cross-make.d38c8a7463c544495c98f05e7bbf3f5bd506dce1767e49107171106181beee38 -#+busybox.333ac8e4b8524ca62be88fa2a64f869b6aa4d3ac2c35d5ffe3d060995b9559e4 -#+gnu-make.17c07e3aeb01579587946c31c2e0067fa473a9d89ac89c21962106c3e0ca22d7- \ No newline at end of file +#+musl-cross-make.f5a4abf5bfeae7b350908fea7ad7ebd08beb000f82f37752535cb21fd03867a6 +#+busybox.4af2aa1b670555934b813030d9152ee1c058bbf7eb87cf1efea57c606d747749 +#+gnu-make.34ada7aacdbfab1b3e19b5999df9e1f8a67f2f0dccf191ccc2108f1688660458+ \ No newline at end of file diff --git a/variants/root-x86_64/binutils b/variants/root-x86_64/binutils @@ -0,0 +1,151 @@ +#!/usr/bin/env pthbs-build +#+musl-cross-make.fc96c556cd0441f0bef75ae5ddbcd87d0b9b0a9cc439cf01f1d11f44dc589112 +#+gnu-make.3bf13b906d934aba6aab1bfa4cce7e2b6d42237210aaad5838dfa892b0fa6a65 +#+busybox.95c7eb9aa918180c02ac47c18a44c214bc28b3c20761fc6a9543f7a80e91aa57 +#@untar:-z:sha256:0cdd76777a0dfd3dd3a63f215f030208ddb91c2361d2bcc02acec0f1c16b6a2e:. + + +# - build script start - + +autotools_config() { + prefix=/versions/$pthbs_package + ./configure -C \ + --prefix="$prefix" \ + --build="$(${CC:-gcc} -dumpmachine)" \ + --bindir="$prefix/command" \ + --sbindir="$prefix/command" \ + --infodir="$prefix/info" \ + --localedir="$prefix/locale" \ + --mandir="$prefix/man" \ + --libdir="$prefix/library" \ + --docdir="$prefix/doc/binutils" \ + --datadir="$prefix/data" \ + --datarootdir="$prefix/data" \ + --localstatedir='/var/pthbs' \ + "$@" + +} + +autotools_config_static() { + autotools_config "$@" --enable-static --disable-shared +} + +build_env_static() { + export LD_LIBRARY_PATH="$pthbs_build_environment/library" + export CPATH="$pthbs_build_environment/include" + export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS" +} + +check_static() { + local exe || true + exe=$pthbs_destdir'/versions'/$pthbs_package/$1 + if ! test -f $exe; then + printf '%s\n' "Error: file '$1' doesn't exist!" + exit 1 + fi + local interp_info || true + interp_info=$(readelf --string-dump=.interp "$exe") || exit $? + if test x '!=' "x$interp_info"; then + printf '%s\n' "Error: '$1' is a dynamic binary!" + exit 1 + fi +} + +prefix=/versions/$pthbs_package +dest=${pthbs_destdir%/}${prefix} +cd 'binutils-2.44' + + +build_env_static +autotools_config_static --disable-nls \ + --disable-werror \ + --disable-multilib \ + --enable-deterministic-archives + + +make -j${JOBS:-1} -l$((1+${JOBS:-1})) + +make DESTDIR="$pthbs_destdir" install + + + +check_static command/ar +check_static command/as +check_static command/ld +check_static command/nm +check_static command/objdump +check_static command/objcopy +check_static command/ranlib +check_static command/readelf +check_static command/strip + + + +cd "$pthbs_destdir/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { + x["./command/ar"]=1 + x["./command/as"]=1 + x["./command/ld"]=1 + x["./command/nm"]=1 + x["./command/objdump"]=1 + x["./command/objcopy"]=1 + x["./command/ranlib"]=1 + x["./command/readelf"]=1 + x["./command/strip"]=1 +} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} +$2 == "env" { link($0); next } +$2 == ".env-template" { link($0); next } + +$2 == "command" { link($0); next } +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } +$2 == "sbin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 == "info" { link(s1("info", r1($0))); next } +$2 == "share" && $3 == "man" { link(s1("man", r1($0))); next } +$2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next } + +$2 == "config" { link($0); next } +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + retcode = 0 + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + retcode = 3 + } + } + exit retcode +}' >.install-links.new +mv .install-links.new .install-links + diff --git a/variants/root-x86_64/busybox:old b/variants/root-x86_64/busybox:old @@ -1,7 +1,7 @@ #!/usr/bin/env pthbs-build -#+musl-cross-make.8fb45df9e9c73f943dded0ffadd11e5ff27729d70394bd7823420d06696e57de -#+gnu-make.4ea847bbd825710f818c7c66fe73908ad838ec0f27dbee19def9f32f02ea2af5 -#+busybox.6a704fc70c792c5a890d8d5c592ff5f326018d9daca620730f42627c8eb4c416 +#+musl-cross-make.5da5d45870b9b3de8b53eb841f260b8cf0d63212217dbcf23dc0a91c4cccbe3a +#+gnu-make.7e2f01c60eff218547bf81af2bc96317476ad011c923e014d89937325389077b +#+busybox.0dcdccc7129012233193d592d24cd8f26263c4ab09553ba991729d67a8f44c84 #@sha256:31b8f61d2173fa36d4409e8e91f52088691d6ba4db13efe19ea7ae7512e64275:busybox/.config #@git:3621595939e43a831d66f6b757d4f410029bff95:busybox diff --git a/variants/root-x86_64/busybox:oldbootstrap b/variants/root-x86_64/busybox:oldbootstrap @@ -1,13 +1,13 @@ #!/usr/bin/env pthbs-build #@pragma:nosandbox #@pragma:nopath -#+musl-cross-make.360c2d2fee26a514509b3c1cd430156951e8128fe307702a6d18491e6cbbe0f6 -#+gnu-make.4ea847bbd825710f818c7c66fe73908ad838ec0f27dbee19def9f32f02ea2af5 +#+musl-cross-make.0ab380cdb0150ec358f72253adeb154112c792fd5f29abb6217f62328eb678ec +#+gnu-make.7e2f01c60eff218547bf81af2bc96317476ad011c923e014d89937325389077b #@git:aa4d303a3139107919f73cece4eaf85a7dc75db6:busybox #@sha256:9ee52091d7a41e7e492d508574573fbebe64155d85a07980128f21105eaad1e2:busybox/.config -mcm=/versions/musl-cross-make.360c2d2fee26a514509b3c1cd430156951e8128fe307702a6d18491e6cbbe0f6 -make=/versions/gnu-make.4ea847bbd825710f818c7c66fe73908ad838ec0f27dbee19def9f32f02ea2af5 +mcm=/versions/musl-cross-make.0ab380cdb0150ec358f72253adeb154112c792fd5f29abb6217f62328eb678ec +make=/versions/gnu-make.7e2f01c60eff218547bf81af2bc96317476ad011c923e014d89937325389077b export PATH="$mcm/bin:$make/command:$PATH" export CC="$mcm/bin/x86_64-linux-musl-gcc" diff --git a/variants/root-x86_64/gnu-make:old b/variants/root-x86_64/gnu-make:old @@ -1,7 +1,7 @@ #!/usr/bin/env pthbs-build -#+musl-cross-make.8fb45df9e9c73f943dded0ffadd11e5ff27729d70394bd7823420d06696e57de -#+gnu-make.4ea847bbd825710f818c7c66fe73908ad838ec0f27dbee19def9f32f02ea2af5 -#+busybox.6a704fc70c792c5a890d8d5c592ff5f326018d9daca620730f42627c8eb4c416 +#+musl-cross-make.5da5d45870b9b3de8b53eb841f260b8cf0d63212217dbcf23dc0a91c4cccbe3a +#+gnu-make.7e2f01c60eff218547bf81af2bc96317476ad011c923e014d89937325389077b +#+busybox.0dcdccc7129012233193d592d24cd8f26263c4ab09553ba991729d67a8f44c84 #@untar:-z:sha256:dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3:. diff --git a/variants/root-x86_64/gnu-make:oldbootstrap b/variants/root-x86_64/gnu-make:oldbootstrap @@ -1,7 +1,7 @@ #!/usr/bin/env pthbs-build #@pragma:nosandbox #@pragma:nopath -#+musl-cross-make.360c2d2fee26a514509b3c1cd430156951e8128fe307702a6d18491e6cbbe0f6 +#+musl-cross-make.0ab380cdb0150ec358f72253adeb154112c792fd5f29abb6217f62328eb678ec #@untar:-z:sha256:dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3:. @@ -36,7 +36,7 @@ dest=${pthbs_destdir%/}${prefix} cd 'make-4.4.1' -mcm=/versions/musl-cross-make.360c2d2fee26a514509b3c1cd430156951e8128fe307702a6d18491e6cbbe0f6 +mcm=/versions/musl-cross-make.0ab380cdb0150ec358f72253adeb154112c792fd5f29abb6217f62328eb678ec export PATH="$mcm/bin:$PATH" export CC="$mcm/bin/x86_64-linux-musl-gcc" diff --git a/variants/root-x86_64/mpc b/variants/root-x86_64/mpc @@ -0,0 +1,131 @@ +#!/usr/bin/env pthbs-build +#+musl-cross-make.fc96c556cd0441f0bef75ae5ddbcd87d0b9b0a9cc439cf01f1d11f44dc589112 +#+gnu-make.3bf13b906d934aba6aab1bfa4cce7e2b6d42237210aaad5838dfa892b0fa6a65 +#+busybox.95c7eb9aa918180c02ac47c18a44c214bc28b3c20761fc6a9543f7a80e91aa57 +#@untar:-z:sha256:ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8:. + + +# - build script start - + +autotools_config() { + prefix=/versions/$pthbs_package + ./configure -C \ + --prefix="$prefix" \ + --build="$(${CC:-gcc} -dumpmachine)" \ + --bindir="$prefix/command" \ + --sbindir="$prefix/command" \ + --infodir="$prefix/info" \ + --localedir="$prefix/locale" \ + --mandir="$prefix/man" \ + --libdir="$prefix/library" \ + --docdir="$prefix/doc/mpc" \ + --datadir="$prefix/data" \ + --datarootdir="$prefix/data" \ + --localstatedir='/var/pthbs' \ + "$@" + +} + +autotools_config_static() { + autotools_config "$@" --enable-static --disable-shared +} + +build_env_static() { + export LD_LIBRARY_PATH="$pthbs_build_environment/library" + export CPATH="$pthbs_build_environment/include" + export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS" +} + +check_static() { + local exe || true + exe=$pthbs_destdir'/versions'/$pthbs_package/$1 + if ! test -f $exe; then + printf '%s\n' "Error: file '$1' doesn't exist!" + exit 1 + fi + local interp_info || true + interp_info=$(readelf --string-dump=.interp "$exe") || exit $? + if test x '!=' "x$interp_info"; then + printf '%s\n' "Error: '$1' is a dynamic binary!" + exit 1 + fi +} + +prefix=/versions/$pthbs_package +dest=${pthbs_destdir%/}${prefix} +cd 'mpc-1.3.1' + + +build_env_static +autotools_config_static --disable-nls + + +make -j${JOBS:-1} -l$((1+${JOBS:-1})) + +make DESTDIR="$pthbs_destdir" install + + + + + +cd "$pthbs_destdir/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { + x["./library/libmpc.a"]=1 + x["./include/mpc.h"]=1 +} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} +$2 == "env" { link($0); next } +$2 == ".env-template" { link($0); next } + +$2 == "command" { link($0); next } +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } +$2 == "sbin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 == "info" { link(s1("info", r1($0))); next } +$2 == "share" && $3 == "man" { link(s1("man", r1($0))); next } +$2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next } + +$2 == "config" { link($0); next } +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + retcode = 0 + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + retcode = 3 + } + } + exit retcode +}' >.install-links.new +mv .install-links.new .install-links + diff --git a/variants/root-x86_64/mpfr b/variants/root-x86_64/mpfr @@ -0,0 +1,132 @@ +#!/usr/bin/env pthbs-build +#+musl-cross-make.fc96c556cd0441f0bef75ae5ddbcd87d0b9b0a9cc439cf01f1d11f44dc589112 +#+gnu-make.3bf13b906d934aba6aab1bfa4cce7e2b6d42237210aaad5838dfa892b0fa6a65 +#+busybox.95c7eb9aa918180c02ac47c18a44c214bc28b3c20761fc6a9543f7a80e91aa57 +#@untar:-J:sha256:b67ba0383ef7e8a8563734e2e889ef5ec3c3b898a01d00fa0a6869ad81c6ce01:. + + +# - build script start - + +autotools_config() { + prefix=/versions/$pthbs_package + ./configure -C \ + --prefix="$prefix" \ + --build="$(${CC:-gcc} -dumpmachine)" \ + --bindir="$prefix/command" \ + --sbindir="$prefix/command" \ + --infodir="$prefix/info" \ + --localedir="$prefix/locale" \ + --mandir="$prefix/man" \ + --libdir="$prefix/library" \ + --docdir="$prefix/doc/mpfr" \ + --datadir="$prefix/data" \ + --datarootdir="$prefix/data" \ + --localstatedir='/var/pthbs' \ + "$@" + +} + +autotools_config_static() { + autotools_config "$@" --enable-static --disable-shared +} + +build_env_static() { + export LD_LIBRARY_PATH="$pthbs_build_environment/library" + export CPATH="$pthbs_build_environment/include" + export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS" +} + +check_static() { + local exe || true + exe=$pthbs_destdir'/versions'/$pthbs_package/$1 + if ! test -f $exe; then + printf '%s\n' "Error: file '$1' doesn't exist!" + exit 1 + fi + local interp_info || true + interp_info=$(readelf --string-dump=.interp "$exe") || exit $? + if test x '!=' "x$interp_info"; then + printf '%s\n' "Error: '$1' is a dynamic binary!" + exit 1 + fi +} + +prefix=/versions/$pthbs_package +dest=${pthbs_destdir%/}${prefix} +cd 'mpfr-4.2.2' + + +build_env_static +autotools_config_static --disable-nls + + +make -j${JOBS:-1} -l$((1+${JOBS:-1})) + +make DESTDIR="$pthbs_destdir" install + + + + + +cd "$pthbs_destdir/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { + x["./library/libmpfr.a"]=1 + x["./include/mpfr.h"]=1 + x["./include/mpf2mpfr.h"]=1 +} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} +$2 == "env" { link($0); next } +$2 == ".env-template" { link($0); next } + +$2 == "command" { link($0); next } +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } +$2 == "sbin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 == "info" { link(s1("info", r1($0))); next } +$2 == "share" && $3 == "man" { link(s1("man", r1($0))); next } +$2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next } + +$2 == "config" { link($0); next } +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + retcode = 0 + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + retcode = 3 + } + } + exit retcode +}' >.install-links.new +mv .install-links.new .install-links + diff --git a/variants/root-x86_64/musl-cross-make:old b/variants/root-x86_64/musl-cross-make:old @@ -1,13 +1,13 @@ #!/usr/bin/env pthbs-build -#+musl-cross-make.360c2d2fee26a514509b3c1cd430156951e8128fe307702a6d18491e6cbbe0f6 -#+gnu-make.4ea847bbd825710f818c7c66fe73908ad838ec0f27dbee19def9f32f02ea2af5 -#+busybox.6a704fc70c792c5a890d8d5c592ff5f326018d9daca620730f42627c8eb4c416 +#+musl-cross-make.0ab380cdb0150ec358f72253adeb154112c792fd5f29abb6217f62328eb678ec +#+gnu-make.7e2f01c60eff218547bf81af2bc96317476ad011c923e014d89937325389077b +#+busybox.0dcdccc7129012233193d592d24cd8f26263c4ab09553ba991729d67a8f44c84 #@sha256:0cdd76777a0dfd3dd3a63f215f030208ddb91c2361d2bcc02acec0f1c16b6a2e:musl-cross-make/sources/binutils-2.44.tar.gz #@sha256:a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898:musl-cross-make/sources/gmp-6.3.0.tar.xz #@sha256:b67ba0383ef7e8a8563734e2e889ef5ec3c3b898a01d00fa0a6869ad81c6ce01:musl-cross-make/sources/mpfr-4.2.2.tar.xz #@sha256:bdf76c15229b241e578046b8486106f09534d754ea4cbf105e0660e551fb1669:musl-cross-make/sources/linux-6.5.4.tar.xz #@sha256:ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8:musl-cross-make/sources/mpc-1.3.1.tar.gz -#@sha256:d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b:musl-cross-make/sources/gcc-11.2.0.tar.xz +#@sha256:e0dc77297625631ac8e50fa92fffefe899a4eb702592da5c32ef04e2293aca3a:musl-cross-make/sources/gcc-14.3.0.tar.xz #@sha256:a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4:musl-cross-make/sources/musl-1.2.5.tar.gz #@sha256:75d5d255a2a273b6e651f82eecfabf6cbcd8eaeae70e86b417384c8f4a58d8d3:musl-cross-make/sources/config.sub #@sha256:4213e75809588e3f32ae0fde8fb11df2dfd6e0e013762ff5ee951c3aadb7ffc0:musl-cross-make/patches/linux-6.5.4/0001-no-rsync-headers.diff @@ -27,7 +27,7 @@ printf '%s\n' 'int main(void) { return 0; }' >true.c printf '%s\n' >musl-cross-make/config.mak \ "OUTPUT=${pthbs_destdir%/}/versions/$pthbs_package" \ "TARGET=x86_64-linux-musl" \ - 'GCC_VER=11.2.0' \ + 'GCC_VER=14.3.0' \ 'LINUX_VER=6.5.4' \ 'MUSL_VER=1.2.5' \ 'BINUTILS_VER=2.44' \ @@ -46,8 +46,8 @@ touch musl-cross-make/sources/* # Patch linker path for dynamic executables -make -C musl-cross-make gcc-11.2.0 -sed -i -e 's|/lib/ld-musl-|/versions/'"$pthbs_package"'/x86_64-linux-musl/lib/ld-musl-|' musl-cross-make/gcc-11.2.0/gcc/config/*/linux*.h +make -C musl-cross-make gcc-14.3.0 +sed -i -e 's|/lib/ld-musl-|/versions/'"$pthbs_package"'/x86_64-linux-musl/lib/ld-musl-|' musl-cross-make/gcc-14.3.0/gcc/config/*/linux*.h make -j${JOBS:-1} -l$((1+${JOBS:-1})) -C musl-cross-make || exit $? make -C musl-cross-make install || exit $? diff --git a/variants/root-x86_64/musl-cross-make:oldbootstrap-1 b/variants/root-x86_64/musl-cross-make:oldbootstrap-1 @@ -7,7 +7,7 @@ #@sha256:b67ba0383ef7e8a8563734e2e889ef5ec3c3b898a01d00fa0a6869ad81c6ce01:musl-cross-make/sources/mpfr-4.2.2.tar.xz #@sha256:dc7abf734487553644258a3822cfd429d74656749e309f2b25f09f4282e05588:musl-cross-make/sources/linux-headers-4.19.88-2.tar.xz #@sha256:ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8:musl-cross-make/sources/mpc-1.3.1.tar.gz -#@sha256:d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b:musl-cross-make/sources/gcc-11.2.0.tar.xz +#@sha256:e0dc77297625631ac8e50fa92fffefe899a4eb702592da5c32ef04e2293aca3a:musl-cross-make/sources/gcc-14.3.0.tar.xz #@sha256:a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4:musl-cross-make/sources/musl-1.2.5.tar.gz #@sha256:75d5d255a2a273b6e651f82eecfabf6cbcd8eaeae70e86b417384c8f4a58d8d3:musl-cross-make/sources/config.sub #@git:cf9b601eba1b8c4a3c0655ba25d7fc8cfa365cbc:musl-cross-make @@ -27,7 +27,7 @@ printf '%s\n' 'int main(void) { return 0; }' >true.c printf '%s\n' >musl-cross-make/config.mak \ "OUTPUT=${pthbs_destdir%/}/versions/$pthbs_package" \ - 'GCC_VER=11.2.0' \ + 'GCC_VER=14.3.0' \ 'MUSL_VER=1.2.5' \ 'BINUTILS_VER=2.44' \ 'GMP_VER=6.3.0' \ @@ -44,8 +44,8 @@ touch musl-cross-make/sources/* # Patch linker path for dynamic executables -make -C musl-cross-make gcc-11.2.0 -sed -i -e 's|/lib/ld-musl-|/versions/'"$pthbs_package"'/x86_64-linux-musl/lib/ld-musl-|' musl-cross-make/gcc-11.2.0/gcc/config/*/linux*.h +make -C musl-cross-make gcc-14.3.0 +sed -i -e 's|/lib/ld-musl-|/versions/'"$pthbs_package"'/x86_64-linux-musl/lib/ld-musl-|' musl-cross-make/gcc-14.3.0/gcc/config/*/linux*.h export PATH="$bootstrap/bin:$PATH" make -j${JOBS:-1} -l$((1+${JOBS:-1})) -C musl-cross-make diff --git a/variants/root-x86_64/oldbootstrap.environment b/variants/root-x86_64/oldbootstrap.environment @@ -1,4 +1,4 @@ #!/usr/bin/env pthbs-build -#+busybox.6a704fc70c792c5a890d8d5c592ff5f326018d9daca620730f42627c8eb4c416 -#+gnu-make.4ea847bbd825710f818c7c66fe73908ad838ec0f27dbee19def9f32f02ea2af5 -#+musl-cross-make.360c2d2fee26a514509b3c1cd430156951e8128fe307702a6d18491e6cbbe0f6- \ No newline at end of file +#+busybox.0dcdccc7129012233193d592d24cd8f26263c4ab09553ba991729d67a8f44c84 +#+gnu-make.7e2f01c60eff218547bf81af2bc96317476ad011c923e014d89937325389077b +#+musl-cross-make.0ab380cdb0150ec358f72253adeb154112c792fd5f29abb6217f62328eb678ec+ \ No newline at end of file diff --git a/variants/root-x86_64/oldsystem.environment b/variants/root-x86_64/oldsystem.environment @@ -1,4 +1,4 @@ #!/usr/bin/env pthbs-build -#+musl-cross-make.8fb45df9e9c73f943dded0ffadd11e5ff27729d70394bd7823420d06696e57de -#+busybox.475eb4496e130fe51fca19ae5623ad8fae3edb27705a097fd86be43e6663c40a -#+gnu-make.cedcfa579bd16b4c3f04790f5fa167c203cbb0738baf4491f31186e27584e397- \ No newline at end of file +#+musl-cross-make.5da5d45870b9b3de8b53eb841f260b8cf0d63212217dbcf23dc0a91c4cccbe3a +#+busybox.b73e008fbac0c5dcc4430f716cb4e7fe8ba7266f79ab167843c04ee8c5c793bd +#+gnu-make.2c4a412843b0a12e8a964e2e1f239ff339f91ea14a37c3ae5a49ba39b7895c3a+ \ No newline at end of file