galeb

Једноставна статичка дистрибуција заснована на musl-у
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување 3be54c7658e322b9a6e7a23a7c2ec2bc94d2b1ea
родитељ 54ce4c5102ef275e7c4ba7d993189096e4e49371
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Fri, 14 Apr 2023 19:19:41 +0200

2.2 WIP

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
A.gitattributes | 2++
M01-cross.sh | 129+++++++++++++++++++++++++++++++++++++++++--------------------------------------
M02-chroot.sh | 4----
M03-packages.sh | 1074++++++++++++++++++++++++++++++++++++++++++-------------------------------------
MBOOTING | 4++--
Mart/galeb-bw.ansi | 4++--
Mart/galeb.ansi | 4++--
Mart/galeb.source | 4++--
Mfil/README.1st | 4++--
Mfil/man/man8/galeb.8 | 4++--
Mlib/dirs.tsv | 1+
Mlib/env.sh | 4++--
Mlib/fun.sh | 10++++++----
Mlib/pkgs.tsv | 204++++++++++++++++++++++++++++++++++++++++---------------------------------------
Mlib/setperms | 6+++---
Mpat/gcc-alpine/0001-posix_memalign.patch | 7++-----
Dpat/gcc-alpine/0002-gcc-poison-system-directories.patch | 203-------------------------------------------------------------------------------
Dpat/gcc-alpine/0003-Turn-on-Wl-z-relro-z-now-by-default.patch | 39---------------------------------------
Apat/gcc-alpine/0003-specs-turn-on-Wl-z-now-by-default.patch | 41+++++++++++++++++++++++++++++++++++++++++
Mpat/gcc-alpine/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch | 23++++++++++-------------
Dpat/gcc-alpine/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch | 242-------------------------------------------------------------------------------
Mpat/gcc-alpine/0006-Enable-Wformat-and-Wformat-security-by-default.patch | 11++++-------
Mpat/gcc-alpine/0007-Enable-Wtrampolines-by-default.patch | 11++++-------
Mpat/gcc-alpine/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch | 25+++++++++++++++----------
Mpat/gcc-alpine/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch | 11++++-------
Mpat/gcc-alpine/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch | 9+++------
Mpat/gcc-alpine/0011-libiberty-copy-PIC-objects-during-build-process.patch | 9+++------
Mpat/gcc-alpine/0012-libitm-disable-FORTIFY.patch | 7++-----
Dpat/gcc-alpine/0013-libgcc_s.patch | 57---------------------------------------------------------
Mpat/gcc-alpine/0014-nopie.patch | 13+++++--------
Apat/gcc-alpine/0015-dlang-use-libucontext-on-mips64.patch | 21+++++++++++++++++++++
Dpat/gcc-alpine/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch | 25-------------------------
Apat/gcc-alpine/0016-ada-fix-shared-linking.patch | 39+++++++++++++++++++++++++++++++++++++++
Dpat/gcc-alpine/0016-dlang-update-zlib-binding.patch | 425-------------------------------------------------------------------------------
Apat/gcc-alpine/0017-build-fix-CXXFLAGS_FOR_BUILD-passing.patch | 21+++++++++++++++++++++
Dpat/gcc-alpine/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch | 51---------------------------------------------------
Dpat/gcc-alpine/0018-ada-fix-shared-linking.patch | 42------------------------------------------
Apat/gcc-alpine/0018-add-fortify-headers-paths.patch | 22++++++++++++++++++++++
Apat/gcc-alpine/0019-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch | 28++++++++++++++++++++++++++++
Dpat/gcc-alpine/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch | 24------------------------
Dpat/gcc-alpine/0020-add-fortify-headers-paths.patch | 25-------------------------
Dpat/gcc-alpine/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch | 31-------------------------------
Dpat/gcc-alpine/0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch | 69---------------------------------------------------------------------
Dpat/gcc-alpine/0023-Pure-64-bit-MIPS.patch | 47-----------------------------------------------
Dpat/gcc-alpine/0024-use-pure-64-bit-configuration-where-appropriate.patch | 121-------------------------------------------------------------------------------
Dpat/gcc-alpine/0025-always-build-libgcc_eh.a.patch | 51---------------------------------------------------
Apat/gcc-alpine/0025-x86_64-disable-multilib-support.patch | 23+++++++++++++++++++++++
Dpat/gcc-alpine/0026-ada-libgnarl-compatibility-for-musl.patch | 133-------------------------------------------------------------------------------
Dpat/gcc-alpine/0027-ada-musl-support-fixes.patch | 223-------------------------------------------------------------------------------
Apat/gcc-alpine/0027-always-build-libgcc_eh.a.patch | 48++++++++++++++++++++++++++++++++++++++++++++++++
Apat/gcc-alpine/0029-ada-musl-support-fixes.patch | 220+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dpat/gcc-alpine/0029-gcc-go-Don-t-include-sys-user.h.patch | 30------------------------------
Dpat/gcc-alpine/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch | 29-----------------------------
Dpat/gcc-alpine/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch | 43-------------------------------------------
Dpat/gcc-alpine/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch | 38--------------------------------------
Dpat/gcc-alpine/0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch | 24------------------------
Apat/gcc-alpine/0033-gcc-go-link-to-libucontext.patch | 101+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apat/gcc-alpine/0034-Use-generic-errstr.go-implementation-on-musl.patch | 204+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dpat/gcc-alpine/0034-gcc-go-signal-34-is-special-on-musl-libc.patch | 29-----------------------------
Apat/gcc-alpine/0035-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch | 263+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dpat/gcc-alpine/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch | 30------------------------------
Dpat/gcc-alpine/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch | 27---------------------------
Dpat/gcc-alpine/0037-gcc-go-link-to-libucontext.patch | 25-------------------------
Dpat/gcc-alpine/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch | 26--------------------------
Apat/gcc-alpine/0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dpat/gcc-alpine/0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch | 264-------------------------------------------------------------------------------
Dpat/gcc-alpine/0041-Use-generic-errstr.go-implementation-on-musl.patch | 48------------------------------------------------
Dpat/gcc-alpine/0042-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch | 21---------------------
Dpat/gcc-alpine/0043-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch | 21---------------------
Apat/gcc-mlfs/fix_fenv_header-new1.patch | 20++++++++++++++++++++
Apat/gcc-mlfs/fix_fenv_header-new2.patch | 12++++++++++++
Mpat/gcc-mlfs/fix_fenv_header.patch | 8++++----
Apat/iproute2-galeb/0001-ipstats_c-define-MIN.patch | 13+++++++++++++
Apat/musl-galeb/0001-Prevent-redefinition-warnings.patch | 14++++++++++++++
Apat/musl-galeb/0002-string_h-basename.patch | 11+++++++++++
Apat/musl-galeb/0003-byteswap_h-parentheses.patch | 17+++++++++++++++++
Apat/musl-galeb/0004-endian_h-parentheses.patch | 17+++++++++++++++++
Apat/musl-galeb/0005-stdlib_h-libiberty-dont-redefine-alloca.patch | 12++++++++++++
измењених датотека: 78, додавања: 2027(+), брисања: 3234(-)

diff --git a/.gitattributes b/.gitattributes @@ -0,0 +1,2 @@ +art/**/*.source -whitespace +art/**/*.ansi -whitespace diff --git a/01-cross.sh b/01-cross.sh @@ -89,6 +89,8 @@ do fi case ${url} in + *linux-6.2.10*|*binutils*|*gmp*|*mpc*|*mpfr*|*gcc*|*musl*|*file.*|*\/make*|*tcl*|*\/m4*|*bzip2*|*bison*|*diff*|*find*|*gettext*|*grep*|*zlib*|*pigz*|*netbsd*|*bash*|*bc*|*patch*|*flex*|*awk*|*coreutils*|*sed*|*ubase*|*\/tar*|*\/xz*|*perl-*|*mksh*|*which*|*sled*|*texinfo*|*man-pages*|*readline*|*pkgconf*|*tz*|*9base*|*libisl*|*shadow*|*tinycc*|*zstd*|*ncurses*|*attr*|*acl*|*libcap*|*libxml*|*libxslt*|*psmisc*|*iana-etc*|*libtool*|*pax-utils*|*less*|*gdbm*|*gperf*|*expat*|*inetutils*|*Parser*|*intltool*|*help2man*|*autoconf*|*automake*|*musl-fts*|*musl-obstack*|*kmod*|*argp*|*elfutils*|*libffi*|*openssl*|*ca-certificates*|*curl*|*Python*|*samurai*|*meson*|*procps-ng*|*check*|*libuv*|*cmake*|*uchardet*|*ttf2pt1*|*groff*|*urw*|*locales*|*mandoc*|*dcron*|*docutils*|*dosfstools*|*pcre*|*git-*|*iproute*|*libarchive*|*kbd-*|*metalog*|*table*|*talloc*|*proot*|*strace*|*usleep*|*libtermkey*|*vim*|*util-linux*|*e2fsprogs*|*cpio*|*sdhcp*|*sinit*|*dropbear*|*popt*|*efivar*|*efibootmgr*|*gpm*|*elinks*) + case ${url} in git:*|git+https:*) git_clone "${dirtb}" ${url##git+} ${delay};; ftp:*|http:*|https:*) @@ -101,7 +103,9 @@ do msg err "SHA512 check failed on %s" ${tarball} exit 1 fi - fi + fi;; + *) ;; + esac ) || exit 1 lineno=$((lineno+1)) done <${WD}/lib/pkgs.tsv @@ -111,7 +115,7 @@ unset lineno totallines # msg info "Regenerating SHA sums" # (cd ${WD}; ${WD}/lib/gensums) -begin_substep linux-5.17.13 "Linux headers" +begin_substep linux-6.2.10 "Linux headers" if [ -e ${CT}/${G_TARGET}/include/linux/stddef.h ]; then msg info "%s exists, skipping %s" \ ${CT}/${G_TARGET}/include/linux/stddef.h "${substepname}" @@ -130,7 +134,7 @@ else fi end_substep -begin_substep binutils-2.38 +begin_substep binutils-2.40 if [ -x ${CT}/${G_TARGET}/bin/ar ]; then msg info "%s exists, skipping %s" "${CT}/${G_TARGET}/bin/ar" ${pkg} else @@ -157,7 +161,7 @@ else fi end_substep -begin_substep gcc-11-20220101 "static GCC" +begin_substep gcc-12.2.0 "static GCC" if [ -e ${CT}/gcc-static ]; then msg info "%s exists, skipping %s" "${CT}/gcc-static" "${substepname}" else @@ -171,24 +175,21 @@ extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz if [ -d gmp ]; then msg info "Subpackage %s exists" "${subpkg}" else - extract_pkg ${G_SRC} ${subpkg} ${subpkg}.tar.xz - mv_or_fail ${subpkg} gmp + extract_pkg ${G_SRC}/${pkg} ${subpkg#lib} ${subpkg}.tar.xz gmp fi - subpkg=libmpc-1.2.1 + subpkg=libmpc-1.3.1 if [ -d mpc ]; then msg info "Subpackage %s exists" "${subpkg}" else - extract_pkg ${G_SRC}/${subpkg} ${subpkg}.tar.gz - mv_or_fail ${subpkg} mpc + extract_pkg ${G_SRC}/${pkg} ${subpkg#lib} ${subpkg}.tar.gz mpc fi - subpkg=libmpfr-4.1.0 + subpkg=libmpfr-4.2.0 if [ -d mpfr ]; then msg info "Subpackage %s exists" "${subpkg}" else - extract_pkg ${G_SRC}/${subpkg} ${subpkg}.tar.xz - mv_or_fail ${subpkg} mpfr + extract_pkg ${G_SRC}/${pkg} ${subpkg#lib} ${subpkg}.tar.xz mpfr fi remove_dir build @@ -275,7 +276,7 @@ else fi end_substep -begin_substep gcc-11-20220101 "final GCC" +begin_substep gcc-12.2.0 "final GCC" if [ -e ${CT}/gcc-final ]; then msg info "%s exists, skipping %s" ${CT}/gcc-final "${substepname}" else @@ -286,8 +287,7 @@ else cd_or_fail ${G_SRC}/${pkg} msg info "Applying patches" - for n in 1 3 4 6 7 9 10 11 12 14 17 18 19 20 23 24 25 27 28 29 \ - 32 35 36 37 41 42 43 + for n in 1 3 4 6 7 8 9 10 11 12 14 15 16 17 18 25 27 29 33 34 35 39 do apply_patch gcc-final -Np1 -i \ ${WD}/pat/gcc-alpine/$(printf "%04d" $n)-*.patch @@ -335,7 +335,7 @@ end_substep LD_LIBRARY_PATH=/tools/lib:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH -begin_substep file-5.41 +begin_substep file-5.44 if [ -x ${CT}/bin/file ]; then msg info "%s exists, skipping %s" ${CT}/bin/file ${pkg} else @@ -394,6 +394,7 @@ end_substep msg info "Adjusting cross-tools" SPECFILE=$(realpath $(dirname $(${G_TARGET}-gcc -print-libgcc-file-name)))/specs msg info "Specfile at %s" "${SPECFILE}" +pwd ${G_TARGET}-gcc -dumpspecs > specs /bin/sed -i 's,:\(/lib/ld-musl-'${G_ARCH_EXT_ALT}'.so.1\),:/'${TLD}'\1,g' specs cat specs >>${G_LOGFILE} @@ -428,7 +429,7 @@ export CC CXX AR AS RANLIB LD STRIP link_if_ne lib /${TLD}/lib64 -begin_substep binutils-2.38 +begin_substep binutils-2.40 if [ -x ${TL}/${G_TARGET}/bin/ar ]; then msg info "%s exists, skipping %s" ${TL}/${G_TARGET}/bin/ar ${pkg} else @@ -438,6 +439,8 @@ else cd_or_fail ${G_SRC}/${pkg} check_dir build cd_or_fail build + CFLAGS+=' -D__MUSL_LIBC ' + export CFLAGS run_configure .. \ --prefix=/${TLD} \ --with-lib-path=/${TLD}/lib \ @@ -447,16 +450,16 @@ else --disable-nls \ --disable-werror \ --with-sysroot - run_make ${JN} - run_make install-strip - run_make -C ld clean - run_make -C ld ${JN} LIB_PATH=/usr/lib:/lib + run_make ${JN} || exit 1 + run_make install-strip || exit 1 + run_make -C ld clean || exit 1 + run_make -C ld ${JN} LIB_PATH=/usr/lib:/lib || exit 1 cp_or_fail ld/ld-new /${TLD}/bin ) || exit 1 fi end_substep -begin_substep gcc-11-20220101 +begin_substep gcc-12.2.0 if [ -x /${TLD}/bin/gcc ]; then msg info "%s exists, skipping %s" "/${TLD}/bin/gcc" ${pkg} else @@ -469,29 +472,25 @@ extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz if [ -d gmp ]; then msg info "Subpackage %s exists" "${subpkg}" else - extract_pkg ${G_SRC}/${pkg} ${subpkg} ${subpkg}.tar.xz - mv_or_fail ${subpkg#lib} gmp + extract_pkg ${G_SRC}/${pkg} ${subpkg#lib} ${subpkg}.tar.xz gmp fi - subpkg=libmpc-1.2.1 + subpkg=libmpc-1.3.1 if [ -d mpc ]; then msg info "Subpackage %s exists" "${subpkg}" else - extract_pkg ${G_SRC}/${pkg} ${subpkg} ${subpkg}.tar.gz - mv_or_fail ${subpkg#lib} mpc + extract_pkg ${G_SRC}/${pkg} ${subpkg#lib} ${subpkg}.tar.gz mpc fi - subpkg=libmpfr-4.1.0 + subpkg=libmpfr-4.2.0 if [ -d mpfr ]; then msg info "Subpackage %s exists" "${subpkg}" else - extract_pkg ${G_SRC}/${pkg} ${subpkg} ${subpkg}.tar.xz - mv_or_fail ${subpkg#lib} mpfr + extract_pkg ${G_SRC}/${pkg} ${subpkg#lib} ${subpkg}.tar.xz mpfr fi msg info "Applying patches" - for n in 1 3 4 6 7 9 10 11 12 14 17 18 19 20 23 24 25 27 28 29 \ - 32 35 36 37 41 42 43 + for n in 1 3 4 6 7 8 9 10 11 12 14 15 16 17 18 25 27 29 33 34 35 39 do apply_patch gcc-tools -Np1 -i \ ${WD}/pat/gcc-alpine/$(printf "%04d" $n)-*.patch @@ -585,7 +584,7 @@ extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz fi end_substep -begin_substep linux-5.17.13 "Linux headers" +begin_substep linux-6.2.10 "Linux headers" if [ -e /${TLD}/include/linux/stddef.h ]; then msg info "%s exists, skipping %s" \ /${TLD}/include/linux/stddef.h "${substepname}" @@ -632,18 +631,18 @@ else fi unset interp -begin_substep gcc-11-20220101 libstdcxx -if [ -e /${TLD}/share/gcc-11.2.1/python/libstdcxx ]; then +begin_substep gcc-12.2.0. libstdcxx +if [ -e /${TLD}/share/gcc-12.2.0/python/libstdcxx ]; then msg info "%s exists, skipping %s" \ - "/${TLD}/share/gcc-11.2.1/python/libstdcxx" "${substepname}" + "/${TLD}/share/gcc-12.2.0/python/libstdcxx" "${substepname}" else ( - if ! tail -n1 /${TLD}/include/c++/11.2.1/fenv.h | \ - grep '^#endif //fix error$' 2>/dev/null - then - echo '#endif //fix error' \ - >>/${TLD}/include/c++/11.2.1/fenv.h - fi + #if ! tail -n1 /${TLD}/include/c++/12.2.0/fenv.h | \ + # grep '^#endif //fix error$' 2>/dev/null + #then + # echo '#endif //fix error' \ + # >>/${TLD}/include/c++/12.2.0/fenv.h + #fi cd_or_fail ${G_SRC}/${pkg} remove_dir build @@ -659,7 +658,7 @@ else --disable-nls \ --disable-libstdcxx-threads \ --disable-libstdcxx-pch \ - --with-gxx-include-dir=/${TLD}/${G_TARGET}/include/c++/11.2.1 + --with-gxx-include-dir=/${TLD}/${G_TARGET}/include/c++/12.2.0 run_make ${JN} run_make install @@ -667,7 +666,7 @@ else fi end_substep -begin_substep make-4.3 +begin_substep make-4.4 if [ -x ${TL}/bin/make ]; then msg info "%s exists, skipping %s" ${TL}/bin/make ${pkg} else @@ -686,7 +685,7 @@ else fi end_substep -begin_substep tcl8.6.12 +begin_substep tcl8.6.13 if [ -e ${TL}/lib/libtcl8.6.so ]; then msg info "%s exists, skipping %s" ${TL}/lib/libtcl8.6.so ${pkg} else @@ -796,7 +795,7 @@ else fi end_substep -begin_substep diffutils-3.8 +begin_substep diffutils-3.9 if [ -x ${TL}/bin/diff ]; then msg info "%s exists, skipping %s" ${TL}/bin/diff ${pkg} else @@ -814,7 +813,7 @@ else fi end_substep -begin_substep file-5.41 +begin_substep file-5.44 if [ -x ${TL}/bin/file ]; then msg info "%s exists, skipping %s" ${TL}/bin/file ${pkg} else @@ -873,7 +872,7 @@ else fi end_substep -begin_substep grep-3.7 +begin_substep grep-3.10 if [ -x ${TL}/bin/fgrep ]; then msg info "%s exists, skipping %s" ${TL}/bin/fgrep ${pkg} else @@ -891,7 +890,7 @@ else fi end_substep -begin_substep zlib-ng-2.0.6 +begin_substep zlib-ng-2.0.7 if [ -e /${TLD}/lib/libz.so.1.2.11.zlib-ng ]; then msg info "%s exists, skipping %s" /${TLD}/lib/libz.so.1.2.11.zlib-ng \ ${pkg} @@ -914,7 +913,7 @@ else run_make install link_if_ne libz.so.1.2.11.zlib-ng /${TLD}/lib/libz.so.1.2.11 ) || exit 1 - remove_dir ${G_SRC}/${pkg} + #remove_dir ${G_SRC}/${pkg} fi end_substep @@ -934,6 +933,7 @@ else ln -s pigz /${TLD}/bin/unpigz ln -s pigz /${TLD}/bin/gzip ln -s pigz /${TLD}/bin/gunzip + sh ) || exit 1 remove_dir ${G_SRC}/${pkg} fi @@ -982,7 +982,7 @@ end_substep # fi # end_substep -begin_substep bash-5.1 +begin_substep bash-5.2.15 if [ -x ${TL}/bin/bash ]; then msg info "%s exists, skipping %s" ${TL}/bin/bash ${pkg} else @@ -1018,7 +1018,7 @@ gt_cv_int_divbyzero_sigfpe=yes fi end_substep -begin_substep bc-5.0.0 +begin_substep bc-6.5.0 if [ -x ${TL}/bin/bc ]; then msg info "%s exists, skipping %s" ${TL}/bin/bc ${pkg} else @@ -1098,7 +1098,7 @@ else fi end_substep -begin_substep awk-20220709 +begin_substep awk-20230412 if [ -x ${TL}/bin/awk ]; then msg info "%s exists, skipping %s" ${TL}/bin/awk ${pkg} else @@ -1111,7 +1111,7 @@ fi end_substep # Unfortunately needed for a lot of autohell stuff; keeping it in /tools though -begin_substep coreutils-9.1 +begin_substep coreutils-9.2 if [ -x ${TL}/bin/ls ]; then msg info "%s exists, skipping %s" ${TL}/bin/ls ${pkg} else @@ -1142,7 +1142,7 @@ end_substep HOST_COREUTILS=0 export HOST_COREUTILS -begin_substep sed-4.8 +begin_substep sed-4.9 if [ -x ${TL}/bin/sed ]; then msg info "%s exists, skipping %s" ${TL}/bin/sed ${pkg} else @@ -1183,7 +1183,7 @@ export HOST_SED # fi # end_substep # -begin_substep ubase-20220709 +begin_substep ubase-20230412 if [ -x ${TL}/bin/mount ]; then msg info "%s exists, skipping %s" ${TL}/bin/mount ${pkg} else @@ -1234,7 +1234,7 @@ end_substep HOST_TAR=0 export HOST_TAR -begin_substep xz-5.2.5 +begin_substep xz-5.4.2 if [ -x ${TL}/bin/xz ]; then msg info "%s exists, skipping %s" ${TL}/bin/xz ${pkg} else @@ -1252,6 +1252,9 @@ else fi end_substep +# 5.32.1 is deliberate, can't get 5.36.0 nor 5.34.1 to compile _at this stage of +# the build_ (for now...) +# Later on, we build 5.36.0 using native GCC begin_substep perl-5.32.1 if [ -x ${TL}/bin/perl ]; then msg info "%s exists, skipping %s" ${TL}/bin/perl ${pkg} @@ -1264,10 +1267,11 @@ else run_configure . \ --prefix=/${TLD} \ --target=${G_TARGET} - run_make ${JN} + run_make ${JN} || exit cp_or_fail perl cpan/podlators/scripts/pod2man ${TL}/bin mkdir -p ${TL}/lib/perl5/5.32.1 cp_or_fail -R lib/* ${TL}/lib/perl5/5.32.1 + sh ) || exit 1 remove_dir ${G_SRC}/${pkg} fi @@ -1288,7 +1292,7 @@ begin_step utilities totalsubsteps=3 substep=1 -begin_substep mksh-20220709 +begin_substep mksh-20230412 if [ -x ${TL}/bin/mksh ]; then msg info "%s exists, skipping %s" ${TL}/bin/mksh ${pkg} else @@ -1356,16 +1360,17 @@ else fi end_substep -begin_substep sled-0.10.8 +begin_substep sled-0.11.5 if [ -x ${TL}/bin/sled ]; then msg info "%s exists, skipping %s" ${TL}/bin/sled ${pkg} else - extract_pkg ${G_SRC} sled-v0.10.8 ${pkg}.tar.gz ${pkg} + extract_pkg ${G_SRC} sled-v0.11.5 ${pkg}.tar.gz ${pkg} ( cd_or_fail ${G_SRC}/${pkg} + FALLBACKVER=0.11.5 SLED_CC=${CC}' -O2 -Wall -static -fcommon' PREFIX=/${TLD} - export SLED_CC PREFIX + export FALLBACKVER SLED_CC PREFIX run_do -c install ) || exit 1 fi diff --git a/02-chroot.sh b/02-chroot.sh @@ -132,10 +132,6 @@ cp_or_fail ${WD}/lib/perms.tsv ${GR}/lib/perms.tsv cp_or_fail ${WD}/lib/rmfiles ${GR}/lib/rmfiles cp_or_fail ${WD}/lib/rmlist.tsv ${GR}/lib/rmlist.tsv -# Don't need this if we are going for exclusively root-usable script -#check_dir ${G_SRC}/galeb-utils-20220717 -#cp_or_fail ${WD}/src/remountroot.c ${G_SRC}/galeb-utils-20220717/remountroot.c -#cp_or_fail ${WD}/src/umountall.c ${G_SRC}/galeb-utils-20220717/umountall.c cp_or_fail ${WD}/src/gettyc ${GR}/bin/gettyc cp_or_fail -r ${WD}/${FLD}/man/* ${GR}/share/man/ diff --git a/03-packages.sh b/03-packages.sh @@ -92,12 +92,12 @@ done msg info "Generating %s" "${G_PKGDB}" printf "Package\tVersion\tInstallation Timestamp\n" > ${G_PKGDB} -begin_substep linux-headers-5.17.13 "Linux headers" +begin_substep linux-headers-6.2.10 "Linux headers" if [ -e /include/linux/stddef.h ]; then msg info "%s exists, skipping %s" \ /include/linux/stddef.h "${substepname}" else - extract_pkg ${G_SRC} linux-5.17.13 linux-5.17.13.tar.xz ${pkg} + extract_pkg ${G_SRC} linux-6.2.10 linux-6.2.10.tar.xz ${pkg} ( cd_or_fail ${G_SRC}/${pkg} run_make ${JN} ARCH=${G_ARCH} headers @@ -111,7 +111,7 @@ else fi end_substep -begin_substep texinfo-6.8 +begin_substep texinfo-7.0.3 if [ -x ${TL}/bin/texi2dvi ]; then msg info "%s exists, skipping %s" ${TL}/bin/texi2dvi ${pkg} else @@ -133,37 +133,6 @@ else fi end_substep -begin_substep man-pages-5.13 -if [ -e /share/man/man2/fork.2 ]; then - msg info "%s exists, skipping %s" /share/man/man2/fork.2 ${pkg} -elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then - unpack_pkg ${pkg} / - timestamp=$(date +'%Y-%m-%d %T') - printf "%s\t%s\t%s\n" texinfo 6.8 "${timestamp}" >>${G_PKGDB} -else - extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz - ( - cd_or_fail ${G_SRC}/${pkg} - cat <<! >MKPK -mkpk_name() -{ - printf "%s" "${pkg}" -} - -mkpk_install() -{ - make DESTDIR=../build prefix= install -} -! - mkpk ${pkg} - remove_dir ${G_SRC}/${pkg} - unpack_pkg ${pkg} / - ) || exit 1 -fi -timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" man-pages 5.13 "${timestamp}" >>${G_PKGDB} -end_substep - begin_substep musl-1.2.3 if [ -e /lib/ld-musl-${G_ARCH_EXT_ALT}.so.1 ]; then msg info "%s exists, skipping %s" /lib/ld-musl-${G_ARCH_EXT_ALT}.so.1 \ @@ -186,6 +155,13 @@ else ${G_PAT}/musl-mlfs/${patch} done + for patch in 0001-Prevent-redefinition-warnings.patch \ + 0002-string_h-basename.patch + do + apply_patch packages -Np1 -i \ + ${G_PAT}/musl-galeb/${patch} + done + for patch in handle-aux-at_base.patch do apply_patch packages -Np1 -i \ @@ -283,7 +259,7 @@ gcc -dumpspecs | sed -e 's,/'${TLD}',,g' \ mv_or_fail specs ${SPECFILE} unset SPECFILE -begin_substep zlib-ng-2.0.6 +begin_substep zlib-ng-2.0.7 if [ -e /lib/libz.so.1.2.11.zlib-ng ]; then msg info "%s exists, skipping %s" /lib/libz.so.1.2.11.zlib-ng ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -320,10 +296,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" zlib-ng 2.0.6 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" zlib-ng 2.0.7 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep file-5.41 +begin_substep file-5.44 if [ -e /bin/file ]; then msg info "%s exists, skipping %s" /bin/file ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -354,10 +330,10 @@ mkpk_install() remove_dir ${G_SRC}/${pkg} fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" file 5.41 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" file 5.44 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep readline-8.1 +begin_substep readline-8.2 if [ -e /lib/libreadline.a ]; then msg info "%s exists, skipping %s" /lib/libreadline.a ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -386,7 +362,7 @@ mkpk_install() ./configure --prefix="\${PREFIX}" \\ --disable-shared \\ - --docdir=/share/doc/readline-8.1 + --docdir=/share/doc/readline-8.2 make ${JN} make DESTDIR="\${DESTDIR}" install @@ -398,7 +374,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" readline 8.1 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" readline 8.2 "${timestamp}" >>${G_PKGDB} end_substep begin_substep m4-1.4.19 @@ -443,7 +419,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" m4 1.4.19 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep pkgconf-1.8.0 +begin_substep pkgconf-1.9.4 if [ -L /bin/pkg-config ]; then msg info "%s exists, skipping %s" /bin/pkg-config ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -467,7 +443,7 @@ mkpk_install() export CFLAGS LDFLAGS PREFIX DESTDIR ./configure --prefix="\${PREFIX}" \\ - --docdir=/share/doc/pkgconf-1.8.0 \\ + --docdir=/share/doc/pkgconf-1.9.4 \\ --sysconfdir=/etc \\ --localstatedir=/var \\ --with-pkg-config-dir=/local/lib/pkgconfig:\\ @@ -501,10 +477,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" pkgconf 1.8.0 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" pkgconf 1.9.4 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep tzutils-20220706 +begin_substep tzutils-20230412 if [ -x /sbin/zic ]; then msg info "%s exists, skipping %s" /sbin/zic ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -512,8 +488,8 @@ elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then else check_dir ${G_SRC}/${pkg} cd_or_fail ${G_SRC}/${pkg} - extract_pkg ${G_SRC}/${pkg} "" tzdata2022a.tar.gz - extract_pkg ${G_SRC}/${pkg} "" tzcode2022a.tar.gz + extract_pkg ${G_SRC}/${pkg} "" tzdata2023c.tar.gz + extract_pkg ${G_SRC}/${pkg} "" tzcode2023c.tar.gz extract_pkg ${G_SRC}/${pkg} posixtz-0.5 posixtz-0.5.tar.xz ( apply_patch packages -Np1 -i \ @@ -526,32 +502,39 @@ mkpk_name() mkpk_install() { + DESTDIR=../build + prefix='' + CFLAGS='-Os -pipe -static -fcommon -DHAVE_STDINT_H=1' + LDFLAGS='-static -fcommon' + TZDIR=/share/zoneinfo timezones='africa antarctica asia australasia europe northamerica'\\ ' southamerica etcetera backward factory' - make DESTDIR=../build prefix= \\ - CFLAGS='-Os -pipe -static -fcommon -DHAVE_STDINT_H=1' \\ - LDFLAGS='-static -fcommon' \\ - TZDIR=/share/zoneinfo - make -C posixtz-0.5 posixtz + export DESTDIR prefix CFLAGS LDFLAGS TZDIR timezones - mkdir -p ../build/share/zoneinfo/right - mkdir -p ../build/bin - ln -s bin ../build/sbin + make CFLAGS="\${CFLAGS}" LDFLAGS="\${LDFLAGS}" prefix="\${prefix}" \\ + TZDIR="\${TZDIR}" timezones="\${timezones}" + make CFLAGS="\${CFLAGS}" LDFLAGS="\${LDFLAGS}" prefix="\${prefix}" \\ + TZDIR="\${TZDIR}" timezones="\${timezones}" \\ + -C posixtz-0.5 posixtz - install -m 444 -t ../build/share/zoneinfo iso3166.tab zone1970.tab \\ + mkdir -p \${DESTDIR}/share/zoneinfo/right + mkdir -p \${DESTDIR}/bin + ln -s bin \${DESTDIR}/sbin + + install -m 444 -t \${DESTDIR}/share/zoneinfo iso3166.tab zone1970.tab \\ zone.tab - install -m 755 zic zdump ../build/sbin - install -m 644 zic.8 zdump.8 ../build/share/man/man8 - install -Dm 755 ${pkg}/posixtz ../build/bin/posixtz + install -m 755 zic zdump \${DESTDIR}/sbin + install -Dm 644 zic.8 zdump.8 -t \${DESTDIR}/share/man/man8 + install -Dm 755 posixtz-0.5/posixtz \${DESTDIR}/bin/posixtz - ./zic -b fat -y ./yearistype -d ../build/share/zoneinfo \${timezones} - ./zic -b fat -y ./yearistype -d ../build/share/zoneinfo/right \\ + ./zic -b fat -y ./yearistype -d \${DESTDIR}/share/zoneinfo \${timezones} + ./zic -b fat -y ./yearistype -d \${DESTDIR}/share/zoneinfo/right \\ -L leapseconds \${timezones} - ./zic -b fat -y ./yearistype -d ../build/share/zoneinfo \\ + ./zic -b fat -y ./yearistype -d \${DESTDIR}/share/zoneinfo \\ -p America/New_York - mkdir -p ../build/etc - ln -s /share/zoneinfo/Europe/Belgrade ../build/etc/localtime + mkdir -p \${DESTDIR}/etc + ln -sf /share/zoneinfo/Europe/Belgrade \${DESTDIR}/etc/localtime } ! mkpk ${pkg} @@ -560,10 +543,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" tzutils 20220706 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" tzutils 20230412 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep 9base-20220706 +begin_substep 9base-20230412 if [ -x /plan9/bin/bc ]; then msg info "%s exists, skipping %s" /plan9/bin/bc ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -602,19 +585,19 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" 9base 20220706 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" 9base 20230412 "${timestamp}" >>${G_PKGDB} end_substep msg info "Adjusting specs" SPECFILE=$(realpath $(dirname $(gcc -print-libgcc-file-name)))/specs export SPECFILE remove_file ${SPECFILE} -gcc -dumpspecs | sed -e 's,/'${TLD}',,g' \ - -e '/\*startfile_prefix_spec:/{n;s,.*,/lib/ ,}' > specs -mv_or_fail specs ${SPECFILE} +gcc -dumpspecs | /${TLD}/bin/sed -e 's,/'${TLD}',,g' \ + -e '/\*startfile_prefix_spec:/{n;s,.*,/lib/ ,}' > /tmp/specs +mv_or_fail /tmp/specs ${SPECFILE} unset SPECFILE -begin_substep binutils-2.38 +begin_substep binutils-2.40 if [ -x /bin/ar ]; then msg info "%s exists, skipping %s" /bin/ar ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -743,7 +726,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" libgmp 6.2.1 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep libmpfr-4.1.0 +begin_substep libmpfr-4.2.0 if [ -e /lib/libmpfr.a ]; then msg info "%s exists, skipping %s" /lib/libmpfr.a ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -785,10 +768,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" libmpfr 4.1.0 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" libmpfr 4.2.0 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep libmpc-1.2.1 +begin_substep libmpc-1.3.1 if [ -e /lib/libmpc.a ]; then msg info "%s exists, skipping %s" /lib/libmpc.a ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -828,10 +811,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" libmpc 1.2.1 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" libmpc 1.3.1 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep libisl-0.24 +begin_substep libisl-0.26 if [ -e /lib/libisl.a ]; then msg info "%s exists, skipping %s" /lib/libisl.a ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -874,10 +857,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" libisl 0.24 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" libisl 0.26 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep shadow-4.11.1 +begin_substep shadow-4.13 if [ -x /bin/groups ]; then msg info "%s exists, skipping %s" /bin/groups ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -893,6 +876,7 @@ else # The limit has been lowered in musl, and it remained the same # in shadow 4.9 # - *Not* fixed in 4.11.1, so this is still needed. + # - *Still* not fixed in 4.13, so it is likely intentional. /${TLD}/bin/sed -i \ -e 's/^\(#define SHA_ROUNDS_MAX 9999999\)99/\1/' \ libmisc/salt.c @@ -930,7 +914,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" shadow 4.11.1 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" shadow 4.13 "${timestamp}" >>${G_PKGDB} end_substep msg info "Setting up /etc/default/useradd" @@ -950,19 +934,20 @@ if [ ! -e ${G_SRC}/pwchanged ]; then /bin/passwd fi -begin_substep gcc-11-20220101 +begin_substep gcc-12.2.0 if [ -x /bin/gcc ]; then msg info "%s exists, skipping %s" /bin/gcc ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else + remove_dir ${G_SRC}/${pkg} extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} msg info "Applying patches" - for n in 1 3 4 6 7 9 10 11 12 14 17 18 19 20 21 23 24 25 27 28 \ - 29 32 35 36 37 41 42 43 + for n in 1 3 4 6 7 8 9 10 11 12 14 15 16 17 18 19 \ + 25 27 29 33 34 35 39 do apply_patch packages -Np1 -i \ ${G_PAT}/gcc-alpine/$(printf "%04d" $n)-*.patch @@ -977,6 +962,9 @@ mkpk_name() mkpk_install() { CFLAGS='-Os -pipe -static --static -fcommon ' + # Needed to trick GCC into using *local* libiberty.h, which we hack + # into submission to *not* complain about missing PTR type + CFLAGS+='-I../../include -I../include -I./include ' CFLAGS+='-I/sucks/include -I/include ' CFLAGS+='-static-libgcc -static-libstdc++ -fPIC' CXXFLAGS=\${CFLAGS} @@ -994,7 +982,7 @@ mkpk_install() --build=${GR_TRI} \\ --disable-shared \\ --enable-languages=c,c++,lto \\ - --with-pkgversion='Galeb 2.1-20220909' \\ + --with-pkgversion='Galeb 2.2-20230412' \\ --with-arch=${G_ARCH_EXT} \\ --with-ppl=yes \\ --with-cloog=yes \\ @@ -1028,15 +1016,31 @@ mkpk_install() --with-isl || exit 1 cd libiberty + SED=/${TLD}/bin/sed + export SED CC=/${TLD}/bin/${G_TARGET}-gcc \\ - SED=/${TLD}/bin/sed libat_cv_have_ifunc=no \\ + libat_cv_have_ifunc=no \\ ./configure \\ --prefix="\${PREFIX}" \\ --build=${GR_TRI} || exit 1 cd - >/dev/null + # Hack libiberty.h + cat <<@ >>include/libiberty.h +#ifndef PTR +#define PTR void* +#endif +@ + + # Hack offending .c files + \${SED} -i 's,#include <libiberty.h>,#include "libiberty.h",g' \\ + libiberty/alloca.c || exit 1 + + \${SED} -i 's,#include <libiberty.h>,#include "libiberty.h",g' \\ + lto-plugin/lto-plugin.c || exit 1 + make ${JN} || exit 1 - make install-strip + make install-strip || exit 1 #CFLAGS+='-static --static -fcommon' #LDFLAGS='-static --static -fcommon' @@ -1058,7 +1062,7 @@ mkpk_install() ln -s gcc ../build/bin/cc install -dm 755 ../build/lib/bfd-plugins - ln -s ../../libexec/gcc/$(gcc -dumpmachine)/11.2.1/liblto_plugin.so \\ + ln -s ../../libexec/gcc/$(gcc -dumpmachine)/12.2.0/liblto_plugin.so \\ ../build/lib/bfd-plugins/ install -dm 755 ../build/share/gdb/auto-load/usr/lib @@ -1075,7 +1079,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" gcc 11-20220101 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" gcc 12.2.0 "${timestamp}" >>${G_PKGDB} end_substep msg info "Setting up environment to use newly built GCC" @@ -1109,7 +1113,7 @@ export PATH # remove_file /lib/lib${lib} #done -begin_substep tinycc-20220708 +begin_substep tinycc-20230413 if [ -x /bin/tcc ]; then msg info "%s exists, skipping %s" /bin/tcc ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -1139,12 +1143,14 @@ mkpk_install() --docdir=/share/doc/${pkg} \\ --sharedir=/share \\ --config-musl \\ - --sysincludepaths=/local/include:/include:/sucks/include \\ + --sysincludepaths=/lib/tcc/include:/local/include:/include:\\ +/sucks/include \\ --crtprefix=/lib \\ - --libpaths=/local/lib:/lib:/sucks/lib || exit 1 + --libpaths=/lib/tcc:/local/lib:/lib:/sucks/lib || exit 1 make clean || exit 1 make ${JN} || exit 1 + make install-strip } ! @@ -1154,23 +1160,23 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" tinycc 20220708 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" tinycc 20230413 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep grep-3.7 +begin_substep grep-3.10 if [ -x /sucks/bin/grep ]; then msg info "%s exists, skipping %s" /sucks/bin/grep ${pkg} -elif [ -e ${G_SPKG}/gnu-grep-3.7.tar.xz ]; then +elif [ -e ${G_SPKG}/gnu-grep-3.10.tar.xz ]; then unpack_pkg ${pkg} / else - extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz gnu-grep-3.7 + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz gnu-grep-3.10 ( - cd_or_fail ${G_SRC}/gnu-grep-3.7 + cd_or_fail ${G_SRC}/gnu-grep-3.10 cat <<! >MKPK mkpk_name() { - printf "%s" "gnu-grep-3.7" + printf "%s" "gnu-grep-3.10" } mkpk_install() @@ -1192,29 +1198,29 @@ mkpk_install() done } ! - mkpk gnu-grep-3.7 - remove_dir ${G_SRC}/gnu-grep-3.7 - unpack_pkg gnu-grep-3.7 / + mkpk gnu-grep-3.10 + remove_dir ${G_SRC}/gnu-grep-3.10 + unpack_pkg gnu-grep-3.10 / ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" gnu-grep 3.7 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" gnu-grep 3.10 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep sed-4.8 +begin_substep sed-4.9 if [ -x /sucks/bin/sed ]; then msg info "%s exists, skipping %s" /sucks/bin/sed ${pkg} -elif [ -e ${G_SPKG}/gnu-sed-4.8.tar.xz ]; then +elif [ -e ${G_SPKG}/gnu-sed-4.9.tar.xz ]; then unpack_pkg ${pkg} / else - extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz gnu-sed-4.8 + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz gnu-sed-4.9 ( - cd_or_fail ${G_SRC}/gnu-sed-4.8 + cd_or_fail ${G_SRC}/gnu-sed-4.9 cat <<! >MKPK mkpk_name() { - printf "%s" "gnu-sed-4.8" + printf "%s" "gnu-sed-4.9" } mkpk_install() @@ -1234,13 +1240,13 @@ mkpk_install() \${DESTDIR}\${PREFIX}/share/man/man1/gnu-sed.1 } ! - mkpk gnu-sed-4.8 - remove_dir ${G_SRC}/gnu-sed-4.8 - unpack_pkg gnu-sed-4.8 / + mkpk gnu-sed-4.9 + remove_dir ${G_SRC}/gnu-sed-4.9 + unpack_pkg gnu-sed-4.9 / ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" gnu-sed 4.8 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" gnu-sed 4.9 "${timestamp}" >>${G_PKGDB} end_substep begin_substep tar-1.34 @@ -1343,59 +1349,6 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" bzip2 1.0.8 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep zstd-1.5.0 -if [ -x /bin/zstd ]; then - msg info "%s exists, skipping %s" /bin/zstd ${pkg} -elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then - unpack_pkg ${pkg} / -else - extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz - ( - cd_or_fail ${G_SRC}/${pkg} - - cat <<! >MKPK -mkpk_name() -{ - printf "%s" "${pkg}" -} - -mkpk_install() -{ - CFLAGS='-Os -pipe -static --static -fcommon -fPIC' - LDFLAGS='-static --static -fcommon -s' - CXXFLAGS=\${CFLAGS} - PREFIX=/ # Deliberate for meson - DESTDIR=/build - LIBS=-lstdc++ - export CFLAGS LDFLAGS CXXFLAGS PREFIX DESTDIR LIBS - - (cd build/meson - meson setup \\ - --prefix="\${PREFIX}" \\ - -Dbin_programs=true \\ - -Dbin_contrib=true \\ - -Ddefault_library=static \\ - -Dstatic_runtime=true \\ - b - - cd b - /${TLD}/bin/sed -i 's,/lib/libz.so,/lib/libz.a,g' \\ - meson-info/intro-dependencies.json - /${TLD}/bin/sed -i 's,/lib/libz.so,/lib/libz.a,g' \\ - build.ninja - ninja ${JN} - ninja install) -} -! - mkpk ${pkg} - remove_dir ${G_SRC}/${pkg} - unpack_pkg ${pkg} / - ) || exit 1 -fi -timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" zstd 1.5.0 "${timestamp}" >>${G_PKGDB} -end_substep - # Had to switch to ncurses for neomutt # begin_substep netbsd-curses-0.3.2 # if [ -e /lib/libncurses.so ]; then @@ -1434,7 +1387,7 @@ end_substep # end_substep -begin_substep ncurses-6.2 +begin_substep ncurses-6.4 if [ -e /lib/libncursesw.a ]; then msg info "%s exists, skipping %s" /lib/libncursesw.a ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -1497,10 +1450,8 @@ mkpk_install() unpack_pkg ${pkg} / ) || exit 1 fi -end_substep - timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" ncurses 6.2 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" ncurses 6.4 "${timestamp}" >>${G_PKGDB} end_substep begin_substep attr-2.5.1 @@ -1585,7 +1536,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" acl 2.3.1 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep libcap-2.62 +begin_substep libcap-2.68 if [ -x /bin/getcap ]; then msg info "%s exists, skipping %s" /bin/getcap ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -1608,6 +1559,10 @@ mkpk_install() DESTDIR=/build export CFLAGS LDFLAGS DESTDIR + # Fix Makefile to not shove dynamic libraries into a static libcap even + # when explicitly instructed otherwise... -_- + /sucks/bin/sed -i 's,^\\(LDFLAGS_SUFFIX =\\) .*,\\1,g' progs/Makefile + make ${JN} prefix="\${PREFIX}" lib=lib SHARED=no GOLANG=no \\ DESTDIR="\${DESTDIR}" PKGCONFDIR=\${PREFIX}/lib/pkgconfig install } @@ -1618,7 +1573,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" libcap 2.62 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" libcap 2.68 "${timestamp}" >>${G_PKGDB} end_substep # Needed for libxslt @@ -1675,54 +1630,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" libxml2 2.9.12 "${timestamp}" >>${G_PKGDB} end_substep -# Needed for PRoot -begin_substep libxslt-1.1.35 -if [ -e /lib/libxslt.a ]; then - msg info "%s exists, skipping %s" /lib/libxslt.a ${pkg} -elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then - unpack_pkg ${pkg} / -else - extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz - ( - cd_or_fail ${G_SRC}/${pkg} - - cat <<! >MKPK -mkpk_name() -{ - printf "%s" "${pkg}" -} - -mkpk_install() -{ - CFLAGS='-Os -pipe -static --static -fcommon -fPIC' - LDFLAGS='-static --static -fcommon -s' - PREFIX=/ - DESTDIR=/build - export CFLAGS LDFLAGS PREFIX DESTDIR - - /${TLD}/bin/sed -i s/3000/5000/ libxslt/transform.c doc/xsltproc.1 \\ - doc/xsltproc.xml - - ./configure --prefix="\${PREFIX}" --disable-shared || exit 1 - - make ${JN} DESTDIR=\${DESTDIR} install || exit 1 - - mkdir -p /build/sucks/share/aclocal - mv /build/share/aclocal/* /build/sucks/share/aclocal/ - rmdir /build/share/aclocal || true - rmdir /build/share || true -} -! - mkpk ${pkg} - remove_dir ${G_SRC}/${pkg} - unpack_pkg ${pkg} / - ) || exit 1 -fi -timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" libxslt 1.1.35 "${timestamp}" >>${G_PKGDB} -end_substep - -begin_substep psmisc-23.4 +begin_substep psmisc-23.6 if [ -x /bin/killall ]; then msg info "%s exists, skipping %s" /bin/killall ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -1765,10 +1673,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" psmisc 23.4 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" psmisc 23.6 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep iana-etc-20210611 +begin_substep iana-etc-20230405 if [ -e /etc/services ]; then msg info "%s exists, skipping %s" /etc/services ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -1796,10 +1704,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" iana-etc 20210611 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" iana-etc 20230405 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep libtool-2.4.6 +begin_substep libtool-2.4.7 if [ -x /sucks/bin/libtool ]; then msg info "%s exists, skipping %s" /sucks/bin/libtool ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -1839,7 +1747,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" libtool 2.4.6 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" libtool 2.4.7 "${timestamp}" >>${G_PKGDB} end_substep begin_substep pax-utils-1.3.4 @@ -1883,7 +1791,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" pax-utils 1.3.4 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep less-590 +begin_substep less-608 if [ -x /bin/less ]; then msg info "%s exists, skipping %s" /bin/less ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -1919,10 +1827,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" less 590 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" less 608 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep gdbm-1.20 +begin_substep gdbm-1.23 if [ -x /bin/gdbmtool ]; then msg info "%s exists, skipping %s" /bin/gdbmtool ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -1959,7 +1867,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" gdbm 1.20 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" gdbm 1.23 "${timestamp}" >>${G_PKGDB} end_substep begin_substep gperf-3.1 @@ -2003,7 +1911,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" gperf 3.1 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep expat-2.4.8 +begin_substep expat-2.5.0 if [ -x /bin/xmlwf ]; then msg info "%s exists, skipping %s" /bin/xmlwf ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -2041,10 +1949,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" expat 2.4.8 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" expat 2.5.0 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep inetutils-2.1 +begin_substep inetutils-2.4 if [ -x /bin/telnet ]; then msg info "%s exists, skipping %s" /bin/telnet ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -2094,14 +2002,14 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" inetutils 2.1 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" inetutils 2.4 "${timestamp}" >>${G_PKGDB} end_substep # Perl is in /sucks only because I couldn't find a straightforward way to create # a fully static version myself, and didn't want to include something like # https://github.com/pts/staticperl # That, and one could argue that it overlaps with shell, awk etc. -begin_substep perl-5.32.1 +begin_substep perl-5.36.0 if [ -x /sucks/bin/perl ] && [ ! -L /sucks/bin/perl ]; then msg info "%s exists, skipping %s" /sucks/bin/perl ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -2141,12 +2049,12 @@ mkpk_install() -des -Dprefix=/sucks \ -Doptimize=-Os \ -Dvendorprefix=/sucks \ - -Dprivlib=/sucks/lib/perl5/5.34/core_perl \ - -Darchlib=/sucks/lib/perl5/5.34/core_perl \ - -Dsitelib=/sucks/lib/perl5/5.34/site_perl \ - -Dsitearch=/sucks/lib/perl5/5.34/site_perl \ - -Dvendorlib=/sucks/lib/perl5/5.34/vendor_perl \ - -Dvendorarch=/sucks/lib/perl5/5.34/vendor_perl \ + -Dprivlib=/sucks/lib/perl5/5.36/core_perl \ + -Darchlib=/sucks/lib/perl5/5.36/core_perl \ + -Dsitelib=/sucks/lib/perl5/5.36/site_perl \ + -Dsitearch=/sucks/lib/perl5/5.36/site_perl \ + -Dvendorlib=/sucks/lib/perl5/5.36/vendor_perl \ + -Dvendorarch=/sucks/lib/perl5/5.36/vendor_perl \ -Dman1dir=/sucks/share/man/man1 \ -Dman3dir=/sucks/share/man/man3 \ -Dpager="/bin/less -isR" \ @@ -2168,12 +2076,12 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" perl 5.32.1 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" perl 5.36.0 "${timestamp}" >>${G_PKGDB} end_substep begin_substep XML-Parser-2.46 -if [ -e /sucks/lib/perl5/5.34/site_perl/XML/Parser.pm ]; then - msg info "%s exists, skipping %s" /sucks/lib/perl5/5.34/site_perl/\ +if [ -e /sucks/lib/perl5/5.36/site_perl/XML/Parser.pm ]; then + msg info "%s exists, skipping %s" /sucks/lib/perl5/5.36/site_perl/\ XML/Parser.pm ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / @@ -2253,7 +2161,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" intltool 0.51.0 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep help2man-1.49.2 +begin_substep help2man-1.49.3 if [ -x /bin/help2man ]; then msg info "%s exists, skipping %s" /bin/help2man ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -2289,7 +2197,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" help2man 1.49.2 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" help2man 1.49.3 "${timestamp}" >>${G_PKGDB} end_substep begin_substep autoconf-2.71 @@ -2331,7 +2239,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" autoconf 2.71 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep automake-1.16.4 +begin_substep automake-1.16.5 if [ -x /sucks/bin/automake ]; then msg info "%s exists, skipping %s" /sucks/bin/automake ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -2368,10 +2276,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" automake 1.16.4 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" automake 1.16.5 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep autoconf-archive-2022.02.11 +begin_substep autoconf-archive-2023.02.20 if [ -e /sucks/share/aclocal/ax_absolute_header.m4 ]; then msg info "%s exists, skipping %s" \ /sucks/share/aclocal/ax_absolute_header.m4 ${pkg} @@ -2407,7 +2315,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" autoconf-archive 2022.02.11 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" autoconf-archive 2023.02.20 "${timestamp}" >>${G_PKGDB} end_substep begin_substep musl-fts-1.2.7 @@ -2500,7 +2408,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" musl-obstack 1.1 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep xz-5.2.5 +begin_substep xz-5.4.2 if [ -e /bin/xz ]; then msg info "%s exists, skipping %s" /bin/xz ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -2510,8 +2418,8 @@ else ( cd_or_fail ${G_SRC}/${pkg} - apply_patch packages -Np1 -i \ - ${G_PAT}/xz-alpine/xzgrep-ZDI-CAN-16587.patch +# apply_patch packages -Np1 -i \ +# ${G_PAT}/xz-alpine/xzgrep-ZDI-CAN-16587.patch cat <<! >MKPK mkpk_name() @@ -2538,55 +2446,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" xz 5.2.5 "${timestamp}" >>${G_PKGDB} -end_substep - -begin_substep kmod-29 -if [ -e /bin/kmod ]; then - msg info "%s exists, skipping %s" /bin/kmod ${pkg} -elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then - unpack_pkg ${pkg} / -else - extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz - ( - cd_or_fail ${G_SRC}/${pkg} - - cat <<! >MKPK -mkpk_name() -{ - printf "%s" "${pkg}" -} - -mkpk_install() -{ - CFLAGS='-Os -pipe -static --static -fcommon -fPIC' - LDFLAGS='-static --static -fcommon' - PREFIX='' - DESTDIR=/build - export CFLAGS LDFLAGS PREFIX DESTDIR - - ./configure --prefix="\${PREFIX}" \\ - --sysconfdir=/etc \\ - --with-xz \\ - --with-zlib \\ - --with-zstd - - make ${JN} || exit 1 - make install-strip - - for p in depmod insmod lsmod modinfo modprobe rmmod - do - ln -sf kmod /build/bin/\$p - done -} -! - mkpk ${pkg} - remove_dir ${G_SRC}/${pkg} - unpack_pkg ${pkg} / - ) || exit 1 -fi -timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" kmod 29 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" xz 5.4.2 "${timestamp}" >>${G_PKGDB} end_substep begin_substep gettext-tiny-0.3.2 @@ -2640,7 +2500,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" gettext-tiny 0.3.2 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep musl-legacy-compat-20220710 +begin_substep musl-legacy-compat-20230413 if [ -e /include/sys/cdefs.h ]; then msg info "%s exists, skipping %s" /include/sys/cdefs.h ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -2672,7 +2532,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" musl-legacy-compat 20220710 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" musl-legacy-compat 20230413 "${timestamp}" >>${G_PKGDB} end_substep begin_substep argp-standalone-1.4.1 @@ -2728,13 +2588,13 @@ end_substep # libelf's autoconf script explicitly tests for __thread support # by hardcoding -shared, thus: sucks. -begin_substep libelf-0.186 -if [ -e /sucks/lib/libelf-0.186.so ]; then - msg info "%s exists, skipping %s" /sucks/lib/libelf-0.186.so ${pkg} +begin_substep libelf-0.189 +if [ -e /sucks/lib/libelf-0.189.so ]; then + msg info "%s exists, skipping %s" /sucks/lib/libelf-0.189.so ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - extract_pkg ${G_SRC} elfutils-0.186 ${pkg}.tar.bz2 ${pkg} + extract_pkg ${G_SRC} elfutils-0.189 ${pkg}.tar.bz2 ${pkg} ( cd_or_fail ${G_SRC}/${pkg} cp_or_fail ${G_FIL}/elfutils-void/error.h lib/ @@ -2776,10 +2636,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" libelf 0.186 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" libelf 0.189 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep libffi-3.4.2 +begin_substep libffi-3.4.4 if [ -e /lib/libffi.a ]; then msg info "%s exists, skipping %s" /lib/libffi.a ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -2789,8 +2649,8 @@ else ( cd_or_fail ${G_SRC}/${pkg} - apply_patch packages -Np1 -i \ - ${G_PAT}/libffi-alpine/pax-dlmmap.patch +# apply_patch packages -Np1 -i \ +# ${G_PAT}/libffi-alpine/pax-dlmmap.patch cat <<! >MKPK mkpk_name() @@ -2824,12 +2684,12 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" libffi 3.4.2 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" libffi 3.4.4 "${timestamp}" >>${G_PKGDB} end_substep # Switched to OpenSSL because of (later potentially installed) fetchmail's legal # requirements... -_- -begin_substep openssl-3.0.5 +begin_substep openssl-3.1.0 if [ -e /lib/libssl.a ]; then msg info "%s exists, skipping %s" /lib/libssl.a ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -2868,7 +2728,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" openssl 3.0.5 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" openssl 3.1.0 "${timestamp}" >>${G_PKGDB} end_substep # # LibreSSL doesn't suck, even though technically IMHO it should belong in /sucks @@ -2917,7 +2777,7 @@ end_substep # printf "%s\t%s\t%s\n" libressl 3.4.2 "${timestamp}" >>${G_PKGDB} # end_substep -begin_substep ca-certificates-20211016 +begin_substep ca-certificates-20230311 if [ -e /bin/update-ca-certificates ]; then msg info "%s exists, skipping %s" /bin/update-ca-certificates ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -2926,7 +2786,7 @@ elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then update-ca-certificates chmod 0644 /share/ca-certificates/*.crt else - extract_pkg ${G_SRC} work ${pkg}.tar.xz ${pkg} + extract_pkg ${G_SRC} ${pkg%-*} ${pkg}.tar.xz ${pkg} ( cd_or_fail ${G_SRC}/${pkg} @@ -2975,8 +2835,7 @@ mkpk_install() cd /build/share/ca-certificates /${TLD}/bin/find . -name '*.crt' | sort | cut -b3- > \\ /build/etc/ca-certificates.conf - /${TLD}/bin/sed -i -e 's,openssl rehash,openssl certhash,g' \\ - -e 's,--tmpdir,-p /tmp,g' \\ + /${TLD}/bin/sed -i -e 's,--tmpdir,-p /tmp,g' \\ /build/bin/update-ca-certificates /${TLD}/bin/ln -sv /etc/ssl/certs/ca-certificates.crt \\ @@ -2994,68 +2853,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" ca-certificates 20211016 "${timestamp}" >>${G_PKGDB} -end_substep - -begin_substep curl-7.84.0 -if [ -e /bin/curl ]; then - msg info "%s exists, skipping %s" /bin/curl ${pkg} -elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then - unpack_pkg ${pkg} / -else - extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz - ( - cd_or_fail ${G_SRC}/${pkg} - - cat <<! >MKPK -mkpk_name() -{ - printf "%s" "${pkg}" -} - -mkpk_install() -{ - CFLAGS='-Os -pipe -static --static -fcommon -fPIC' - CFLAGS+=' -D_FORTIFY_SOURCE=2 -I/include' - CPPFLAGS='-D_FORTIFY_SOURCE=2' - LDFLAGS='-static --static -fcommon' - PREFIX='' - DESTDIR=/build - export CFLAGS LDFLAGS PREFIX DESTDIR - - - autoreconf -vif || exit 1 - - ac_cv_sizeof_off_t=8 \\ - ./configure --prefix="\${PREFIX}" \\ - --enable-threaded-resolver \\ - --with-ca-bundle=/etc/ssl/certs.pem \\ - --enable-ipv6 \\ - --enable-unix-sockets \\ - --with-pic \\ - --with-openssl \\ - --disable-shared \\ - --without-libssh2 || exit 1 - - make ${JN} || exit 1 - make install-strip - - mkdir -p /build/sucks/share/aclocal - mv /build/share/aclocal/* /build/sucks/share/aclocal/ - rmdir /build/share/aclocal || true - rmdir /build/share || true -} -! - mkpk ${pkg} - remove_dir ${G_SRC}/${pkg} - unpack_pkg ${pkg} / - ) || exit 1 -fi -timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" curl 7.84.0 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" ca-certificates 20230311 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep Python-3.10.7 +begin_substep Python-3.11.3 if [ -x /sucks/bin/python3 ]; then msg info "%s exists, skipping %s" /sucks/bin/python3 ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -3104,15 +2905,15 @@ mkpk_install() make ${JN} || exit 1 make DESTDIR=\${DESTDIR} install - ln -s python3.10 /build/sucks/bin/python - ln -s python3.10-config /build/sucks/bin/python-config - ln -s idle3.10 /build/sucks/bin/idle - ln -s pydoc3.10 /build/sucks/bin/pydoc - ln -s python3.10.7 /build/sucks/share/man/man1/python.1 + ln -s python3.11 /build/sucks/bin/python + ln -s python3.11-config /build/sucks/bin/python-config + ln -s idle3.11 /build/sucks/bin/idle + ln -s pydoc3.11 /build/sucks/bin/pydoc + ln -s python3.11.3 /build/sucks/share/man/man1/python.1 # Account for /usr/bin/python shebangs mkdir -p /build/bin - ln -s /sucks/bin/python3.10 /build/bin/python + ln -s /sucks/bin/python3.11 /build/bin/python } ! mkpk ${pkg} @@ -3121,7 +2922,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" Python 3.10.7 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" Python 3.11.3 "${timestamp}" >>${G_PKGDB} end_substep begin_substep samurai-1.2 @@ -3164,7 +2965,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" samurai 1.2 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep meson-0.61.3 +begin_substep meson-1.1.0 if [ -e /sucks/bin/meson ]; then msg info "%s exists, skipping %s" /sucks/bin/meson ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -3197,16 +2998,225 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" meson 0.61.3 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" meson 1.1.0 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep procps-ng-3.3.17 +# Needs meson +begin_substep zstd-1.5.5 +if [ -x /bin/zstd ]; then + msg info "%s exists, skipping %s" /bin/zstd ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-Os -pipe -static --static -fcommon -fPIC' + LDFLAGS='-static --static -fcommon -s' + CXXFLAGS=\${CFLAGS} + PREFIX=/ # Deliberate for meson + DESTDIR=/build + LIBS=-lstdc++ + export CFLAGS LDFLAGS CXXFLAGS PREFIX DESTDIR LIBS + + (cd build/meson + meson setup \\ + --prefix="\${PREFIX}" \\ + -Dbin_programs=true \\ + -Dbin_contrib=true \\ + -Ddefault_library=static \\ + -Dstatic_runtime=true \\ + b + + cd b + /${TLD}/bin/sed -i 's,/lib/libz.so,/lib/libz.a,g' \\ + meson-info/intro-dependencies.json + /${TLD}/bin/sed -i 's,/lib/libz.so,/lib/libz.a,g' \\ + build.ninja + ninja ${JN} + ninja install) +} +! + mkpk ${pkg} + remove_dir ${G_SRC}/${pkg} + unpack_pkg ${pkg} / + ) || exit 1 +fi +timestamp=$(date +'%Y-%m-%d %T') +printf "%s\t%s\t%s\n" zstd 1.5.5 "${timestamp}" >>${G_PKGDB} +end_substep + +# Needs zstd +begin_substep kmod-30 +if [ -e /bin/kmod ]; then + msg info "%s exists, skipping %s" /bin/kmod ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-Os -pipe -static --static -fcommon -fPIC' + LDFLAGS='-static --static -fcommon' + PREFIX='' + DESTDIR=/build + export CFLAGS LDFLAGS PREFIX DESTDIR + + ./configure --prefix="\${PREFIX}" \\ + --sysconfdir=/etc \\ + --with-xz \\ + --with-zlib \\ + --with-zstd + + make ${JN} || exit 1 + make install-strip + + for p in depmod insmod lsmod modinfo modprobe rmmod + do + ln -sf kmod /build/bin/\$p + done +} +! + mkpk ${pkg} + remove_dir ${G_SRC}/${pkg} + unpack_pkg ${pkg} / + ) || exit 1 +fi +timestamp=$(date +'%Y-%m-%d %T') +printf "%s\t%s\t%s\n" kmod 30 "${timestamp}" >>${G_PKGDB} +end_substep + +begin_substep curl-8.0.1 +if [ -e /bin/curl ]; then + msg info "%s exists, skipping %s" /bin/curl ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-Os -pipe -static --static -fcommon -fPIC' + CFLAGS+=' -D_FORTIFY_SOURCE=2 -I/include' + CPPFLAGS='-D_FORTIFY_SOURCE=2' + LDFLAGS='-static --static -fcommon' + PREFIX='' + DESTDIR=/build + export CFLAGS LDFLAGS PREFIX DESTDIR + + + autoreconf -vif || exit 1 + + ac_cv_sizeof_off_t=8 \\ + ./configure --prefix="\${PREFIX}" \\ + --enable-threaded-resolver \\ + --with-ca-bundle=/etc/ssl/certs.pem \\ + --enable-ipv6 \\ + --enable-unix-sockets \\ + --with-pic \\ + --with-openssl \\ + --disable-shared \\ + --without-libssh2 || exit 1 + + make ${JN} || exit 1 + make install-strip + + mkdir -p /build/sucks/share/aclocal + mv /build/share/aclocal/* /build/sucks/share/aclocal/ + rmdir /build/share/aclocal || true + rmdir /build/share || true +} +! + mkpk ${pkg} + remove_dir ${G_SRC}/${pkg} + unpack_pkg ${pkg} / + ) || exit 1 +fi +timestamp=$(date +'%Y-%m-%d %T') +printf "%s\t%s\t%s\n" curl 8.0.1 "${timestamp}" >>${G_PKGDB} +end_substep + +# Needed for PRoot +# Requires Python +begin_substep libxslt-1.1.37 +if [ -e /lib/libxslt.a ]; then + msg info "%s exists, skipping %s" /lib/libxslt.a ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-Os -pipe -static --static -fcommon -fPIC' + LDFLAGS='-static --static -fcommon -s' + PREFIX=/ + DESTDIR=/build + export CFLAGS LDFLAGS PREFIX DESTDIR + + /${TLD}/bin/sed -i s/3000/5000/ libxslt/transform.c doc/xsltproc.1 \\ + doc/xsltproc.xml + + ./configure --prefix="\${PREFIX}" --disable-shared || exit 1 + + make ${JN} DESTDIR=\${DESTDIR} install || exit 1 + + mkdir -p /build/sucks/share/aclocal + mv /build/share/aclocal/* /build/sucks/share/aclocal/ + rmdir /build/share/aclocal || true + rmdir /build/share || true +} +! + mkpk ${pkg} + remove_dir ${G_SRC}/${pkg} + unpack_pkg ${pkg} / + ) || exit 1 +fi +timestamp=$(date +'%Y-%m-%d %T') +printf "%s\t%s\t%s\n" libxslt 1.1.37 "${timestamp}" >>${G_PKGDB} +end_substep + +begin_substep procps-ng-4.0.3 if [ -e /bin/top ]; then msg info "%s exists, skipping %s" /bin/top ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - extract_pkg ${G_SRC} procps-3.3.17 ${pkg}.tar.xz ${pkg} + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -3256,10 +3266,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" procps-ng 3.3.17 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" procps-ng 4.0.3 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep awk-20220709 +begin_substep awk-20230412 if [ -e /bin/awk ]; then msg info "%s exists, skipping %s" /bin/awk ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -3303,7 +3313,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" awk 20220709 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" awk 20230412 "${timestamp}" >>${G_PKGDB} end_substep begin_substep check-0.15.2 @@ -3352,7 +3362,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" check 0.15.2 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep diffutils-3.8 +begin_substep diffutils-3.9 if [ -e /bin/diff ]; then msg info "%s exists, skipping %s" /bin/diff ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -3388,22 +3398,22 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" diffutils 3.8 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" diffutils 3.9 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep libuv-1.44.1 +begin_substep libuv-1.44.2 if [ -e /lib/libuv.a ]; then msg info "%s exists, skipping %s" /lib/libuv.a ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - extract_pkg ${G_SRC} libuv-v1.44.1 ${pkg}.tar.gz ${pkg} + extract_pkg ${G_SRC} libuv-v1.44.2 ${pkg}.tar.gz ${pkg} ( cd_or_fail ${G_SRC}/${pkg} - apply_patch packages -Np1 -i \ - ${G_PAT}/libuv-mlfs/autogen-hardcode.patch +# apply_patch packages -Np1 -i \ +# ${G_PAT}/libuv-mlfs/autogen-hardcode.patch cat <<! >MKPK mkpk_name() @@ -3435,10 +3445,20 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" libuv 1.44.1 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" libuv 1.44.2 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep cmake-3.23.2 +# - Can't be (easily) statically compiled +# When using "Unix Makefiles" (ninja only makes the situation slightly better): +# - Recompiling takes _ages_, comparable to GCC! +# - SO. MUCH. SLOOOWW, UNNECESSARY, ABSTRACT, OOP, C++ CODE! +# - No, eye candy ANSI colors during compilation don't make up for it. +# - cmake is a huge mess; "sucks" is an understatement! +# - Did I already mention how much C++ sucks? Yes? Well, one can never emphasize +# that too much! +# - Even with all the supposed "intelligence", build system still can't figure +# out static library dependencies, and needs manual hacks +begin_substep cmake-3.26.3 if [ -e /sucks/bin/cmake ]; then msg info "%s exists, skipping %s" /sucks/bin/cmake ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -3456,37 +3476,40 @@ mkpk_name() mkpk_install() { - # - Can't be (easily) statically compiled - # - -O3 is deliberate - # - Recompiling takes ages, comparable to GCC - # - cmake is a huge mess; "sucks" is an understatement! - CFLAGS='-O3 -pipe -ffat-lto-objects -flto=auto ' - CXXFLAGS=\${CFLAGS} - LDFLAGS='-flto=auto -Wl,-O3 -Wl,--as-needed -s ' - PREFIX=/sucks - DESTDIR=/build - export CFLAGS CXXFLAGS LDFLAGS DESTDIR +# CFLAGS='-O3 -pipe -ffat-lto-objects -flto=auto ' +# CXXFLAGS=\${CFLAGS} +# LDFLAGS='-flto=auto -Wl,-O3 -Wl,--as-needed -s ' + PREFIX=/sucks + DESTDIR=/build +# export CFLAGS CXXFLAGS LDFLAGS DESTDIR + LIBS='-lcurl -lssl -lcrypto' + LDLIBS=\${LIBS} + export PREFIX DESTDIR LIBS LDLIBS - /${TLD}/bin/sed -i '/"lib64"/s,lib64,sucks/lib,' \\ + SED=/${TLD}/bin/sed + + \${SED} -i.bak '/"lib64"/s,lib64,lib,' \\ Modules/GNUInstallDirs.cmake ./bootstrap --prefix="\${PREFIX}" \\ + --datadir="share/${pkg}" \\ --system-libs \\ - --mandir=/sucks/share/man \\ + --mandir=share/man \\ + --system-curl \\ --no-system-jsoncpp \\ --no-system-librhash \\ - --no-system-curl \\ --no-system-nghttp2 \\ --no-system-libarchive \\ + --generator=Ninja \\ + --parallel="${JN}" \\ --docdir=/share/doc/${pkg} - make ${JN} || exit 1 - make DESTDIR="\${DESTDIR}" install + # Need to explicitly hack in libcurl static library dependencies + \${SED} -i.bak 's,\\(/lib/libcurl.a\\),\\1 /lib/libssl.a '\\ +'/lib/libcrypto.a,g' build.ninja - mkdir -p /build/sucks/share/aclocal - mv /build/share/aclocal/* /build/sucks/share/aclocal/ - rmdir /build/share/aclocal || true - rmdir /build/share || true + ninja || exit 1 + DESTDIR="\${DESTDIR}" ninja install || exit 1 } ! mkpk ${pkg} @@ -3495,11 +3518,11 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" cmake 3.23.2 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" cmake 3.26.3 "${timestamp}" >>${G_PKGDB} end_substep # Needed for groff -begin_substep uchardet-0.0.7 +begin_substep uchardet-0.0.8 if [ -e /bin/groff ]; then msg info "%s exists, skipping %s" /sucks/bin/groff ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -3542,7 +3565,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" uchardet 0.0.7 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" uchardet 0.0.8 "${timestamp}" >>${G_PKGDB} end_substep # Needed for groff to convert fonts to pfb @@ -3656,19 +3679,11 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" groff 1.22.4 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep musl-locales-20220708 +begin_substep musl-locales-20230413 if [ -x /bin/locale ]; then msg info "%s exists, skipping %s" /bin/locale ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / - msg warn "Note: If this is the first time you are running this" - msg warn "installation script, at this point you should recom-" - msg warn "pile all packages with i18n built thus far, to make " - msg warn "use of the newly-built locale support. If having lo-" - msg warn "cale support in packages built thus far is not im-" - msg warn "portant to you, ignore this. " - msg query "Press Enter" - read -r enter else ( cd_or_fail ${G_SRC}/${pkg} @@ -3706,18 +3721,42 @@ mkpk_install() mkpk ${pkg} #remove_dir ${G_SRC}/${pkg} unpack_pkg ${pkg} / - msg warn "Note: If this is the first time you are running this" - msg warn "installation script, at this point you should recom-" - msg warn "pile all packages with i18n built thus far, to make " - msg warn "use of the newly-built locale support. If having lo-" - msg warn "cale support in packages built thus far is not im-" - msg warn "portant to you, ignore this. " - msg query "Press Enter" - read -r enter ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" musl-locales 20220708 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" musl-locales 20230413 "${timestamp}" >>${G_PKGDB} +end_substep + +# Depends on locale(1) +begin_substep man-pages-6.04 +if [ -e /share/man/man2/fork.2 ]; then + msg info "%s exists, skipping %s" /share/man/man2/fork.2 ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / + timestamp=$(date +'%Y-%m-%d %T') + printf "%s\t%s\t%s\n" texinfo 7.0.3 "${timestamp}" >>${G_PKGDB} +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz + ( + cd_or_fail ${G_SRC}/${pkg} + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + make DESTDIR=../build prefix= install +} +! + mkpk ${pkg} + remove_dir ${G_SRC}/${pkg} + unpack_pkg ${pkg} / + ) || exit 1 +fi +timestamp=$(date +'%Y-%m-%d %T') +printf "%s\t%s\t%s\n" man-pages 6.04 "${timestamp}" >>${G_PKGDB} end_substep begin_substep mandoc-1.14.6 @@ -3832,7 +3871,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" pigz 2.7 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep mksh-20220709 +begin_substep mksh-20230412 if [ -e /bin/mksh ] && [ ! -L /bin/mksh ]; then msg info "%s exists, skipping %s" /bin/mksh ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -3893,17 +3932,17 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" mksh 20220709 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" mksh 20230412 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep sled-0.10.8 +begin_substep sled-0.11.5 if [ -x /bin/sled ]; then msg info "%s exists, skipping %s" /bin/sled ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else remove_dir ${G_SRC}/${pkg} - extract_pkg ${G_SRC} sled-v0.10.8 ${pkg}.tar.gz ${pkg} + extract_pkg ${G_SRC} sled-v0.11.5 ${pkg}.tar.gz ${pkg} ( cd_or_fail ${G_SRC}/${pkg} @@ -3915,16 +3954,17 @@ mkpk_name() mkpk_install() { - SLED_CC='tcc -Os -static -fcommon' + SLED_CC='tcc -static -fcommon' FALLBACKVER=${pkg##*-} + FALLBACKDATE="12 Apr 2023" PREFIX=/build - export SLED_CC FALLBACKVER PREFIX + export SLED_CC FALLBACKVER FALLBACKDATE PREFIX if [ ! -e do.orig ]; then cp do do.orig /${TLD}/bin/sed -i -e "s,\\<xargs\\>,/${TLD}/bin/xargs,g" do fi - ./do -c install + ./do clean install } ! mkpk ${pkg} @@ -3933,7 +3973,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" sled 0.10.8 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" sled 0.11.5 "${timestamp}" >>${G_PKGDB} end_substep begin_substep dcron-4.5 @@ -4125,7 +4165,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" pcre 8.45 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep pcre2-10.39 +begin_substep pcre2-10.42 if [ -e /lib/libpcre2-32.a ]; then msg info "%s exists, skipping %s" /lib/libpcre2-32.a ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -4171,10 +4211,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" pcre2 10.39 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" pcre2 10.42 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep git-2.37.1 +begin_substep git-2.40.0 if [ -x /bin/git ]; then msg info "%s exists, skipping %s" /bin/git ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -4210,7 +4250,7 @@ mkpk_install() --with-gitconfig=/etc/gitconfig || exit 1 make ${JN} || exit 1 - make DESTDIR=\${DESTDIR} perllibdir=/lib/perl5/5.32/site_perl \\ + make DESTDIR=\${DESTDIR} perllibdir=/sucks/lib/perl5/5.36/site_perl \\ TAR=\${TAR} install # Without this, complains about SSL certificate and refuses to clone @@ -4228,10 +4268,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" git 2.37.1 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" git 2.40.0 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep iproute2-5.17.0 +begin_substep iproute2-5.19.0 if [ -x /bin/ss ]; then msg info "%s exists, skipping %s" /bin/ss ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -4241,6 +4281,9 @@ else ( cd_or_fail ${G_SRC}/${pkg} + apply_patch packages -Np0 -i \ + ${G_PAT}/iproute2-galeb/0001-ipstats_c-define-MIN.patch + cat <<! >MKPK mkpk_name() { @@ -4251,17 +4294,25 @@ mkpk_install() { CFLAGS='-Os -pipe -static --static -fcommon -fPIC' LDFLAGS='-static --static -fcommon -s' - DESTDIR=/build + PREFIX='' + DESTDIR=\${PREFIX}/build + DOCDIR=\${DESTDIR}/share/doc/${pkg} + LIBDIR=/lib YACC=yacc - export CFLAGS LDFLAGS DESTDIR YACC + export CFLAGS LDFLAGS PREFIX DESTDIR DOCDIR LIBDIR YACC + + SED=/${TLD}/bin/sed - /${TLD}/bin/sed -i '/ARPD/d' Makefile + \${SED} -i -e '/ARPD/d' -e 's,^\\(PREFIX.*=\\).*,\\1'\${PREFIX}',g' \\ + Makefile || exit 1 + \${SED} -i 's,\$(DESTDIR)\$(LIBDIR)/tc,'\${DESTDIR}\${LIBDIR}'/tc,g' \\ + netem/Makefile || exit 1 rm -f man/man8/arpd.8 - /${TLD}/bin/sed -i 's/.m_ipt.o//' tc/Makefile - /${TLD}/bin/sed -i 's/^LDLIBS\\s*+=.*/& -lz/' Makefile + \${SED} -i 's/.m_ipt.o//' tc/Makefile || exit 1 + \${SED} -i 's/^LDLIBS\\s*+=.*/& -lz/' Makefile || exit 1 make NETNS_RUN_DIR=/run/netns ${JN} - make DOCDIR=/share/doc/${pkg} install + make install } ! mkpk ${pkg} @@ -4270,11 +4321,11 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" iproute2 5.17.8 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" iproute2 5.19.0 "${timestamp}" >>${G_PKGDB} end_substep # Needed for PRoot -begin_substep libarchive-3.6.1 +begin_substep libarchive-3.6.2 if [ -e /lib/libarchive.a ]; then msg info "%s exists, skipping %s" /lib/libarchive.a ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -4297,7 +4348,7 @@ mkpk_install() PREFIX='' DESTDIR=/build export CFLAGS LDFLAGS PREFIX DESTDIR - + ./configure --prefix="\${PREFIX}" \\ --disable-bsdcat \\ --disable-bsdcpio \\ @@ -4313,10 +4364,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" libarchive 3.6.1 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" libarchive 3.6.2 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep kbd-2.4.0 +begin_substep kbd-2.5.1 if [ -x /bin/loadkeys ]; then msg info "%s exists, skipping %s" /bin/loadkeys ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -4395,10 +4446,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" kbd 2.4.0 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" kbd 2.5.1 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep make-4.3 +begin_substep make-4.4 if [ -x /bin/make ]; then msg info "%s exists, skipping %s" /bin/make ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -4434,7 +4485,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" make 4.3 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" make 4.4 "${timestamp}" >>${G_PKGDB} end_substep begin_substep patch-2.7.6 @@ -4518,7 +4569,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" metalog 20220214 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep reflex-20210808 +begin_substep reflex-20230206 if [ -x /bin/reflex ]; then msg info "%s exists, skipping %s" /bin/reflex ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -4547,6 +4598,8 @@ mkpk_install() make ${JN} make install ln -s reflex /build/bin/flex + ln -s reflex.1 /build/share/man/man1/flex.1 + ln -s reflex++.1 /build/share/man/man1/flex++.1 } ! mkpk ${pkg} @@ -4555,17 +4608,17 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" reflex 20210808 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" reflex 20230206 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep table-0.6.4 +begin_substep table-0.6.10 if [ -x /bin/table ]; then msg info "%s exists, skipping %s" /bin/table ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else remove_dir ${G_SRC}/${pkg} - extract_pkg ${G_SRC} table-v0.6.4 ${pkg}.tar.gz ${pkg} + extract_pkg ${G_SRC} table-v0.6.10 ${pkg}.tar.gz ${pkg} ( cd_or_fail ${G_SRC}/${pkg} @@ -4577,17 +4630,18 @@ mkpk_name() mkpk_install() { - TABLE_CC='tcc -Os -static -fcommon' + TABLE_CC='tcc -static -fcommon' FALLBACKVER=${pkg##*-} + FALLBACKDATE="10 Apr 2023" PREFIX=/build - export TABLE_CC FALLBACKVER PREFIX + export TABLE_CC FALLBACKVER FALLBACKDATE PREFIX if [ ! -e do.orig ]; then cp do do.orig /${TLD}/bin/sed -i -e "s,\\<xargs\\>,/${TLD}/bin/xargs,g" do fi patch -Np1 -i tcc-unicode-string-literals.patch - ./do -c install + ./do clean install } ! mkpk ${pkg} @@ -4596,11 +4650,11 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" table 0.6.4 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" table 0.6.10 "${timestamp}" >>${G_PKGDB} end_substep # Needed for PRoot -begin_substep talloc-2.3.4 +begin_substep talloc-2.4.0 if [ -e /sucks/lib/libtalloc.a ]; then msg info "%s exists, skipping %s" /sucks/lib/libtalloc.a ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -4652,7 +4706,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" talloc 2.3.4 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" talloc 2.4.0 "${timestamp}" >>${G_PKGDB} end_substep begin_substep proot-5.3.1 @@ -4706,7 +4760,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" proot 5.3.1 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep texinfo-6.8 +begin_substep texinfo-7.0.3 if [ -x /bin/texi2dvi ]; then msg info "%s exists, skipping %s" /bin/texi2dvi ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -4730,8 +4784,7 @@ mkpk_install() DESTDIR=/build export CFLAGS LDFLAGS PREFIX DESTDIR - ./configure --prefix="\${PREFIX}" \\ - --disable-static + ./configure --prefix="\${PREFIX}" make ${JN} make install } @@ -4742,10 +4795,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" texinfo 6.8 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" texinfo 7.0.3 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep strace-5.18 +begin_substep strace-6.2 if [ -x /bin/strace ]; then msg info "%s exists, skipping %s" /bin/strace ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -4782,10 +4835,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" strace 5.18 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" strace 6.2 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep usleep-20220718 +begin_substep usleep-20230414 if [ -x /bin/usleep ]; then msg info "%s exists, skipping %s" /bin/usleep ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -4818,7 +4871,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" usleep 20220718 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" usleep 20230414 "${timestamp}" >>${G_PKGDB} end_substep # Unfortunately, gives "Out of memory - too many lines in file" @@ -5056,13 +5109,13 @@ end_substep # fi # end_substep -begin_substep vim-8.1 +begin_substep vim-9.0 if [ -x /bin/vim ]; then msg info "%s exists, skipping %s" /bin/vim ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - extract_pkg ${G_SRC} vim81 ${pkg}.tar.bz2 ${pkg} + extract_pkg ${G_SRC} vim90 ${pkg}.tar.bz2 ${pkg} ( cd_or_fail ${G_SRC}/${pkg} @@ -5131,12 +5184,12 @@ cabbrev h only <bar> vertical botright help ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" vim 8.1 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" vim 9.0 "${timestamp}" >>${G_PKGDB} end_substep # ERROR: You must have bison installed to build the util-linux. # - Riiiight. -begin_substep util-linux-2.38 +begin_substep util-linux-2.38.1 if [ -x /bin/lsblk ]; then msg info "%s exists, skipping %s" /bin/lsblk ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -5229,11 +5282,11 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" util-linux 2.38 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" util-linux 2.38.1 "${timestamp}" >>${G_PKGDB} end_substep # sbase lacks stty as of the making of this script, so using what is available -begin_substep stty-9.1 +begin_substep stty-9.2 #if [ -x /bin/stty ]; then # msg info "%s exists, skipping %s" /bin/stty ${pkg} #elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -5241,7 +5294,7 @@ if [ -e ${G_SPKG}/${pkg}.tar.xz ]; then rm /bin/stty unpack_pkg ${pkg} / else - extract_pkg ${G_SRC} coreutils-9.1 coreutils-9.1.tar.xz ${pkg} + extract_pkg ${G_SRC} coreutils-9.2 coreutils-9.2.tar.xz ${pkg} ( cd_or_fail ${G_SRC}/${pkg} @@ -5276,14 +5329,12 @@ mkpk_install() make || true # Hack sucky auto*hell - set -x /${TLD}/bin/sed -i 's/^\\(# *if \\)\$/\\10/g' lib/stdint.h /${TLD}/bin/sed -i \\ -e 's/^\\(# *if \\)\$/\\10/g' \\ -e 's/^\\(# *if defined __MINGW32__ && !\\)\$/\\11/g' \\ lib/wctype.h /${TLD}/bin/sed -i 's/^\\(# *if \\)\$/\\10/g' lib/wchar.h - set +x # This should be enough, but it doesn't work, so have to 'make all' #make src/stty || exit 1 @@ -5300,10 +5351,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" stty 9.1 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" stty 9.2 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep e2fsprogs-1.46.5 +begin_substep e2fsprogs-1.47.0 if [ -x /sucks/sbin/e2fsck ]; then msg info "%s exists, skipping %s" /sucks/sbin/e2fsck ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -5359,7 +5410,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" e2fsprogs 1.46.5 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" e2fsprogs 1.47.0 "${timestamp}" >>${G_PKGDB} end_substep begin_substep cpio-2.13 @@ -5408,7 +5459,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" cpio 2.13 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep sdhcp-20220716 +begin_substep sdhcp-20230414 if [ -x /bin/sdhcp ]; then msg info "%s exists, skipping %s" /bin/sdhcp ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -5451,10 +5502,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" sdhcp 20220716 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" sdhcp 20230414 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep sinit-20220713 +begin_substep sinit-20230414 if [ -x /sbin/init ]; then msg info "%s exists, skipping %s" /sbin/init ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -5500,10 +5551,10 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" sinit 20220713 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" sinit 20230414 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep dropbear-2022.82 +begin_substep dropbear-2022.83 if [ -x /bin/dropbear ]; then msg info "%s exists, skipping %s" /bin/dropbear ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -5543,7 +5594,7 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" dropbear 2022.82 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" dropbear 2022.83 "${timestamp}" >>${G_PKGDB} end_substep # Doesn't support HTTPS (yet?) @@ -5586,13 +5637,13 @@ end_substep # end_substep # Needed for efibootmgr -begin_substep popt-1.18 +begin_substep popt-1.19 if [ -e /lib/libpopt.a ]; then msg info "%s exists, skipping %s" /lib/libpopt.a ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - extract_pkg ${G_SRC} popt-popt-1.18-release ${pkg}.tar.gz ${pkg} + extract_pkg ${G_SRC} popt-popt-1.19-release ${pkg}.tar.gz ${pkg} ( cd_or_fail ${G_SRC}/${pkg} @@ -5630,10 +5681,17 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" popt 1.18 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" popt 1.19 "${timestamp}" >>${G_PKGDB} end_substep # Needed for efibootmgr +# +# Note: I couldn't get efivar-38 to compile statically. `make efivar-static` +# reports undefined symbol `efi_well_known_guids` even if I modify the +# compilation command to explicitly include the object file holding that symbol, +# src/guid-symbols.static.o, at the end. I have no clue why is that and how to +# solve that, so using efivar-37 until the version which I can compile +# statically. begin_substep efivar-37 if [ -e /lib/libefivar.a ]; then msg info "%s exists, skipping %s" /lib/libefivar.a ${pkg} @@ -5661,6 +5719,8 @@ mkpk_install() { CFLAGS='-Os -pipe -static --static -fcommon -fPIC ' CFLAGS+='-D_GNU_SOURCE -Wno-error=address-of-packed-member ' + # v-------- Because of basename(char*)... + CFLAGS+='-Wno-discarded-qualifiers ' LDFLAGS='-static --static -fcommon' PREFIX='' DESTDIR=/build @@ -5836,7 +5896,7 @@ timestamp=$(date +'%Y-%m-%d %T') printf "%s\t%s\t%s\n" gpm 1.20.7 "${timestamp}" >>${G_PKGDB} end_substep -begin_substep elinks-0.15.0 +begin_substep elinks-0.16.0 if [ -e /bin/elinks ]; then msg info "%s exists, skipping %s" /bin/nasm ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then @@ -5907,9 +5967,13 @@ mkpk_install() ) || exit 1 fi timestamp=$(date +'%Y-%m-%d %T') -printf "%s\t%s\t%s\n" elinks 0.15.0 "${timestamp}" >>${G_PKGDB} +printf "%s\t%s\t%s\n" elinks 0.16.0 "${timestamp}" >>${G_PKGDB} end_substep +msg info "To be continued..." +cd / +exit + begin_substep nasm-2.15.05 if [ -e /bin/nasm ]; then msg info "%s exists, skipping %s" /bin/nasm ${pkg} diff --git a/BOOTING b/BOOTING @@ -122,11 +122,11 @@ After the boot scripts have finished, you will be presented with a choice to create a boot image. The boot image will be compressed with xz and needs to be sent to a USB flash medium, for example: - # xz -dc galeb-2.1-x86_64-20220913.raw.xz > /dev/sdb + # xz -dc galeb-2.2-x86_64-20220913.raw.xz > /dev/sdb or, if you have pv[4]: - # xz -dc galeb-2.1-x86_64-20220913.raw.xz | pv > /dev/sdb + # xz -dc galeb-2.2-x86_64-20220913.raw.xz | pv > /dev/sdb _Be careful when specifying the device you send the output to, in order to not overwrite any existing partitions (your hard disk, etc)!_ You can find out the diff --git a/art/galeb-bw.ansi b/art/galeb-bw.ansi @@ -3,8 +3,8 @@ \" ▀██▀█▄:▀██▀█▄▀██▀::▀██▀▀:▀██▀▄: "/ .▀▀▄' ███:▄▄▄:██▄██:██::::██▄:: ██▄█▄ '▄▀▀. ▄▄▄▀ ███::█::██:██:██::▄▄██:▄▄:██:██ ▀▄▄▄ - ▀ ▄▄▄ ▀█████:▀██:██:███▀█ ███▀█:████▀ ▄▄▄ ▀ + • ▀ ▄▄▄ ▀█████:▀██:██:███▀█ ███▀█:████▀ ▄▄▄ ▀ • .█ '':::: ▀ :::: ▀:▀ ::::::: ▀ :::::'' █. ▄ ▄▀▀▄ :: ··• musl/Linux 2.2 •·· ::' ▄▀▀▄ ▄ ▀▀ ' sinit * sbase * ubase * 9base ' ▀▀ - + diff --git a/art/galeb.ansi b/art/galeb.ansi @@ -3,8 +3,8 @@  \" ▀██▀█▄:▀██▀█▄▀██▀::▀██▀▀:▀██▀▄: "/  .▀▀▄' ███:▄▄▄:██▄██:██::::██▄:: ██▄█▄ '▄▀▀.  ▄▄▄▀ ███::█::██:██:██::▄▄██:▄▄:██:██ ▀▄▄▄ -  ▀ ▄▄▄ ▀█████:▀██:██:███▀█ ███▀█:████▀ ▄▄▄ ▀ +  • ▀ ▄▄▄ ▀█████:▀██:██:███▀█ ███▀█:████▀ ▄▄▄ ▀ •  .█ '':::: ▀ :::: ▀:▀ ::::::: ▀ :::::''  █.  ▄ ▄▀▀▄ :: ··• musl/Linux 2.2 •·· ::' ▄▀▀▄ ▄  ▀▀ '  sinit * sbase * ubase * 9base ' ▀▀ - + diff --git a/art/galeb.source b/art/galeb.source @@ -3,8 +3,8 @@ ! \"@^DD^Dc:^DD^Dc^DD^::^DD^^:^DD^c:!"/ ! .^^c'@DDD:ccc:DDcDD:DD::::DDc::@DDcDc!'c^^. ! ccc^@DDD::D::DD:DD:DD::ccDD:cc:DD:DD!^ccc - ! ^ ccc@^DDDDD:^DD:DD:DDD^D DDD^D:DDDD^!ccc ^ + !• ^ ccc@^DDDDD:^DD:DD:DDD^D DDD^D:DDDD^!ccc ^ • ! .D$ ''::::@^$::::@^:^$:::::::@^$:::::'' !D. ! c c^^c$::#··•%musl/Linux 2.2#•··$::'!c^^c c ! ^^ ' $sinit * sbase * ubase * 9base! ' ^^~ - + diff --git a/fil/README.1st b/fil/README.1st @@ -1,4 +1,4 @@ -README for Galeb 2.1 Sep 09 2022 +README for Galeb 2.2 Apr 12 2023 ==================== This is a short introduction to Galeb. This document is currently shown in a @@ -41,7 +41,7 @@ and so on. Package manager mkpk(8) Password management pass Privilege escalation doas(1), su(1) - RSS reader* sfeed(1) + RSS parser/reader* sfeed(1), sfeed_curses(1) SSH dbclient(1), dropbearkey(1), scp, dropbear(8) Service management rc.conf(5), service(8), svc(8) diff --git a/fil/man/man8/galeb.8 b/fil/man/man8/galeb.8 @@ -1,6 +1,6 @@ -.Dd September 09, 2022 +.Dd April 13, 2023 .Dt GALEB 8 SMM -.Os Galeb 2.1 +.Os Galeb 2.2 .Sh NAME .Nm Galeb .Nd simple musl-based static distro diff --git a/lib/dirs.tsv b/lib/dirs.tsv @@ -10,6 +10,7 @@ Path Mode Owner Group Step /home 0755 root root 01-cross.sh,02-chroot.sh-start /include 0755 root root 01-cross.sh,02-chroot.sh-start /lib 0755 root root 01-cross.sh,02-chroot.sh-start +/libexec 0755 root root 01-cross.sh,02-chroot.sh-start /local 0755 root root 01-cross.sh,02-chroot.sh-start /local/bin 0755 root root 01-cross.sh,02-chroot.sh-start /local/include 0755 root root 01-cross.sh,02-chroot.sh-start diff --git a/lib/env.sh b/lib/env.sh @@ -15,7 +15,7 @@ GUID=$(grep ^${GUSER}: /etc/passwd | sed 1q | cut -d : -f 3) GGID=$(grep ^${GUSER}: /etc/group | sed 1q | cut -d : -f 3) CT_TRI=x86_64-cross-linux-musl -GR_TRI=x86_64-linux-musl +GR_TRI=x86_64-galeb-linux-musl GR=${GHOME}/galeb-root CTD=cross-tools FLD=fil @@ -41,7 +41,7 @@ G_PAT=${G_SRC}/${PTD} G_PKG=${G_SRC}/pkg G_SHORTLOG=${G_LOG}/shortlog G_TARGET=x86_64-galeb-linux-musl -G_VER=2.1 +G_VER=2.2 JN=${JN:- -j$(($(grep ^processor /proc/cpuinfo | wc -l) * 3))} G_PKGDB=${G_SPKG}/pkgdb.tsv diff --git a/lib/fun.sh b/lib/fun.sh @@ -428,9 +428,11 @@ mkpk() if [ ${fail} -eq 0 ]; then msg info "mkpk packing..." cd ../build - tar -c $(g_find . \( -type b -o -type c -o \ + g_find . \( -type b -o -type c -o \ -type f -o -type l \) \ - -cnewer ../timestamp | sort | uniq) | \ + -cnewer ../timestamp \ + -printf "%p\n" \ + | sort | uniq | tar -c -T - | \ xz -9 > ${G_SPKG}/$(mkpk_name).tar.xz && \ cd ${G_SPKG} && \ g_shasum $(mkpk_name).tar.xz >$(mkpk_name).sha512 && \ @@ -536,10 +538,10 @@ run_configure() { local location=$1 shift - msg info "configure %s" "$*" + msg info "%s/configure %s" "${location}" "$*" setup_fifo if ! ${location}/configure $* >${G_FIFO} 2>&1; then - msg err "configure %s failed" "$*" + msg err "%s/configure %s failed" "${location}" "$*" exit 1 fi rm ${G_FIFO} diff --git a/lib/pkgs.tsv b/lib/pkgs.tsv @@ -1,155 +1,157 @@ URL Directory/Tarball SHA512 Sum -ftp://ftp.vim.org/pub/vim/unix/vim-8.1.tar.bz2 141074bdc25d68f7ced9b596da3b5c6e719f9e316b3ce6cb30d0c501d0c5396e2c6d0efc6425a41f2320cd80593fbb1c5ca64fb5e2178f1fb16cdbb470aa630e -git+https://git.adelielinux.org/adelie/musl-locales.git musl-locales-20220708 +ftp://ftp.vim.org/pub/vim/unix/vim-9.0.tar.bz2 e86adeaf4bfcf4d32cf9ad98825100dcd7cc0140c2e62d05ceefdf470ba94d5b6afa4bd8aa2b1083ff0a5092efd03afa2ded11c46e5cd1d87c3814939d9ff1e6 +git+https://git.adelielinux.org/adelie/musl-locales.git musl-locales-20230413 git+https://git.sr.ht/~strahinja/reflow reflow-20220716 git+https://git.sr.ht/~strahinja/sbase sbase-20220801 git+https://git.sr.ht/~strahinja/svc svc-20220913 -git+https://github.com/cpeuvrel/usleep-aur usleep-20220718 -git+https://github.com/mirbsd/mksh mksh-20220709 -git+https://github.com/onetrueawk/awk awk-20220709 +git+https://github.com/cpeuvrel/usleep-aur usleep-20230414 +git+https://github.com/mirbsd/mksh mksh-20230412 +git+https://github.com/onetrueawk/awk awk-20230412 git+https://github.com/rhboot/gnu-efi.git shim-15.6/rhboot-gnu-efi git+https://github.com/rhboot/shim.git shim-15.6 git://git.2f30.org/pass pass-20220723 -git://git.2f30.org/sdhcp sdhcp-20220716 -git://git.suckless.org/9base 9base-20220706 +git://git.2f30.org/sdhcp sdhcp-20230414 +git://git.suckless.org/9base 9base-20230412 git://git.suckless.org/farbfeld farbfeld-20220722 -git://git.suckless.org/sinit sinit-20220713 +git://git.suckless.org/sinit sinit-20230414 git://git.suckless.org/smdev smdev-20220715 -git://git.suckless.org/ubase ubase-20220709 +git://git.suckless.org/ubase ubase-20230412 git://oldgit.suckless.org/sup sup-20220718 -git://repo.or.cz/tinycc.git tinycc-20220708 -http://mama.indstate.edu/users/ice/tree/src/tree-2.0.2.tgz 5b9612ada9e3b1414d06daf5d7589f18480f232ba6ea29a004ceb7ff5b46c57610766bdb2babe9c20047dfea39cb233a6d92a60fcf2c38beccbebc94fb1eb20f +git://repo.or.cz/tinycc.git tinycc-20230413 +http://mama.indstate.edu/users/ice/tree/src/tree-2.0.2.tgz http://www.jimpryor.net/linux/releases/dcron-4.5.tar.gz 08521391d16ba5adf80278ec2a734319c26c48841fd94b119c0b27d744c2cfb3562b1a3630135a03d1c43b1668d49262713abb20ff5f7ecd397a2a19a2f6105a -http://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.xz 512f90a2584f1c5811429274b97c64a2cedf37b9fdeffb1bcd0ea64afd9ecc19a2d7877ca8f1e05393aa324153fc9f39ea51dacbf8d25a7d5a2d7728c925dba7 +http://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.xz 391c49d87db443f04d68fd986a5d00993d4a0d6804946c647c19fbd182d487a29dcaa670f83e3796d805021181cfb8ef8d1fc184de5be6454bfba3456ccbbc1f http://xmlsoft.org/sources/libxml2-2.9.12.tar.gz df1c6486e80f0fcf3c506f3599bcfb94b620c00d0b5d26831bc983daa78d58ec58b5057b1ec7c1a26c694f40199c6234ee2a6dcabf65abfa10c447cb5705abbd -https://astron.com/pub/file/file-5.41.tar.gz bbf2d8e39450b31d0ba8d76d202790fea953775657f942f06e6dc9091798d4a395f7205e542388e4a25b6a4506d07f36c5c4da37cfce0734133e9203a3b00654 -https://bearssl.org/bearssl-0.6.tar.gz f9ed25683cfc6c4abe7f1203a2b82ed101ee4c9e0f9ab60755b6a09c8d1e8e4f64d413624e7bb9c4b0033f909a2e4568a1d916cc6ce4736222900691e1f8359a -https://cmake.org/files/v3.23/cmake-3.23.2.tar.gz 0925adf973d642fd76d4089b61b3882babb0a85050c4c57d5f5f3bd6b17564a9feb0beed236cd636e25f69072fa30b67ea3f80932380b6b6576f2dd78b8e6931 +https://astron.com/pub/file/file-5.44.tar.gz 26c3b9c7a6950649d0b2de896bfeca54289febe4cd487c0f91aa6ff1857fa49f9077f8738a17b86100125668a31dae05b586615c564f78da47ac20a1e4a74f63 +https://bearssl.org/bearssl-0.6.tar.gz +https://cmake.org/files/v3.26/cmake-3.26.3.tar.gz b09447318512b91c772e36c764049789224032c6c650289a94f6311f999ca104b617bf2dced57b723da23472f015549affabd9c8c076857490c47a1aee7eb7a0 https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.46.tar.gz c4609495cc5ca34952f61876a690ef76d42eee6689d1bedb8036c9eab918525ec5213f1639c7178c029ee0f8765a2ca5eb0197f6e39b8be6d5dbc3f3c1d0b389 -https://curl.se/download/curl-7.84.0.tar.xz 86231866a35593a1637fbc0c6af3b6761bdfd99fb35580cc52970c36f19604f93dce59fea67a1d5bb4b455f719307599c7916c77d14f2b661f6bf7fb1ca716ce +https://curl.se/download/curl-8.0.1.tar.xz 3bb777982659ed697ae90f113ff7b65d6ce8ba9fe6a8984cfd6769d2f051a72ba953c911abe234c204ec2cc5a35d68b4d033037fad7fba31bb92a52543f8d13d https://dev.alpinelinux.org/archive/posixtz/posixtz-0.5.tar.xz 68dbaab9f4aef166ac2f2d40b49366527b840bebe17a47599fe38345835e4adb8a767910745ece9c384b57af815a871243c3e261a29f41d71f8054df3061b3fd https://dev.gentoo.org/~xen0n/distfiles/pax-utils-1.3.4.tar.xz 44a475860823e8b70b1d09d69e5fba3ed8298511d07e1e7b09ce62237cb8b1ecee8fc2fc550d6853d0b9f8db3c350bf78ced49d5f210997b294dc10e36627fcd -https://dist.libuv.org/dist/v1.44.1/libuv-v1.44.1.tar.gz libuv-1.44.1.tar.gz b4f8944e2c79e3a6a31ded6cccbe4c0eeada50db6bc8a448d7015642795012a4b80ffeef7ca455bb093c59a8950d0e1430566c3c2fa87b73f82699098162d834 -https://distfiles.dereferenced.org/pkgconf/pkgconf-1.8.0.tar.xz 58204006408ad5ce91222ed3c93c2e0b61c04fa83c0a8ad337b747b583744578dbebd4ad5ccbc577689637caa1c5dc246b7795ac46e39c6666b1aa78199b7c28 -https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.35.tar.xz 9dd4a699235f50ae9b75b25137e387471635b4b2da0a4e4380879cd49f1513470fcfbfd775269b066eac513a1ffa6860c77ec42747168e2348248f09f60c8c96 +https://dist.libuv.org/dist/v1.44.2/libuv-v1.44.2.tar.gz libuv-1.44.2.tar.gz 91197ff9303112567bbb915bbb88058050e2ad1c048815a3b57c054635d5dc7df458b956089d785475290132236cb0edcfae830f5d749de29a9a3213eeaf0b20 +https://distfiles.dereferenced.org/pkgconf/pkgconf-1.9.4.tar.xz 079436244f3942161f91c961c96d382a85082079c9843fec5ddd7fb245ba7500a9f7a201b5ef2c70a7a079fe1aacf3a52b73de5402a6f061df87bcdcf0a90755 +https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.37.tar.xz a4e477d2bb918b7d01945e2c7491c3a4aae799dc1602bbd13de55c8a5052e210a20bc45115347eae44473c8b1d03dbc5e4a2aa18c2218f1fdfd376d87cd501ca https://download.savannah.gnu.org/releases/acl/acl-2.3.1.tar.xz 7d02f05d17305f8587ab485395b00c7fdb8e44c1906d0d04b70a43a3020803e8b2b8c707abb6147f794867dfa87bd51769c2d3e11a3db55ecbd2006a6e6231dc https://download.savannah.gnu.org/releases/attr/attr-2.5.1.tar.gz 8b4c043d61f8f3e0cd098e701181069f51117b85fd6ba18bfe9af77d894ea671232377d4793ffc822e9259ceee6ac71d75732eb93b2830c6cb5d0d918ba2d21b https://downloads.sourceforge.net/docutils/docutils-0.19.tar.gz fb904a899f2b6f3c07c5079577bd7c52a3182cb85f6a4149391e523498df15bfa317f0c04095b890beeb3f89c2b444875a2a609d880ac4d7fbc3125e46b37ea5 -https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-2.1.3.tar.gz 975c9835de7d70c6c8c5a1959adfa18f7f956bc9946fde8f1b40c1d853245c38a3118ac06b93841ec3e90be6945c38d687d062b371496c2ee9b5638d7f60418d -https://downloads.sourceforge.net/libpng/libpng-1.6.37.tar.xz 59e8c1059013497ae616a14c3abbe239322d3873c6ded0912403fc62fb260561768230b6ab997e2cccc3b868c09f539fd13635616b9fa0dd6279a3f63ec7e074 -https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.46.5/e2fsprogs-1.46.5.tar.gz 1a3496cb6ac575c7a5c523cc4eede39bc77c313a6d1fea2d303fc967792d75d94e42d7821e1a61b7513509320aae4a7170506decf5753ddbd1dda9d304cc392e +https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-2.1.3.tar.gz +https://downloads.sourceforge.net/libpng/libpng-1.6.37.tar.xz +https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.47.0/e2fsprogs-1.47.0.tar.gz 4f03a469d03cb0f0656bd17c64d944606fb25e68002e3e42c278f3775fee6bf776cc2061ae378b5df4f167a5c33444490111fdcbb140e0320445706f9d048dd0 https://ftp.barfooze.de/pub/sabotage/tarballs/gettext-tiny-0.3.2.tar.xz 0efde2ce995c1bc5e2b983a5c83b8532cb8e99ae9043c5de7085cf550eb2c052bad4641782fb64b2bc70434844a935f0935d9f1a62954d7facbe247fe4ce1e21 https://ftp.barfooze.de/pub/sabotage/tarballs/netbsd-curses-0.3.2.tar.xz 2f5604782599f07ee8c54bbf98fa7f8b1c13a26b3e194a4b4ac756f8b23448d1d3cb65223f39de304f34322b73deec6ccfa93cd4a606b2ed56308de730d6593e -https://ftp.debian.org/debian/pool/main/c/ca-certificates/ca-certificates_20211016.tar.xz ca-certificates-20211016.tar.xz bedf072c8aa1b05b249ea272f5cecfe16bdcd762c02c712323f12ac7a278e8814453f5f3caad86a2581e451788b292ed3a76a6a81620926459bb890133cffde1 +https://ftp.debian.org/debian/pool/main/c/ca-certificates/ca-certificates_20230311.tar.xz ca-certificates-20230311.tar.xz 00571bdc87897813fd7dbe024f3a186cfc9f0d4f55e92545a90888c9e5282f99cb8d75b5932c034731b911bf27a9b38fd7d062dd511eb1152acf8b2811490fa7 https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz 73d32b4adcbe24e3bafa9f43f59ed3b6efbd3de0f194e5ec90375f35da1199c583f5d3e89139b7edbad35171403709270e339ffa56a2ecb9b3123e9285021ff0 -https://ftp.gnu.org/gnu/automake/automake-1.16.4.tar.xz 5a8883657e73b75bfa1ee59ab04af6bf4d43f390ab62fb7a9e8e2ac66159dfe4947b2ac7bc1028afffe6a09d88f388339500e03f6cdfa1226985be45ec033246 -https://ftp.gnu.org/gnu/bash/bash-5.1.tar.gz c44a0ce381469219548a3a27589af3fea4f22eda1ca4e9434b59fc16da81b471c29ce18e31590e0860a6a251a664b68c2b45e3a17d22cfc02799ffd9a208390c -https://ftp.gnu.org/gnu/binutils/binutils-2.38.tar.xz 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d +https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz 3084ae543aa3fb5a05104ffb2e66cfa9a53080f2343c44809707fd648516869511500dba50dae67ff10f92a1bf3b5a92b2a0fa01cda30adb69b9da03994d9d88 +https://ftp.gnu.org/gnu/bash/bash-5.2.15.tar.gz 08a67f6da4af7a75ff2b2d5a9eb8fc46d8c6e9ae80ccaf73b51736d6609916861b1f3fced938ce3ea16d014edb324e1a3d8e03f4917f68dc56ffb665316f26c7 +https://ftp.gnu.org/gnu/binutils/binutils-2.40.tar.xz a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 https://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.xz d4d23af6671406e97257892f90651b67f2ab95219831372be032190b7156c10a3435d457857e677445df8b2327aacccc15344acbbc3808a6f332a93cce23b444 -https://ftp.gnu.org/gnu/coreutils/coreutils-9.1.tar.xz a6ee2c549140b189e8c1b35e119d4289ec27244ec0ed9da0ac55202f365a7e33778b1dc7c4e64d1669599ff81a8297fe4f5adbcc8a3a2f75c919a43cd4b9bdfa +https://ftp.gnu.org/gnu/coreutils/coreutils-9.2.tar.xz 7e3108fefba4ef995cc73c64ac5f4e09827a44649a97ddd624eb61d67ce82da5ed6dc8c0f79d3e269f5cdb7d43877a61ef5b93194dd905bec432a7e31f9f479c https://ftp.gnu.org/gnu/cpio/cpio-2.13.tar.bz2 459398e69f7f48201c04d1080218c50f75edcf114ffcbb236644ff6fcade5fcc566929bdab2ebe9be5314828d6902e43b348a8adf28351df978c8989590e93a3 -https://ftp.gnu.org/gnu/diffutils/diffutils-3.8.tar.xz 279441270987e70d5ecfaf84b6285a4866929c43ec877e50f154a788858d548a8a316f2fc26ad62f7348c8d289cb29a09d06dfadce1806e3d8b4ea88c8b1aa7c +https://ftp.gnu.org/gnu/diffutils/diffutils-3.9.tar.xz d43280cb1cb2615a8867d971467eb9a3fa037fe9a411028068036f733dab42b10d42767093cea4de71e62b2659a3ec73bd7d1a8f251befd49587e32802682d0f https://ftp.gnu.org/gnu/findutils/findutils-4.9.0.tar.xz ba4844f4403de0148ad14b46a3dbefd5a721f6257c864bf41a6789b11705408524751c627420b15a52af95564d8e5b52f0978474f640a62ab86a41d20cf14be9 -https://ftp.gnu.org/gnu/gdbm/gdbm-1.20.tar.gz 5f2fbd4318259e5b879ea2bff09e22defbb4e566ebbe11c44ac5b5369fd00745d7ed9f72ec1206153027eba245c4ee4a515a8ec6d67f84ec477483e72753590b +https://ftp.gnu.org/gnu/gdbm/gdbm-1.23.tar.gz 918080cb0225b221c11eb7339634a95e00c526072395f7a3d46ccf42ef020dea7c4c5bec34aff2c4f16033e1fff6583252b7e978f68b8d7f8736b0e025838e10 https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz libgmp-6.2.1.tar.xz c99be0950a1d05a0297d65641dd35b75b74466f7bf03c9e8a99895a3b2f9a0856cd17887738fa51cf7499781b65c049769271cbcb77d057d2e9f1ec52e07dd84 https://ftp.gnu.org/gnu/gperf/gperf-3.1.tar.gz 855ebce5ff36753238a44f14c95be7afdc3990b085960345ca2caf1a2db884f7db74d406ce9eec2f4a52abb8a063d4ed000a36b317c9a353ef4e25e2cca9a3f4 -https://ftp.gnu.org/gnu/grep/grep-3.7.tar.xz e9e45dcd40af8367f819f2b93c5e1b4e98a251a9aa251841fa67a875380fae52cfa27c68c6dbdd6a4dde1b1017ee0f6b9833ef6dd6e419d32d71b6df5e972b82 +https://ftp.gnu.org/gnu/grep/grep-3.10.tar.xz 865e8f3fd7afc68f1a52f5e1e1ee05fb9c6d6182201efb0dbdf6075347b0b1d2bf0784537a8f8dd4fb050d523f7a1d2fb5b9c3e3245087d0e6cc12d6e9d3961b https://ftp.gnu.org/gnu/groff/groff-1.22.4.tar.gz 1c42d3cd71efaf067b5850945d9097fa1f0fadd5e2b6ba7446bd9d4f439fe1ad058e4ddb0d4e0f503682137dfc7c822944ce1e3e5cf981673f8ba197ea77126d -https://ftp.gnu.org/gnu/help2man/help2man-1.49.2.tar.xz cb8f9f923263d7160a27a7924ae559aba93d7258167888eb9e0e3e97a2014297b8d739b2bb7869acbf586354d099bd91d85f8208b901bce5ba0c5ad4b6abd6d5 -https://ftp.gnu.org/gnu/inetutils/inetutils-2.1.tar.xz 76ff8c9f6870eca3b67f641f2ff65344a888b66d92714d2e3b68423ccab4951bc7c0fb6ad40e061ab8950a75b16db4aaa21222e27e63cf7a0c8da4274204dd81 -https://ftp.gnu.org/gnu/libtasn1/libtasn1-4.18.0.tar.gz 4f2f4afc7561fda7a1f1c6c525c3c3b08228a1a4aa8c3d3d5e02e993d8f83ccee1dd0f1b201cec0fbfc97043d4b1d7a95ffd34d65422a38b85b931ac7a015831 -https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz a6eef35f3cbccf2c9e2667f44a476ebc80ab888725eb768e91a3a6c33b8c931afc46eb23efaee76c8696d3e4eed74ab1c71157bcb924f38ee912c8a90a6521a4 -https://ftp.gnu.org/gnu/libunistring/libunistring-1.0.tar.xz 70d5ad82722844dbeacdfcb4d7593358e4a00a9222a98537add4b7f0bf4a2bb503dfb3cd627e52e2a5ca1d3da9e5daf38a6bd521197f92002e11e715fb1662d1 +https://ftp.gnu.org/gnu/help2man/help2man-1.49.3.tar.xz 5f19fad1e38b0572b63ed8bfd146b717fc22dff3a26641e8b5c8431df13da9574679d9a3407da62790db8a29286694ea1bfd751cba168f475302ad31cce845cf +https://ftp.gnu.org/gnu/inetutils/inetutils-2.4.tar.xz e7e6a5d7e2e02f07a2a6cfc09694e3c0a4e4a8ef8a435eed41902eba13caeed329ae6d6ba94b0de8f789e307f04656d12c48c1c0217b69d162bc5efb0ff6adee +https://ftp.gnu.org/gnu/libtasn1/libtasn1-4.18.0.tar.gz +https://ftp.gnu.org/gnu/libtool/libtool-2.4.7.tar.xz 47f4c6de40927254ff9ba452612c0702aea6f4edc7e797f0966c8c6bf0340d533598976cdba17f0bdc64545572e71cd319bbb587aa5f47cd2e7c1d96f873a3da +https://ftp.gnu.org/gnu/libunistring/libunistring-1.0.tar.xz https://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.xz 47f595845c89709727bda0b3fc78e3188ef78ec818965b395532e7041cabe9e49677ee4aca3d042930095a7f8df81de3da1026b23b6897be471f6cf13ddd512b -https://ftp.gnu.org/gnu/make/make-4.3.tar.gz 9a1185cc468368f4ec06478b1cfa343bf90b5cd7c92c0536567db0315b0ee909af53ecce3d44cfd93dd137dbca1ed13af5713e8663590c4fdd21ea635d78496b -https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz libmpc-1.2.1.tar.gz 3279f813ab37f47fdcc800e4ac5f306417d07f539593ca715876e43e04896e1d5bceccfb288ef2908a3f24b760747d0dbd0392a24b9b341bc3e12082e5c836ee -https://ftp.gnu.org/gnu/mpfr/mpfr-4.1.0.tar.xz libmpfr-4.1.0.tar.xz 1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273 -https://ftp.gnu.org/gnu/nettle/nettle-3.8.tar.gz af3a910bd661ed9691b1bd66b0f8147aaebdc92ae6ab47640675df263409ecb8d25f0403fcc7dc6471264b9df0a47c025244404f0691ef58c133762f64b67610 +https://ftp.gnu.org/gnu/make/make-4.4.tar.gz 4be73f494295dcfa10034531b0d920cfdb5438bc20625f863f5c878549c140e1e67195162580c53060c3c11c67a2c739c09051f02cdd283e5aa9ebcd68975a1f +https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz libmpc-1.3.1.tar.gz 4bab4ef6076f8c5dfdc99d810b51108ced61ea2942ba0c1c932d624360a5473df20d32b300fc76f2ba4aa2a97e1f275c9fd494a1ba9f07c4cb2ad7ceaeb1ae97 +https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.0.tar.xz libmpfr-4.2.0.tar.xz 58e843125884ca58837ae5159cd4092af09e8f21931a2efd19c15de057c9d1dc0753ae95c592e2ce59a727fbc491af776db8b00a055320413cdcf2033b90505c +https://ftp.gnu.org/gnu/ncurses/ncurses-6.4.tar.gz 1c2efff87a82a57e57b0c60023c87bae93f6718114c8f9dc010d4c21119a2f7576d0225dab5f0a227c2cfc6fb6bdbd62728e407f35fce5bf351bb50cf9e0fd34 +https://ftp.gnu.org/gnu/nettle/nettle-3.8.tar.gz https://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz fcca87bdb67a88685a8a25597f9e015f5e60197b9a269fa350ae35a7991ed8da553939b4bbc7f7d3cfd863c67142af403b04165633acbce4339056a905e87fbd -https://ftp.gnu.org/gnu/readline/readline-8.1.tar.gz 27790d0461da3093a7fee6e89a51dcab5dc61928ec42e9228ab36493b17220641d5e481ea3d8fee5ee0044c70bf960f55c7d3f1a704cf6b9c42e5c269b797e00 -https://ftp.gnu.org/gnu/sed/sed-4.8.tar.xz 7de25d9bc2981c63321c2223f3fbcab61d7b0df4fcf7d4394b72400b91993e1288d8bf53948ed5fffcf5a98c75265726a68ad4fb98e1d571bf768603a108c1c8 +https://ftp.gnu.org/gnu/readline/readline-8.2.tar.gz 0a451d459146bfdeecc9cdd94bda6a6416d3e93abd80885a40b334312f16eb890f8618a27ca26868cebbddf1224983e631b1cbc002c1a4d1cd0d65fba9fea49a +https://ftp.gnu.org/gnu/sed/sed-4.9.tar.xz 36157a4b4a2430cf421b7bd07f1675d680d9f1616be96cf6ad6ee74a9ec0fe695f8d0b1e1f0b008bbb33cc7fcde5e1c456359bbbc63f8aebdd4fedc3982cf6dc https://ftp.gnu.org/gnu/tar/tar-1.34.tar.xz 5e77c4a7b49983ad7d15238c2bce28be7a8aa437b4b1815fc00abd13096da308b6bba196cc6e3ed79d85e62823d520ae0d8fcda2d93873842cf84dc3369fc902 -https://ftp.gnu.org/gnu/texinfo/texinfo-6.8.tar.xz 0ff9290b14e4d83e32b889cfa24e6d065f98b2a764daf6b92c6c895fddbb35258398da6257c113220d5a4d886f7b54b09c4b117ca5eacfee6797f9bffde0f909 -https://ftpmirror.gnu.org/autoconf-archive/autoconf-archive-2022.02.11.tar.xz 243e06a356ea2c0fddc527febd4241da49fe4c11fb64b548873744a54e079860739d7a1da842833b99540acde3f6a2ebfddc41897306cc2e61e2c6037a7d22ff -https://gcc.gnu.org/pub/gcc/snapshots/11-20220101/gcc-11-20220101.tar.xz 33ae3f00c48e19659b9fc26e2dd2ccf98d52babd97c4fc2bf02171507572e1324892699b80e9c5036daec1453b04fc431366317c0456a3a2f59465a2374182a4 -https://git.sr.ht/~strahinja/mkpk/archive/v0.1.6.tar.gz mkpk-0.1.6.tar.gz e7cb71c3a52745305d8df1b1cfb0332f456b07c39be0dc3e0b6ea4bb3b740a6d7e83abc1c1e7c51c22a09ae5e5df536e724f67b44badb985e0ef6620853caf87 -https://git.sr.ht/~strahinja/sled/archive/v0.10.8.tar.gz sled-0.10.8.tar.gz 9a1992bdf75f6a9a8b564563af3d7e5e61e93deae480e3aa643ae249a8fa8572d16bad6959cf6a7d339022c41fb4347d1e146aecc246257ebf6108439c1b0654 -https://git.sr.ht/~strahinja/table/archive/v0.6.4.tar.gz table-0.6.4.tar.gz a86c8bca4cc2250aa8fcdb49508e802fb3b78d950a4f95c8d2d214ad1dd72ffdda78ed20165317041c1afdf0f039b1a8b594bed5ab0d43c61cb21140e7adc37a +https://ftp.gnu.org/gnu/texinfo/texinfo-7.0.3.tar.xz 7d14f7458f2b7d0ee0b740e00a5fc2a9d61d33811aa5905d649875ec518dcb4f01be46fb0c46748f7dfe36950597a852f1473ab0648d5add225bc8f35528a8ff +https://ftp.gnu.org/gnu/which/which-2.21.tar.gz d2f04a5c5291f2d7d1226982da7cf999d36cfe24d3f7bda145508efcfb359511251d3c68b860c0ddcedd66b15a0587b648a35ab6d1f173707565305c506dfc61 +https://ftp.gnu.org/pub/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.xz e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173 +https://ftpmirror.gnu.org/autoconf-archive/autoconf-archive-2023.02.20.tar.xz a744f5aa0c1a813b81ad1528aebf7511bde7f470f34626d2057ed6664127120182e031fec5d22027d4a204544266135f202b8ef453bff70a3b0315c506c82528 +https://git.sr.ht/~strahinja/mkpk/archive/v0.1.6.tar.gz mkpk-0.1.6.tar.gz +https://git.sr.ht/~strahinja/sled/archive/v0.11.5.tar.gz sled-0.11.5.tar.gz c329eb5086ea5ab76f109a1b15d8ec3c94c37bc09e306490502fd0b8592c59feeb6afd041d6ad14aaedf1c32902fe254951d9af83319c35d50f302fccfe1e138 +https://git.sr.ht/~strahinja/table/archive/v0.6.10.tar.gz table-0.6.10.tar.gz e608f3eb00ec45044f3a90fc57dfb720abfef0c8bd8892ea6c76d29430d7b791de5810d55c5748b9c79f37455c23caab80fadef333e0ebafbd0c2dc5e0bfcdac https://github.com/ArtifexSoftware/urw-base35-fonts/archive/refs/tags/20200910.tar.gz urw-base35-20200910.tar.gz 71fb27baadf5abc4ff624cdede02038681acd5fffdc728a5b2e7808713b80cb2f2174f90a1862e69d390c4434c49d5167ab095100032fa3ba80b586eb8ae51d1 -https://github.com/Cyan4973/xxHash/archive/refs/tags/v0.8.1.tar.gz xxhash-0.8.1.tar.gz 12feedd6a1859ef55e27218dbd6dcceccbb5a4da34cd80240d2f7d44cd246c7afdeb59830c2d5b90189bb5159293532208bf5bb622250102e12d6e1bad14a193 -https://github.com/Duncaen/OpenDoas/releases/download/v6.8.2/opendoas-6.8.2.tar.xz 5f349763dcc56b60f3707af3b3b7557e4721427a093dff725235c54b741670e0606272063527d00442eb7510dfd96482f7c6f38f15ece148bea41c9aa514865c -https://github.com/Mic92/iana-etc/releases/download/20210611/iana-etc-20210611.tar.gz 3db4d509699930bb48950b54d916d0aafbd6eb6ecbd98d6ffdf77f79fb9dd644754b2d479b675f1f0afb094e49e70fa583bbdb4432d976fa980b8696ca2387a7 -https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.39/pcre2-10.39.tar.bz2 b3d898198f4b5ffc3453d2ba56fe2a7298c01c52e5f67d45f1e046fc0dee62e16a4024fcb65839ac9c367beedb531647affd6f8599fbeb102f19423c150d80d4 -https://github.com/WayneD/rsync/archive/refs/tags/v3.2.5pre2.tar.gz rsync-3.2.5pre2.tar.gz cc7884cced95ce6fafd8d322b8bdb42c250c869d94186f7c471ce09cc3906f596903aed65c070e3de1c6a5e28966c4cea4d75797f444424484ebb9e574a0d42c +https://github.com/Cyan4973/xxHash/archive/refs/tags/v0.8.1.tar.gz xxhash-0.8.1.tar.gz +https://github.com/Duncaen/OpenDoas/releases/download/v6.8.2/opendoas-6.8.2.tar.xz +https://github.com/Mic92/iana-etc/releases/download/20230405/iana-etc-20230405.tar.gz 94af3c0ec50ca82e5a566f021fd547be46485a2ee6d61c511b79c3fe8fe0c26f9d3c08dada45281c3d8918ebc27b464acf93db9bbaa993709eb1d94e4f0c997a +https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.bz2 72fbde87fecec3aa4b47225dd919ea1d55e97f2cbcf02aba26e5a0d3b1ffb58c25a80a9ef069eb99f9cf4e41ba9604ad06a7ec159870e1e875d86820e12256d3 +https://github.com/WayneD/rsync/archive/refs/tags/v3.2.5pre2.tar.gz rsync-3.2.5pre2.tar.gz https://github.com/arsv/perl-cross/releases/download/1.4/perl-cross-1.4.tar.gz bde73cac13c0b42c4c6783d7e30dea491d70b65131e1c8434ef75db1f39a8e15ef5857568b706e8456faa3822402676dd247a1f20f4bed983597fdd5a6b4faad https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz 3cc0808edb4432428df8a67da4bb314fd1f27adc4a05754c1a492091741a7b6875ebd9f6a509cc4c5ad85643fc40395b6e0cadee548b25cc439cc9b725980156 https://github.com/ericonr/argp-standalone/archive/refs/tags/1.4.1.tar.gz argp-standalone-1.4.1.tar.gz c5f07e88434589a13a2e88e66d1142b581f19aa82da28507f3c31ea782e080a13a4504d8108c003b5d3c8a3aa20f52ea5e81f337c11a4b1342b16361d4877c1c -https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz b322fc1b89a556827b7fece2fb0f34c83bf65bb85b2468c791d6d9178a65c81e21f4171b7533cbf12bc1dfb2fd323d3e8c34d86167b157645c27f65186eec659 -https://github.com/gavinhoward/bc/releases/download/5.0.0/bc-5.0.0.tar.xz 3ac4639922398e633aae3c3679ee3e53f3688da3992c55c120165b5718860f9857b7f46c43a9e18da0dd67ac92c8855f7449dfdfdfd11c419dc4ab6683550740 +https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz 99109ec0e07fa65c2101c9cb36be56b672bbd0ee69d265f924718e61f9192ae8385c8d9e4d0c318be9edfa6d849fd3d60e5f164fa120961449429ea3c5dab6b6 +https://github.com/gavinhoward/bc/releases/download/6.5.0/bc-6.5.0.tar.xz 1cb03038d828a0b10734c29931777add8b22f194c507b8ff538ec1aa52a2a97a4ac2733d72cdb0710fdc6937807074e929f7918c56aaf5be8fbe908ea7c5a401 https://github.com/hvisage/metalog/archive/refs/tags/metalog-20220214.tar.gz 44a1443e8f9e92460f128aa35125d50ae247ba4f2ce8fd8cc32b96a491e29963cdc27be12a6db28f286e2d5a2bc6243e126a77ae3eb642e7c969d58446a18fcd -https://github.com/libarchive/libarchive/releases/download/v3.6.1/libarchive-3.6.1.tar.xz 2e5a72edc468080c0e8f29e07d9c33826ffb246fa040ec42399bedeecf698b7555f69ffd15057ad79c0f50cd4926d43174599d99632b1b99ec6cd159c43a70b8 +https://github.com/libarchive/libarchive/releases/download/v3.6.2/libarchive-3.6.2.tar.xz a12bb6839e13a0be1099f42c650fc90fbfe62d32ce38bcbb4794206d29b2c782ae1115124d0e5f6b9716514213af32b05e4a42eb196447674a5f9a2a32bee043 https://github.com/libcheck/check/releases/download/0.15.2/check-0.15.2.tar.gz 77fb34348bc1b1517801865afee5064121a245c10685e6bb6b8f743552646a0643cfdf9fd3dfbf9b2297d9430dfdd49616cf7daf41298d2dbd699f10d654a025 https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz libevent-2.1.12.tar.gz 88d8944cd75cbe78bc4e56a6741ca67c017a3686d5349100f1c74f8a68ac0b6410ce64dff160be4a4ba0696ee29540dfed59aaf3c9a02f0c164b00307fcfe84f -https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.tar.gz 31bad35251bf5c0adb998c88ff065085ca6105cf22071b9bd4b5d5d69db4fadf16cadeec9baca944c4bb97b619b035bb8279de8794b922531fddeb0779eb7fb1 -https://github.com/mesonbuild/meson/releases/download/0.61.3/meson-0.61.3.tar.gz 955c56cbaeb23a33a5e536eee547312ca5f1122aaa03d839113a2b2bcd9a0486ab24d1783220d9981c29ed9b4bda06a971cb0e21aa9f32d57f6696fa27853da8 +https://github.com/libffi/libffi/releases/download/v3.4.4/libffi-3.4.4.tar.gz 88680aeb0fa0dc0319e5cd2ba45b4b5a340bc9b4bcf20b1e0613b39cd898f177a3863aa94034d8e23a7f6f44d858a53dcd36d1bb8dee13b751ef814224061889 +https://github.com/mesonbuild/meson/releases/download/1.1.0/meson-1.1.0.tar.gz b8968becd1de25d8e92ecbe4c3b50694269a463430b41fcf5206f35ac952507b01f316721fb36f8c7940437e35c3588f6a4504f5b8256fa47fd9b0ceb588ae39 https://github.com/michaelforney/samurai/releases/download/1.2/samurai-1.2.tar.gz bbe6a582c34b04f1df53b76c1647aa3e03c4698ebf7591a203935f11ffa05971bbcb86dc1a8c06aeb904cdc741abb08918122810fc47216fed0a6d9f87fd1225 -https://github.com/p11-glue/p11-kit/releases/download/0.24.1/p11-kit-0.24.1.tar.xz 8cf170c714bb9e0cf3df93e8ec55b8e3c55cabf2c6a27f177ac6de8b8028985df2ca0216d3215d6828dc2ae3095c4e1a4febe8cb26b88ec321defc66bb011e81 +https://github.com/p11-glue/p11-kit/releases/download/0.24.1/p11-kit-0.24.1.tar.xz https://github.com/pullmoll/musl-fts/archive/v1.2.7.tar.gz musl-fts-1.2.7.tar.gz 949f73b9406b06bd8712c721b4ec89afcb37d4eaef5666cccf3712242d3a57fc0acf3ca994934e0f57c1e92f40521a9370132a21eb6d1957415a83c76bf20feb https://github.com/pullmoll/musl-obstack/archive/v1.1.tar.gz musl-obstack-1.1.tar.gz e3a9956133d72a00663cf8d9720e62002142e113e7d67e2338a2bce1bdfac9eefd4290db8add15eabafdf01065f7fe9bb6754faa36b88df819c53d44fa140757 https://github.com/rhboot/efibootmgr/archive/17.tar.gz efibootmgr-17.tar.gz 10c7ad9a79f23dcd4708dc4f42701196af7aa11f5e9a6468ea51f7013d4caeba6c92527ba1304f6e3b2ef3b51b3b69ea1a30f81bb099a8aea49eeb30eb631e1d https://github.com/rhboot/efivar/releases/download/37/efivar-37.tar.bz2 305a82ed103c7e3d8f723934019d552677c73558768dd5341f87d0364f5c60824d24f5a8e1bf90075e825908085083d4ecdccec5ac757fd38ee6ac8fea28c3e4 -https://github.com/rhboot/shim/releases/download/15.6/shim-15.6.tar.bz2 ddc5d5234851d05ed7124ad748ad3fee2df8a335493948a045653322c873f3f055d34894aeb2ac7495086984ca62183907d341e46e6bdf108856e39c646455fc -https://github.com/rkd77/elinks/releases/download/v0.15.0/elinks-0.15.0.tar.xz 550f7a1a94334c6c28c8874cb9fbc2ed76d9e4a86c521845e7355f6505f2b7f842a4e250a02b4bb238ea1fa8322e2c12214c53d8df3a211c56869e86bfcc7f2b -https://github.com/rpm-software-management/popt/archive/refs/tags/popt-1.18-release.tar.gz popt-1.18.tar.gz 689c125331944f71813c922120223eb8a9fce4d93eaa558bd2bd7edb81fc53f193414ce06d3a3c22dbb3de981e91f237b591de5806b08364d8c9f21fce73200d -https://github.com/shadow-maint/shadow/releases/download/v4.11.1/shadow-4.11.1.tar.xz 12fbe4d6ac929ad3c21525ed0f1026b5b678ccec9762f2ec7e611d9c180934def506325f2835fb750dd30af035b592f827ff151cd6e4c805aaaf8e01425c279f -https://github.com/strace/strace/releases/download/v5.18/strace-5.18.tar.xz 99418b84a5e2049cb6fe32eed19ddcb61bbefb25220550c67d92cd7bc3d44ae5d87ac228b3e1c207166b9bfdae55c624a0f4e603004599fb7ea3143bbccc749e -https://github.com/tmux/tmux/releases/download/3.3a/tmux-3.3a.tar.gz 29a846df7d93601c42a22f84f606931dc65da1f70b67d351d0425f77ea3affe3e8218b2940d42cd3dadf3cd1aa95032daad3ecb14fbff0f69939d1beae0498c7 -https://github.com/util-linux/util-linux/archive/refs/tags/v2.38.tar.gz util-linux-2.38.tar.gz 1452422f428d00360d14a4703552ca1ff591d0fb251899b34cf88692eee7a7a3228ded371d32f6d255a69cc237abecf229375fb50bdb6c5fbcfa736276b5d3b2 +https://github.com/rhboot/shim/releases/download/15.6/shim-15.6.tar.bz2 +https://github.com/rkd77/elinks/releases/download/v0.16.0/elinks-0.16.0.tar.xz b1d6040b691610d596e0d1eae26bfe52d702272c71a2e5100ab7d6b05b24a0b88524d4fc7be3f6371e0bada1e6f0992da7505a72419ca642dec778424629a522 +https://github.com/rpm-software-management/popt/archive/refs/tags/popt-1.19-release.tar.gz popt-1.19.tar.gz 021c6d7c4ef837de8cad48641700e5fba3baf8c7d381fd3717ee49b5da5ed4277e985db265ad4c2708e192d50de84eb0a54e11bc15951d0d45d5cd3fd02d32d4 +https://github.com/shadow-maint/shadow/releases/download/4.13/shadow-4.13.tar.xz 2949a728c3312bef13d23138d6b79caf402781b1cb179e33b5be546c1790971ec20778d0e9cd3dbe09691d928ffcbe88e60da42fab58c69a90d5ebe5e3e2ab8e +https://github.com/strace/strace/releases/download/v6.2/strace-6.2.tar.xz 56708faa3f73c0673c98a5b8b8fe35289ecf2870f4f775bcb7a6be59451ef84685564c0129aca15b576d851f8efa1ff760e27658b914d1f31adf4de3b1ad721f +https://github.com/tmux/tmux/releases/download/3.3a/tmux-3.3a.tar.gz +https://github.com/util-linux/util-linux/archive/refs/tags/v2.38.1.tar.gz util-linux-2.38.1.tar.gz 0639d452344508c9edaecd41a01698f20620ec8617e201b7c85cdced96bb6e7cc15b27fba50e9fdc159001671e7ce5dc2c2ac89397e42ab7c63f38f4a6283587 https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz e9785f3d620a204b7d20222888917dc065c2036cae28667065bf7862dfa1b25235095a12fd04efdbd09bfd17d3452e6b9ef953a8c1137862ff671c97132a082e -https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.6.tar.gz zlib-ng-2.0.6.tar.gz 4888f17160d0a87a9b349704047ae0d0dc57237a10e11adae09ace957afa9743cce5191db67cb082991421fc961ce68011199621034d2369c0e7724fad58b4c5 +https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.tar.gz zlib-ng-2.0.7.tar.gz 1c19a62bb00727ac49049c299fb70060da95b5fafa448144ae4133372ec8c3da15cef6c1303485290f269b23c580696554ca0383dba3e1f9609f65c332981988 https://gitlab.com/proot/proot/-/archive/v5.3.1/proot-v5.3.1.tar.bz2 proot-5.3.1.tar.bz2 68dd32767801690a496305e73e8dc10abfa3ae81bc8935b73614f5c6a0b0048aa765540a8c0347e9b9e7ec54802285b964efcc3e87914c8db5920871c735109f -https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.3.7.tar.bz2 c7fe169050ef17051cdaac9ad476e7ea792483baad1208fc359d568fa9e138d920ecaa2cd9cae73b20f5472a7d8ca6540a62062ff7a06055cc656b0eb4b917b9 -https://gnupg.org/ftp/gcrypt/gpgme/gpgme-1.17.1.tar.bz2 e6399c3de1e430e38f2692bf5ec0c02ecb36ea3dbb56ff29dc3a438a5be4900a77a0559dc5b673dc1ffbff5e7f589e548e19176b2644fe8f63e00c6b9181b920 -https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.5.tar.bz2 70117f77aa43bbbe0ed28da5ef23834c026780a74076a92ec775e30f851badb423e9a2cb9e8d142c94e4f6f8a794988c1b788fd4bd2271e562071adf0ab16403 -https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.10.1.tar.bz2 e5ca7966624fff16c3013795836a2c4377f0193dbb4ac5ad2b79654b1fa8992e17d83816569a402212dc8367a7980d4141f5d6ac282bae6b9f02186365b61f13 -https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.45.tar.bz2 882f2dd617e89137d7a9d61b60488dac32321dd4fdb699e9687b6bd9380c056c027da502837f4482289c0fe00e7de01210e804428f05a0843ae2ca23fdcc6457 -https://gnupg.org/ftp/gcrypt/libksba/libksba-1.6.0.tar.bz2 a7c76d41dfd8ec6383ac2de3c53848cd9f066b538f6f3cd43175e3c8095df51b96d0a24a573481c0c4856b09b7c224e2b562d88f5c0801e7acfb582ea2739c2b -https://gnupg.org/ftp/gcrypt/npth/npth-1.6.tar.bz2 2ed1012e14a9d10665420b9a23628be7e206fd9348111ec751349b93557ee69f1176bcf7e6b195b35b1c44a5e0e81ee33b713f03d79a33d1ecd9037035afeda2 -https://gnupg.org/ftp/gcrypt/pinentry/pinentry-1.2.0.tar.bz2 19cea79aa3982d1f0d75220c8e24ca38d6c49475c6f4c5aa7101151b4690db23ed316096a4a411136e716ba4eb471f48f9b09556e5c9837533c2356b9b384b63 -https://invisible-island.net/archives/byacc/byacc-20220128.tgz e8ae4c56f5be4cc0ef1d281c43f02c6296fdc40f630269f2a61af511f270ae059ad185b9718190b8133018f7b74b7ca6f84ced5d63a359960b52ea2a3ef562ea -https://invisible-island.net/archives/reflex/reflex-20210808.tgz fa5ea64c75cd93a59fd7950548f6e587fdec60d4a5221048c117ca2e08872e95ed842c3ea0b0c4b420ef4d77a5a664e4d5d658440011c5ea35f649eb64445a6b +https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.3.7.tar.bz2 +https://gnupg.org/ftp/gcrypt/gpgme/gpgme-1.17.1.tar.bz2 +https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.5.tar.bz2 +https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.10.1.tar.bz2 +https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.45.tar.bz2 +https://gnupg.org/ftp/gcrypt/libksba/libksba-1.6.0.tar.bz2 +https://gnupg.org/ftp/gcrypt/npth/npth-1.6.tar.bz2 +https://gnupg.org/ftp/gcrypt/pinentry/pinentry-1.2.0.tar.bz2 +https://invisible-island.net/archives/byacc/byacc-20220128.tgz +https://invisible-island.net/archives/reflex/reflex-20230206.tgz dbbe6150145162de6cf1ec4dadcf156ba320819fc0d034a2e38443fbe2834cf342fcb47f2dbe4578f2825ba7aefe87bf7c9b6667f1733a7003b4c7fe139e8ccb https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz 4c93cb26592ed0b1622d3b7800b5d6622ffa36f58ac73f2ef0bddfab522565fdfb8fa73d81914b9a202f1d62bc995a08960f8adb9f62c86918e75498e85fbfdf -https://libisl.sourceforge.io/isl-0.24.tar.xz libisl-0.24.tar.xz ff6bdcff839e1cd473f2a0c1e4dd4a3612ec6fee4544ccbc62b530a7248db2cf93b4b99bf493a86ddf2aba00e768927265d5d411f92061ea85fd7929073428e8 +https://libisl.sourceforge.io/isl-0.26.tar.xz libisl-0.26.tar.xz 9b5ec16d14e48f9ac9bf9cd379d3022959cfc617ade9e0d4caf2862299564fecba09d67dbdf1a4071f2f743a4fd0fabd0b0c3d15f5cddfe7226cdd5d6c2a0c66 https://mandoc.bsd.lv/snapshots/mandoc-1.14.6.tar.gz 54286070812a47b629f68757046d3c9a1bdd2b5d1c3b84a5c8e4cb92f1331afa745443f7238175835d8cfbe5b8dd442e00c75c3a5b5b8f8efd8d2ec8f636dad4 -https://matt.ucc.asn.au/dropbear/releases/dropbear-2022.82.tar.bz2 94c664e0d56bce3750b04aff166bf073f778dc2aa08e093541b520db1f165d4173e1cf25eef69a59b0a5a0a63cfb3ce8bbf94d6c4010687a0233ba1ad8ea403b -https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/man-pages-5.13.tar.xz a68c0bd5f078aff2f13f962060863e5d30734c1c562e8e9e3d5eda5a329b18ad3e9b4ebb883d31cacfc0a476f91fccb8dd4257598acd75d09dd21351893d3499 -https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.37.1.tar.xz 3c9cad6b4757f425ee53996d8d80db2226b246513cbcec9011022e02e4235d7ec38c7c1aada73bb3c9279a91d1aaf8664633356ce1dce847e0d371f702a5b766 +https://matt.ucc.asn.au/dropbear/releases/dropbear-2022.83.tar.bz2 c63afa615d64b0c8c5e739c758eb8ae277ecc36a4223b766bf562702de69910904cbc3ea98d22989df478ae419e1f81057fe1ee09616c80cb859f58f44175422 +https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/man-pages-6.04.tar.xz 3f95d15dda419e824f902947a268d8021e9e04c5ba8503e4fe9f96a9ab8363fde8088b2712cc9c795638163ad8432bc5f8c6a3ea320293ec6aa79bb748e85b9e +https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.40.0.tar.xz a2720f8f9a0258c0bb5e23badcfd68a147682e45a5d039a42c47128296c508109d5039029db89311a35db97a9008585e84ed11b400846502c9be913d67f0fd90 https://musl.libc.org/releases/musl-1.2.3.tar.gz 9332f713d3eb7de4369bc0327d99252275ee52abf523ee34b894b24a387f67579787f7c72a46cf652e090cffdb0bc3719a4e7b84dca66890b6a37f12e8ad089c https://netix.dl.sourceforge.net/project/ttf2pt1/ttf2pt1/3.4.4/ttf2pt1-3.4.4.tgz ff2b41b0d54c2feb8565c4bcf9fbc2ce799aa6228815c2787e26127f6c0ca380114b3ab7a12fa50a52279a3452bcb91dbad5c661e83078f25036f69a4d1cf014 -https://prdownloads.sourceforge.net/expat/expat-2.4.8.tar.xz d19b0d6469537aed20c54bd9cfa4089d39e4acaaddde57809de7c6aec55dc870677c02480e7f65dac5620bd5454b889370453613518f9da647c74a831a2a1b7b +https://prdownloads.sourceforge.net/expat/expat-2.5.0.tar.xz 2da73b991b7c0c54440485c787e5edeb3567230204e31b3cac1c3a6713ec6f9f1554d3afffc0f8336168dfd5df02db4a69bcf21b4d959723d14162d13ab87516 https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.bz2 91bff52eed4a2dfc3f3bfdc9c672b88e7e2ffcf3c4b121540af8a4ae8c1ce05178430aa6b8000658b9bb7b4252239357250890e20ceb84b79cdfcde05154061a -https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-3.3.17.tar.xz 59e9a5013430fd9da508c4655d58375dc32e025bb502bb28fb9a92a48e4f2838b3355e92b4648f7384b2050064d17079bf4595d889822ebb5030006bc154a1a7 -https://sourceforge.net/projects/psmisc/files/psmisc/psmisc-23.4.tar.xz b05781fdb283a6f132bd385d64437f8080e6bc0e11cd2e3e02227678682bb67b3c89edec34a6d067d77312811d072dc60b47ebb32b168c4c69bbc36df643a471 -https://sourceforge.net/projects/tcl/files/Tcl/8.6.12/tcl8.6.12-src.tar.gz 15def824484309fff6831b436e33d91ab1c6b095178f427d1f58b9a04e5e676b18dfdf1d225c6ab9ec15dc233358c40789edc7daf91c5908a1837e9f337feb60 -https://sourceware.org/ftp/elfutils/0.186/elfutils-0.186.tar.bz2 libelf-0.186.tar.bz2 c9180b27ec62935f18b9431268d176f6023d1bb938731d2af6e7626ae460af6608a70ba68483aa1ec7e6cb0fa0528b661ca8b68bc4f58ea8e18af527c5950c78 +https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-4.0.3.tar.xz be9dc5ac4a50fc1b8256af44ac2c5b50f74ef5e48c5c3dcac2779d508988daf3b60989d22db8fc8b699c2f2f338ad367e91b9c01ab46ac9fa0d5c5bbec6f16af +https://sourceforge.net/projects/psmisc/files/psmisc/psmisc-23.6.tar.xz 4daffbd1726e50d9344f8578dd4c10f0b8f7971929ec667490de31122e5f3828747e1bafb3ed3c37ed7e1758ab9ec43b8f4556b676a416a8efbc7c6c88b6985d +https://sourceforge.net/projects/tcl/files/Tcl/8.6.13/tcl8.6.13-src.tar.gz b597f6b62fd71457e96445401a4f8aa662c2678de8a52127c60b0abddebf1fd4452ba5364420902a15b263c0118fc91167550fd1ad2d24fa4ab2204e372c027e +https://sourceware.org/ftp/elfutils/0.189/elfutils-0.189.tar.bz2 libelf-0.189.tar.bz2 93a877e34db93e5498581d0ab2d702b08c0d87e4cafd9cec9d6636dfa85a168095c305c11583a5b0fb79374dd93bc8d0e9ce6016e6c172764bcea12861605b71 https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz 083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3 -https://tukaani.org/xz/xz-5.2.5.tar.xz 59266068a51cb616eb31b67cd8f07ffeb2288d1391c61665ae2ec6814465afac80fec69248f6a2f2db45b44475af001296a99af6a32287226a9c41419173ccbb -https://www.cairographics.org/releases/pixman-0.40.0.tar.gz 063776e132f5d59a6d3f94497da41d6fc1c7dca0d269149c78247f0e0d7f520a25208d908cf5e421d1564889a91da44267b12d61c0bd7934cd54261729a7de5f +https://tukaani.org/xz/xz-5.4.2.tar.xz 39163ee327743111968c4231fccc4ebbc1c77c96acf19afa8b1ca4153826a2c0d83b43111fa22b56139c03fc19c621d365fa0f80be1f3c3784fe7dd6f8fcfb68 +https://www.cairographics.org/releases/pixman-0.40.0.tar.gz https://www.cpan.org/src/5.0/perl-5.32.1.tar.xz 3443c75aea91f0fe3712fee576239f1946d2301b8f7390b690e2f5d070fe71af8f9fa7769e42086c2d33d5f84370f80368fa9350b4f10cc0ac3e6c1f6209d8f9 -https://www.freedesktop.org/software/uchardet/releases/uchardet-0.0.7.tar.xz ddb7b63dd09c1d9acbe620d86217e583d9aa5340780ab4010ec9faa4fd331498859d5efa7829bf8847da89325accf8f7304b51d410210178fc1ffa6658064a6f -https://www.gnupg.org/ftp/gcrypt/gnutls/v3.7/gnutls-3.7.2.tar.xz 5d01d561a05379da71e4847e30ba13c2abe09f7a5c4359fd539d8bd19abad0ce87120f82ee7b6264e787bd3edbc5ae16beffa892983cbc3d59f11a1811c10329 -https://www.greenwoodsoftware.com/less/less-590.tar.gz 426fa5840fd43c17bd5a452ad35ad24f2d6684623c6914403fd0059af62266bf2138e6828c7d73a1cef26a736c0d2b8ed4ab180eea8297281dae79a4228eb903 -https://www.iana.org/time-zones/repository/releases/tzcode2022a.tar.gz 3f047a6f414ae3df4a3d6bb9b39a1790833d191ae48e6320ab9438cd326dc455475186a02c44e4cde96b48101ab000880919b1e0e8092aed7254443ed2c831ed -https://www.iana.org/time-zones/repository/releases/tzdata2022a.tar.gz 542e4559beac8fd8c4af7d08d816fd12cfe7ffcb6f20bba4ff1c20eba717749ef96e5cf599b2fe03b5b8469c0467f8cb1c893008160da281055a123dd9e810d9 -https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.17.13.tar.xz ea54a3cbf874bc9fa0974327082ceb4c54f9f044d90a2c4c75f57691328815d19c082a776da4ea40f66e3f18e83c2f7f3d6e479dca1b4eb195b88f59e0426858 -https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.62.tar.xz 61ac004920c5cd3382a5443db2eacfc2041b7a8c0814b27084c1d111125639fe3950dea4325d0f7fb6bfb0d5de114452c3a62230cc958edb05ffdb83b213f9b3 -https://www.kernel.org/pub/linux/utils/kbd/kbd-2.4.0.tar.xz c3823e40878ed4cb5b90edf753dba37a7fc3189b7b08a2e59a7830cac23a7a7daf31dedef1fcc130698c7508bc2a037c8ab54e749d0cdbf51756e346f2ed5abb -https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-29.tar.xz 557cdcaec75e5a1ceea2d10862c944e9a65ef54f6ee9da6dc98ce4582418fdc9958aab2e14a84807db61daf36ec4fcdc23a36376c39d5dc31d1823ca7cd47998 -https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-5.17.0.tar.xz fcffe96fb4819305ddf5c3764b100bd1d204069cf53a6bd776c2716144f574b4fc17963fc231a83ad253cce6a563814556eeb60b211ba9b0b87330186259b34d +https://www.cpan.org/src/5.0/perl-5.36.0.tar.xz 6dd6ac2a77566c173c5ab9c238cf555f2c3e592e89abb5600bc23ce1cbd0c349e0233f6417cbbf1f6d0aefc6a734ba491285af0d3dc68a605b658b65c89f1dab +https://www.freedesktop.org/software/uchardet/releases/uchardet-0.0.8.tar.xz 4a5dcc9ff021352f3b252e103ff1475cec62c974294b264ee9243f024633c3ae44be8c7733608624066113e635f8b156ecb08c8ff87c736d04b07641eb166382 +https://www.gnupg.org/ftp/gcrypt/gnutls/v3.7/gnutls-3.7.2.tar.xz +https://www.greenwoodsoftware.com/less/less-608.tar.gz 7945b7f88921832ebb1b45fba8cbb449ee0133342796b654a52c146dfff3d84db18724ee84e53349eeea6017a0ebe2d8eb5366210275981dde7bb7190118fa66 +https://www.iana.org/time-zones/repository/releases/tzcode2023c.tar.gz fa18bae9c0e7c061bc9d5f5f2eb9967f0e4ddb2baafdee9887fa30cd0c60f4aa6f21eacffb17df0d59d26ff54d08c5dcefa98159309eba497e86443624913a82 +https://www.iana.org/time-zones/repository/releases/tzdata2023c.tar.gz 608bd286ebcbd0004cfdc1da183273f08aff61f90c8867661154453d77a05d421e4c46ad6d066a1fe2e87d5c82ec0f1c0224667a3b35f3180a3eb7f6ff84cbf5 +https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.2.10.tar.xz 56e55c4339f381fa4b99f50c647fb0c2339b366126f56ec91aa6a41b64b0d2f4cac2f18a0fd7a9b984616c1009e285ed9e128129d45d134c7c01918f11a846b7 +https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.68.tar.xz ede3e1356aef22e18a46dc8ff0727500ab023bea698cf2bb822abb06625e272940afea52ad6457d0cd8cf1c7f435f1b568baf0a6bf0a08ae96fbf6d7502f9de2 +https://www.kernel.org/pub/linux/utils/kbd/kbd-2.5.1.tar.xz 74855f486aff5fc2f93a6cb29460a590c94eac653b001574e1b4eb1300ea99dfed9222f9e5d1d3a05a112a6880591d5c44ed6e76b8a64edf744ecb0892f562d0 +https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-30.tar.xz e2cd34e600a72e44710760dfda9364b790b8352a99eafbd43e683e4a06f37e6b5c0b5d14e7c28070e30fc5fc6ceddedf7b97f3b6c2c5c2d91204fefd630b9a3e +https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-5.19.0.tar.xz eb0fffb153f7cecc89b5573b7fc211d67fb1c06789fd3b0aec75ba5032521d53c51ccc52db7367e41397993df50244af84763b0b1d5a76d9dfccf013c010131b https://www.leonerd.org.uk/code/libtermkey/libtermkey-0.22.tar.gz 2e8242cd1e6acb8900125dcee9fd47f7554c359363f760b88858c82667e1f3871bdd87358b14c8a133ef3cd2699947a5045477e64cdf7f96d4ead1723e73a219 https://www.nico.schottelius.org/software/gpm/archives/gpm-1.20.7.tar.bz2 51c1141ed502f8b6bc846485a8e315bafe3cf2b7c9d1ea8a710d9748ff2058f29c7ab5715fc1730a8437c613181d2050f37b134e9288c69ba8ff7fb0be7ec0d1 -https://www.openssl.org/source/openssl-3.0.5.tar.gz 782b0df3d0252468aa696bd74a3b661810499819c0df849aa9698ba0e06a845820dc856aac650fced4be234f1271e576d4317ac3ab1406cf0ffe087d695d20fe -https://www.python.org/ftp/python/3.10.7/Python-3.10.7.tar.xz dc3432d72ee7382617318c9645204876d13bb61d4caf3fbbb65e6b14897261123c743049657c95e159e5566daf4dcde613d2e393f025de758f610b44eb958313 -https://www.samba.org/ftp/talloc/talloc-2.3.4.tar.gz c46488deda99753fd79566d42cae88899b71196513a127813be2cb855e7f36b77132f0552297ee4153ba4d8f177cea3bb0dc93340caabf321c026657744684d9 +https://www.openssl.org/source/openssl-3.1.0.tar.gz 71cc75c7700f445c616e382b76263ad2e4072beec0232458baf3d9891b8b64a7ad0cac4b4d24b727b2b7dcd100c78606fd48eba98a67eccd5f336e3d626ca713 +https://www.python.org/ftp/python/3.11.3/Python-3.11.3.tar.xz a3bba4b69322a47bfeefe42ba0fd7331b5b67fd2ab41441e2219d16ef8c6f307f1a48977afd073c18cfd24ec6cb1bfe0c4bb4b273031eb524dc7e9fb5fbcc3b6 +https://www.samba.org/ftp/talloc/talloc-2.4.0.tar.gz 810d92a614d0b9e0ac6fe403c1643c4dda435f79c4627d3c3be228f94b4b2ee8e528efbbed07f7d1a16043d6e55bdf4f10826f31fb8ca1c649c4126ea09a3aff https://www.zlib.net/pigz/pigz-2.7.tar.gz 9f9f61de4a0307fc057dc4e31a98bd8d706d9e709ecde0be02a871534fddf6a1fe1321158aa72708603aaaece43f83d2423b127f7689b6219b23aea4f989e8f5 -https://ftp.gnu.org/gnu/which/which-2.21.tar.gz d2f04a5c5291f2d7d1226982da7cf999d36cfe24d3f7bda145508efcfb359511251d3c68b860c0ddcedd66b15a0587b648a35ab6d1f173707565305c506dfc61 diff --git a/lib/setperms b/lib/setperms @@ -45,14 +45,14 @@ do #printf "Record #%d: path=[%s] mode=[%s] [%s:%s]\n" \ # "${recno}" "${path}" "${mode}" "${owner}" "${group}" - if [ "${startuid}" -eq 0 ] && [ -n "${owner}" ] && \ - [ -n "${group}" ]; then + if [ "${startuid}" -eq 0 ] && [ -n "${owner}" ] \ + && [ -n "${groupid}" ] && [ -e "${GR}${path}" ]; then msg info "chown -h %s:%s %s" "${ownerid}" "${groupid}" \ "${GR}${path}" chown -h ${ownerid}:${groupid} "${GR}${path}" || exit 1 fi - if [ -n "${mode}" ]; then + if [ -n "${mode}" ] && [ -e "${GR}${path}" ]; then msg info "chmod %s %s" "${mode}" "${GR}${path}" chmod "${mode}" "${GR}${path}" fi diff --git a/pat/gcc-alpine/0001-posix_memalign.patch b/pat/gcc-alpine/0001-posix_memalign.patch @@ -1,4 +1,4 @@ -From 0f6c64b962bb3bf75f15aec350a9d6f8997fa814 Mon Sep 17 00:00:00 2001 +From 74c7b0df9971b6bc75d7d172c2819ffd21d51050 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy <nsz@port70.net> Date: Fri, 26 Jan 2018 20:32:50 +0000 Subject: [PATCH] posix_memalign @@ -8,7 +8,7 @@ Subject: [PATCH] posix_memalign 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h -index 87344d9383f..ece428df487 100644 +index 3b2e4f47915..20f790904a2 100644 --- a/gcc/config/i386/pmm_malloc.h +++ b/gcc/config/i386/pmm_malloc.h @@ -27,12 +27,13 @@ @@ -37,6 +37,3 @@ index 87344d9383f..ece428df487 100644 return __ptr; else return NULL; --- -2.31.1 - diff --git a/pat/gcc-alpine/0002-gcc-poison-system-directories.patch b/pat/gcc-alpine/0002-gcc-poison-system-directories.patch @@ -1,203 +0,0 @@ -From 2f5ca6e3850401c628c5cc18cd606134e8b29113 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 29 Mar 2013 08:59:00 +0400 -Subject: [PATCH] gcc: poison-system-directories - -Add /sw/include and /opt/include based on the original -zecke-no-host-includes.patch patch. The original patch checked for -/usr/include, /sw/include and /opt/include and then triggered a failure and -aborted. - -Instead, we add the two missing items to the current scan. If the user -wants this to be a failure, they can add "-Werror=poison-system-directories". - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Upstream-Status: Pending ---- - gcc/common.opt | 4 ++++ - gcc/config.in | 6 ++++++ - gcc/configure | 16 ++++++++++++++++ - gcc/configure.ac | 10 ++++++++++ - gcc/doc/invoke.texi | 9 +++++++++ - gcc/gcc.c | 2 ++ - gcc/incpath.c | 21 +++++++++++++++++++++ - 7 files changed, 68 insertions(+) - -diff --git a/gcc/common.opt b/gcc/common.opt -index ec5235c3a41..ca942863064 100644 ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -682,6 +682,10 @@ Wreturn-local-addr - Common Var(warn_return_local_addr) Init(1) Warning - Warn about returning a pointer/reference to a local or temporary variable. - -+Wpoison-system-directories -+Common Var(flag_poison_system_directories) Init(1) Warning -+Warn for -I and -L options using system directories if cross compiling -+ - Wshadow - Common Var(warn_shadow) Warning - Warn when one variable shadows another. Same as -Wshadow=global. -diff --git a/gcc/config.in b/gcc/config.in -index 364eba47737..9551c0dfdf9 100644 ---- a/gcc/config.in -+++ b/gcc/config.in -@@ -224,6 +224,12 @@ - #endif - - -+/* Define to warn for use of native system header directories */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_POISON_SYSTEM_DIRECTORIES -+#endif -+ -+ - /* Define if you want all operations on RTL (the basic data structure of the - optimizer and back end) to be checked for dynamic type safety at runtime. - This is quite expensive. */ -diff --git a/gcc/configure b/gcc/configure -index 8fe9c91fd7c..17b878e4b4e 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -1010,6 +1010,7 @@ with_system_zlib - enable_maintainer_mode - enable_link_mutex - enable_version_specific_runtime_libs -+enable_poison_system_directories - enable_plugin - enable_host_shared - enable_libquadmath_support -@@ -1766,6 +1767,8 @@ Optional Features: - --enable-version-specific-runtime-libs - specify that runtime libraries should be installed - in a compiler-specific directory -+ --enable-poison-system-directories -+ warn for use of native system header directories - --enable-plugin enable plugin support - --enable-host-shared build host code as shared libraries - --disable-libquadmath-support -@@ -30276,6 +30279,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : - fi - - -+# Check whether --enable-poison-system-directories was given. -+if test "${enable_poison_system_directories+set}" = set; then : -+ enableval=$enable_poison_system_directories; -+else -+ enable_poison_system_directories=no -+fi -+ -+if test "x${enable_poison_system_directories}" = "xyes"; then -+ -+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h -+ -+fi -+ - # Substitute configuration variables - - -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 84dceb8074a..bf64ffbe46f 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -6608,6 +6608,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, - [specify that runtime libraries should be - installed in a compiler-specific directory])]) - -+AC_ARG_ENABLE([poison-system-directories], -+ AS_HELP_STRING([--enable-poison-system-directories], -+ [warn for use of native system header directories]),, -+ [enable_poison_system_directories=no]) -+if test "x${enable_poison_system_directories}" = "xyes"; then -+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], -+ [1], -+ [Define to warn for use of native system header directories]) -+fi -+ - # Substitute configuration variables - AC_SUBST(subdirs) - AC_SUBST(srcdir) -diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index eabeec944e7..cd31b522e42 100644 ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -348,6 +348,7 @@ Objective-C and Objective-C++ Dialects}. - -Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded @gol - -Wparentheses -Wno-pedantic-ms-format @gol - -Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast @gol -+-Wno-poison-system-directories @gol - -Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol - -Wrestrict -Wno-return-local-addr -Wreturn-type @gol - -Wno-scalar-storage-order -Wsequence-point @gol -@@ -6926,6 +6927,14 @@ made up of data only and thus requires no special treatment. But, for - most targets, it is made up of code and thus requires the stack to be - made executable in order for the program to work properly. - -+@item -Wno-poison-system-directories -+@opindex Wno-poison-system-directories -+Do not warn for @option{-I} or @option{-L} options using system -+directories such as @file{/usr/include} when cross compiling. This -+option is intended for use in chroot environments when such -+directories contain the correct headers and libraries for the target -+system rather than the host. -+ - @item -Wfloat-equal - @opindex Wfloat-equal - @opindex Wno-float-equal -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 9f790db0daf..b2200c5185a 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -1041,6 +1041,8 @@ proper position among the other output files. */ - "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ - "%X %{o*} %{e*} %{N} %{n} %{r}\ - %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ -+ %{Wno-poison-system-directories:--no-poison-system-directories} \ -+ %{Werror=poison-system-directories:--error-poison-system-directories} \ - %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \ - VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \ - %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ -diff --git a/gcc/incpath.c b/gcc/incpath.c -index 8a2bda00f80..9098ab044ab 100644 ---- a/gcc/incpath.c -+++ b/gcc/incpath.c -@@ -26,6 +26,7 @@ - #include "intl.h" - #include "incpath.h" - #include "cppdefault.h" -+#include "diagnostic-core.h" - - /* Microsoft Windows does not natively support inodes. - VMS has non-numeric inodes. */ -@@ -393,6 +394,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) - } - fprintf (stderr, _("End of search list.\n")); - } -+ -+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES -+ if (flag_poison_system_directories) -+ { -+ struct cpp_dir *p; -+ -+ for (p = heads[INC_QUOTE]; p; p = p->next) -+ { -+ if ((!strncmp (p->name, "/usr/include", 12)) -+ || (!strncmp (p->name, "/usr/local/include", 18)) -+ || (!strncmp (p->name, "/usr/X11R6/include", 18)) -+ || (!strncmp (p->name, "/sw/include", 11)) -+ || (!strncmp (p->name, "/opt/include", 12))) -+ warning (OPT_Wpoison_system_directories, -+ "include location \"%s\" is unsafe for " -+ "cross-compilation", -+ p->name); -+ } -+ } -+#endif - } - - /* Use given -I paths for #include "..." but not #include <...>, and --- -2.31.1 - diff --git a/pat/gcc-alpine/0003-Turn-on-Wl-z-relro-z-now-by-default.patch b/pat/gcc-alpine/0003-Turn-on-Wl-z-relro-z-now-by-default.patch @@ -1,39 +0,0 @@ -From ef512b8fcf9c7628267ff2dbb127aa094f6754f3 Mon Sep 17 00:00:00 2001 -From: Ariadne Conill <ariadne@dereferenced.org> -Date: Fri, 21 Aug 2020 06:45:49 +0000 -Subject: [PATCH] Turn on -Wl,-z,relro,-z,now by default. - ---- - gcc/doc/invoke.texi | 3 +++ - gcc/gcc.c | 1 + - 2 files changed, 4 insertions(+) - -diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index cd31b522e42..17d371ef432 100644 ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -14663,6 +14663,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the - linker. When using the GNU linker, you can also get the same effect with - @option{-Wl,-Map=output.map}. - -+NOTE: In Alpine Linux, for LDFLAGS, the option -+@option{-Wl,-z,relro,now} is used. To disable, use @option{-Wl,-z,norelro}. -+ - @item -u @var{symbol} - @opindex u - Pretend the symbol @var{symbol} is undefined, to force linking of -diff --git a/gcc/gcc.c b/gcc/gcc.c -index b2200c5185a..625c9ab7902 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -1039,6 +1039,7 @@ proper position among the other output files. */ - "%{flto|flto=*:%<fcompare-debug*} \ - %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \ - "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ -+ "-z relro -z now " \ - "%X %{o*} %{e*} %{N} %{n} %{r}\ - %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ - %{Wno-poison-system-directories:--no-poison-system-directories} \ --- -2.31.1 - diff --git a/pat/gcc-alpine/0003-specs-turn-on-Wl-z-now-by-default.patch b/pat/gcc-alpine/0003-specs-turn-on-Wl-z-now-by-default.patch @@ -0,0 +1,41 @@ +From 40e45739e7d3787acd13b5b9a4c27d843de0ffe2 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Fri, 21 Aug 2020 06:45:49 +0000 +Subject: [PATCH] specs: turn on -Wl,-z,now by default + +Previously, we also used to turn on -z relro here, but we now build +binutils with --enable-relro, which is functionally equivalent. + +Binutils does not appear to have a similar option for enabling -z +now by default. +--- + gcc/doc/invoke.texi | 3 +++ + gcc/gcc.cc | 1 + + 2 files changed, 4 insertions(+) + +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index b2de464798a..83bd1bde433 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -16872,6 +16872,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the + linker. When using the GNU linker, you can also get the same effect with + @option{-Wl,-Map=output.map}. + ++NOTE: In Alpine Linux, for LDFLAGS, the option ++@option{-Wl,-z,now} is used. To disable, use @option{-Wl,-z,nonow}. ++ + @item -u @var{symbol} + @opindex u + Pretend the symbol @var{symbol} is undefined, to force linking of +diff --git a/gcc/gcc.cc b/gcc/gcc.cc +index 47fb5802194..d18b5d7b59a 100644 +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -1157,6 +1157,7 @@ proper position among the other output files. */ + "%{flto|flto=*:%<fcompare-debug*} \ + %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \ + "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ ++ "-z now " \ + "%X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ + %{Wno-poison-system-directories:--no-poison-system-directories} \ diff --git a/pat/gcc-alpine/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch b/pat/gcc-alpine/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch @@ -1,19 +1,19 @@ -From 3c848f2fbde81db336ec97d9be7a5a4a05015eef Mon Sep 17 00:00:00 2001 +From 666d0aeb808ac9c10d065ae7b196695c81a25a20 Mon Sep 17 00:00:00 2001 From: Ariadne Conill <ariadne@dereferenced.org> Date: Fri, 21 Aug 2020 06:46:22 +0000 Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++, if the optimization level is > 0 --- - gcc/c-family/c-cppbuiltin.c | 4 ++++ - gcc/doc/invoke.texi | 6 ++++++ + gcc/c-family/c-cppbuiltin.cc | 4 ++++ + gcc/doc/invoke.texi | 6 ++++++ 2 files changed, 10 insertions(+) -diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c -index db91a36794a..ed976c71404 100644 ---- a/gcc/c-family/c-cppbuiltin.c -+++ b/gcc/c-family/c-cppbuiltin.c -@@ -1385,6 +1385,10 @@ c_cpp_builtins (cpp_reader *pfile) +diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc +index 4672ae8486a..573c021e1e8 100644 +--- a/gcc/c-family/c-cppbuiltin.cc ++++ b/gcc/c-family/c-cppbuiltin.cc +@@ -1510,6 +1510,10 @@ c_cpp_builtins (cpp_reader *pfile) builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0); builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0); @@ -25,10 +25,10 @@ index db91a36794a..ed976c71404 100644 if (flag_gnu89_inline) cpp_define (pfile, "__GNUC_GNU_INLINE__"); diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index 17d371ef432..fe793ac08db 100644 +index 83bd1bde433..dda299a9987 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi -@@ -9230,6 +9230,12 @@ also turns on the following optimization flags: +@@ -10896,6 +10896,12 @@ also turns on the following optimization flags: Please note the warning under @option{-fgcse} about invoking @option{-O2} on programs that use computed gotos. @@ -41,6 +41,3 @@ index 17d371ef432..fe793ac08db 100644 @item -O3 @opindex O3 Optimize yet more. @option{-O3} turns on all optimizations specified --- -2.31.1 - diff --git a/pat/gcc-alpine/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch b/pat/gcc-alpine/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch @@ -1,242 +0,0 @@ -From: Ariadne Conill <ariadne@dereferenced.org> -From: Olsken (updated patches) -Date: Sat, 21 Aug 2021 08:51:52 +0000 -Subject: [PATCH] On linux targets pass --as-needed by default to the linker, - but always link the sanitizer libraries with --no-as-needed. - -diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h -index 7f2529a2a..b097e1688 100644 ---- a/gcc/config/aarch64/aarch64-linux.h -+++ b/gcc/config/aarch64/aarch64-linux.h -@@ -35,6 +35,7 @@ - #define CPP_SPEC "%{pthread:-D_REENTRANT}" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ -+ --as-needed \ - %{static:-Bstatic} \ - %{shared:-shared} \ - %{symbolic:-Bsymbolic} \ -diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h -index c1dae8ca2..a87dc7401 100644 ---- a/gcc/config/alpha/linux-elf.h -+++ b/gcc/config/alpha/linux-elf.h -@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see - - #define ELF_DYNAMIC_LINKER GNU_USER_DYNAMIC_LINKER - --#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ -+#define LINK_SPEC "-m elf64alpha --as-needed %{G*} %{relax:-relax} \ - %{O*:-O3} %{!O*:-O1} \ - %{shared:-shared} \ - %{!shared: \ -diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h -index 0c1c4e70b..8b581afac 100644 ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -70,6 +70,7 @@ - %{rdynamic:-export-dynamic} \ - %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ - -X \ -+ --as-needed \ - %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ - SUBTARGET_EXTRA_LINK_SPEC - -diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h -index 5ebbf42a1..e1a04e9fd 100644 ---- a/gcc/config/gnu-user.h -+++ b/gcc/config/gnu-user.h -@@ -136,21 +136,21 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \ - "%{static-libasan:%{!shared:" \ - LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \ -- LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}" -+ LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}" - #undef LIBHWASAN_EARLY_SPEC - #define LIBHWASAN_EARLY_SPEC "%{static-libhwasan:%{!shared:" \ - LD_STATIC_OPTION " --whole-archive -lhwasan --no-whole-archive " \ -- LD_DYNAMIC_OPTION "}}%{!static-libhwasan:-lhwasan}" -+ LD_DYNAMIC_OPTION "}}%{!static-libhwasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lhwasan %{fuse-ld=gold:--as-needed;:--pop-state}}" - #undef LIBTSAN_EARLY_SPEC - #define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \ - "%{static-libtsan:%{!shared:" \ - LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \ -- LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}" -+ LD_DYNAMIC_OPTION "}}%{!static-libtsan:%{!fuse-ld=gold:--push-state} --no-as-needed -ltsan %{fuse-ld=gold:--as-needed;:--pop-state}}" - #undef LIBLSAN_EARLY_SPEC - #define LIBLSAN_EARLY_SPEC "%{!shared:liblsan_preinit%O%s} " \ - "%{static-liblsan:%{!shared:" \ - LD_STATIC_OPTION " --whole-archive -llsan --no-whole-archive " \ -- LD_DYNAMIC_OPTION "}}%{!static-liblsan:-llsan}" -+ LD_DYNAMIC_OPTION "}}%{!static-liblsan:%{!fuse-ld=gold:--push-state} --no-as-needed -llsan %{fuse-ld=gold:--as-needed;:--pop-state}}" - #endif - - #undef TARGET_F951_OPTIONS -diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h -index a23e7ab3e..12ac8cb93 100644 ---- a/gcc/config/i386/gnu-user.h -+++ b/gcc/config/i386/gnu-user.h -@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. If not see - { "link_emulation", GNU_USER_LINK_EMULATION },\ - { "dynamic_linker", GNU_USER_DYNAMIC_LINKER } - --#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ -+#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) --as-needed %{shared:-shared} \ - %{!shared: \ - %{!static: \ - %{!static-pie: \ -diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h -index f3e25b141..712b0f1c3 100644 ---- a/gcc/config/i386/gnu-user64.h -+++ b/gcc/config/i386/gnu-user64.h -@@ -56,6 +56,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - "%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \ - %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \ - %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \ -+ --as-needed \ - %{shared:-shared} \ - %{!shared: \ - %{!static: \ -diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h -index ac40c3dfd..6e19e25c3 100644 ---- a/gcc/config/ia64/linux.h -+++ b/gcc/config/ia64/linux.h -@@ -58,7 +58,7 @@ do { \ - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" - - #undef LINK_SPEC --#define LINK_SPEC "\ -+#define LINK_SPEC " --as-needed \ - %{shared:-shared} \ - %{!shared: \ - %{!static: \ -diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h -index a390bcece..be0ee2893 100644 ---- a/gcc/config/mips/gnu-user.h -+++ b/gcc/config/mips/gnu-user.h -@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see - #undef GNU_USER_TARGET_LINK_SPEC - #define GNU_USER_TARGET_LINK_SPEC "\ - %{G*} %{EB} %{EL} %{mips*} %{shared} \ -+ -as-needed \ - %{!shared: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ -diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h -index e3f2cd254..43499ed29 100644 ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -374,13 +374,13 @@ extern int dot_symbols; - " -m elf64ppc") - #endif - --#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \ -+#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " --as-needed %{!shared: %{!static: \ - %{!static-pie: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}}} \ - %(link_os_extra_spec32)" - --#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " %{!shared: %{!static: \ -+#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " --as-needed %{!shared: %{!static: \ - %{!static-pie: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \ -diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h -index 510abe169..3c1f3a8ec 100644 ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -789,7 +789,7 @@ GNU_USER_TARGET_CC1_SPEC - #define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER - #endif - --#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ -+#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --as-needed %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}" - -diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h -index daa48fdfc..2fcfc5d77 100644 ---- a/gcc/config/s390/linux.h -+++ b/gcc/config/s390/linux.h -@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. If not see - - #undef LINK_SPEC - #define LINK_SPEC \ -- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ -+ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --as-needed \ - %{shared:-shared} \ - %{!shared: \ - %{static:-static} \ -diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h -index 2550d7ee8..7596d0b27 100644 ---- a/gcc/config/sparc/linux.h -+++ b/gcc/config/sparc/linux.h -@@ -81,7 +81,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #undef LINK_SPEC --#define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ -+#define LINK_SPEC "-m elf32_sparc --as-needed %{shared:-shared} \ - %{!mno-relax:%{!r:-relax}} \ - %{!shared: \ - %{!static: \ -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 4d790f9dd..5b2fa8c93 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -737,8 +737,11 @@ proper position among the other output files. */ - #ifdef LIBASAN_EARLY_SPEC - #define LIBASAN_SPEC STATIC_LIBASAN_LIBS - #elif defined(HAVE_LD_STATIC_DYNAMIC) --#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION \ -- "} -lasan %{static-libasan:" LD_DYNAMIC_OPTION "}" \ -+#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \ -+ " %{!static-libasan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \ -+ " -lasan " \ -+ " %{static-libasan:" LD_DYNAMIC_OPTION "}" \ -+ " %{!static-libasan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ - STATIC_LIBASAN_LIBS - #else - #define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS -@@ -773,8 +776,11 @@ proper position among the other output files. */ - #ifdef LIBTSAN_EARLY_SPEC - #define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS - #elif defined(HAVE_LD_STATIC_DYNAMIC) --#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION \ -- "} -ltsan %{static-libtsan:" LD_DYNAMIC_OPTION "}" \ -+#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \ -+ " %{!static-libtsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \ -+ " -ltsan " \ -+ " %{static-libtsan:" LD_DYNAMIC_OPTION "}" \ -+ " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ - STATIC_LIBTSAN_LIBS - #else - #define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS -@@ -791,8 +797,11 @@ proper position among the other output files. */ - #ifdef LIBLSAN_EARLY_SPEC - #define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS - #elif defined(HAVE_LD_STATIC_DYNAMIC) --#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION \ -- "} -llsan %{static-liblsan:" LD_DYNAMIC_OPTION "}" \ -+#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \ -+ " %{!static-liblsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \ -+ " -llsan " \ -+ " %{static-liblsan:" LD_DYNAMIC_OPTION "}" \ -+ " %{!static-liblsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ - STATIC_LIBLSAN_LIBS - #else - #define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS -@@ -807,8 +816,11 @@ proper position among the other output files. */ - #define STATIC_LIBUBSAN_LIBS \ - " %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}" - #ifdef HAVE_LD_STATIC_DYNAMIC --#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION \ -- "} -lubsan %{static-libubsan:" LD_DYNAMIC_OPTION "}" \ -+#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \ -+ " %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \ -+ " -lubsan " \ -+ " %{static-libubsan:" LD_DYNAMIC_OPTION "}" \ -+ " %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ - STATIC_LIBUBSAN_LIBS - #else - #define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS diff --git a/pat/gcc-alpine/0006-Enable-Wformat-and-Wformat-security-by-default.patch b/pat/gcc-alpine/0006-Enable-Wformat-and-Wformat-security-by-default.patch @@ -1,4 +1,4 @@ -From 44b1a01cbe3932122112f38e06a21b1c9efad568 Mon Sep 17 00:00:00 2001 +From c664283dd30949c5299d1c45bd5740bcfe993d22 Mon Sep 17 00:00:00 2001 From: Ariadne Conill <ariadne@dereferenced.org> Date: Fri, 21 Aug 2020 06:47:43 +0000 Subject: [PATCH] Enable -Wformat and -Wformat-security by default. @@ -8,10 +8,10 @@ Subject: [PATCH] Enable -Wformat and -Wformat-security by default. 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt -index c49da99d395..93f25319005 100644 +index 07da40ef43b..8683f706426 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt -@@ -599,7 +599,7 @@ Warn about function calls with format strings that write past the end +@@ -692,7 +692,7 @@ Warn about function calls with format strings that write past the end of the destination region. Same as -Wformat-overflow=1. Wformat-security @@ -20,7 +20,7 @@ index c49da99d395..93f25319005 100644 Warn about possible security problems with format functions. Wformat-signedness -@@ -620,7 +620,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ +@@ -713,7 +713,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ Warn about zero-length formats. Wformat= @@ -29,6 +29,3 @@ index c49da99d395..93f25319005 100644 Warn about printf/scanf/strftime/strfmon format string anomalies. Wformat-overflow= --- -2.31.1 - diff --git a/pat/gcc-alpine/0007-Enable-Wtrampolines-by-default.patch b/pat/gcc-alpine/0007-Enable-Wtrampolines-by-default.patch @@ -1,4 +1,4 @@ -From 5679adc04a200e3a1a8dd77466eb79d03da8bf8a Mon Sep 17 00:00:00 2001 +From e4d0ec43e772b6dc7c3708aed5309897df26a125 Mon Sep 17 00:00:00 2001 From: Ariadne Conill <ariadne@dereferenced.org> Date: Fri, 21 Aug 2020 06:48:24 +0000 Subject: [PATCH] Enable -Wtrampolines by default. @@ -8,10 +8,10 @@ Subject: [PATCH] Enable -Wtrampolines by default. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/common.opt b/gcc/common.opt -index ca942863064..0a0ab6195ee 100644 +index 0357868e22c..6d5e5eebe60 100644 --- a/gcc/common.opt +++ b/gcc/common.opt -@@ -774,7 +774,7 @@ Common Var(warn_system_headers) Warning +@@ -802,7 +802,7 @@ Common Var(warn_system_headers) Warning Do not suppress warnings from system headers. Wtrampolines @@ -19,7 +19,4 @@ index ca942863064..0a0ab6195ee 100644 +Common Var(warn_trampolines) Init(1) Warning Warn whenever a trampoline is generated. - Wtype-limits --- -2.31.1 - + Wtrivial-auto-var-init diff --git a/pat/gcc-alpine/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch b/pat/gcc-alpine/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch @@ -1,14 +1,19 @@ +From 27e5d5bd3fed9006a2958d2b09750d15ad07383b Mon Sep 17 00:00:00 2001 From: Ariadne Conill <ariadne@dereferenced.org> -From: Olsken (updated patches) -Date: Sat, 21 Aug 2021 08:51:52 +0000 +Date: Fri, 21 Aug 2020 06:49:40 +0000 Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding Change the buffer size. -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 5b2fa8c93..d7f3ee55c 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -989,6 +989,12 @@ proper position among the other output files. */ +--- + gcc/gcc.cc | 8 +++++++- + gcc/params.opt | 2 +- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/gcc/gcc.cc b/gcc/gcc.cc +index 3b76311b544..cc99d0b7aa1 100644 +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -996,6 +996,12 @@ proper position among the other output files. */ #define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}" #endif @@ -21,7 +26,7 @@ index 5b2fa8c93..d7f3ee55c 100644 #ifndef LINK_SSP_SPEC #ifdef TARGET_LIBC_PROVIDES_SSP #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ -@@ -1285,7 +1291,7 @@ static const char *cc1_options = +@@ -1295,7 +1301,7 @@ static const char *cc1_options = %{-version:--version}\ %{-help=*:--help=%*}\ %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\ @@ -31,10 +36,10 @@ index 5b2fa8c93..d7f3ee55c 100644 %{fprofile-arcs|fprofile-generate*|coverage:\ %{!fprofile-update=single:\ diff --git a/gcc/params.opt b/gcc/params.opt -index 8ba281b4c..bab39cdf8 100644 +index b88e1372005..82a7e25dd2f 100644 --- a/gcc/params.opt +++ b/gcc/params.opt -@@ -946,7 +946,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim +@@ -1012,7 +1012,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim The maximum number of SSA_NAME assignments to follow in determining a value. -param=ssp-buffer-size= diff --git a/pat/gcc-alpine/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch b/pat/gcc-alpine/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch @@ -1,4 +1,4 @@ -From 27863679bde671cdd354cba398ef71a956873e6a Mon Sep 17 00:00:00 2001 +From 83bf2a316222e2fe0b72968cadf4e334d41173f6 Mon Sep 17 00:00:00 2001 From: Ariadne Conill <ariadne@dereferenced.org> Date: Fri, 21 Aug 2020 06:50:33 +0000 Subject: [PATCH] Ensure that msgfmt doesn't encounter problems during gcc @@ -26,7 +26,7 @@ https://bugs.gentoo.org/295480 2 files changed, 2 insertions(+) diff --git a/libstdc++-v3/po/Makefile.am b/libstdc++-v3/po/Makefile.am -index a9391d8d167..f7eee24dc8c 100644 +index 8f51544989e..5329804d136 100644 --- a/libstdc++-v3/po/Makefile.am +++ b/libstdc++-v3/po/Makefile.am @@ -38,6 +38,7 @@ MSGFMT = msgfmt @@ -38,10 +38,10 @@ index a9391d8d167..f7eee24dc8c 100644 all-local: all-local-$(USE_NLS) diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in -index a0f84b0cfa0..ab24a47a2fd 100644 +index 243f3db7b72..822210781fa 100644 --- a/libstdc++-v3/po/Makefile.in +++ b/libstdc++-v3/po/Makefile.in -@@ -548,6 +548,7 @@ uninstall-am: +@@ -561,6 +561,7 @@ uninstall-am: .po.mo: @@ -49,6 +49,3 @@ index a0f84b0cfa0..ab24a47a2fd 100644 $(MSGFMT) -o $@ $< all-local: all-local-$(USE_NLS) --- -2.31.1 - diff --git a/pat/gcc-alpine/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch b/pat/gcc-alpine/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch @@ -1,4 +1,4 @@ -From 953779008f2caa78c55f80c2d6096bf627080016 Mon Sep 17 00:00:00 2001 +From 190064993cd8ddbd48015c1fc1916e4110a97733 Mon Sep 17 00:00:00 2001 From: Ariadne Conill <ariadne@dereferenced.org> Date: Fri, 21 Aug 2020 06:52:07 +0000 Subject: [PATCH] Don't declare asprintf if defined as a macro. @@ -8,10 +8,10 @@ Subject: [PATCH] Don't declare asprintf if defined as a macro. 1 file changed, 3 insertions(+) diff --git a/include/libiberty.h b/include/libiberty.h -index 141cb886a85..fa0e78eb62f 100644 +index a65ced9c820..eb20ab0f95f 100644 --- a/include/libiberty.h +++ b/include/libiberty.h -@@ -645,8 +645,11 @@ extern int pwait (int, int *, int); +@@ -652,8 +652,11 @@ extern void *bsearch_r (const void *, const void *, /* Like sprintf but provides a pointer to malloc'd storage, which must be freed by the caller. */ @@ -23,6 +23,3 @@ index 141cb886a85..fa0e78eb62f 100644 /* Like asprintf but allocates memory without fail. This works like xmalloc. */ --- -2.31.1 - diff --git a/pat/gcc-alpine/0011-libiberty-copy-PIC-objects-during-build-process.patch b/pat/gcc-alpine/0011-libiberty-copy-PIC-objects-during-build-process.patch @@ -1,4 +1,4 @@ -From b43185f44ed438267db101fbe41361001c4e8a94 Mon Sep 17 00:00:00 2001 +From 838e1daa955d9013c462be3471497cb39641e951 Mon Sep 17 00:00:00 2001 From: Ariadne Conill <ariadne@dereferenced.org> Date: Fri, 21 Aug 2020 06:53:00 +0000 Subject: [PATCH] libiberty: copy PIC objects during build process @@ -8,10 +8,10 @@ Subject: [PATCH] libiberty: copy PIC objects during build process 1 file changed, 1 insertion(+) diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in -index d6b302e02fd..fd39928546f 100644 +index 1b17c2e3a47..8db1176df2e 100644 --- a/libiberty/Makefile.in +++ b/libiberty/Makefile.in -@@ -263,6 +263,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) +@@ -265,6 +265,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(AR) $(AR_FLAGS) $(TARGETLIB) \ $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ $(RANLIB) $(TARGETLIB); \ @@ -19,6 +19,3 @@ index d6b302e02fd..fd39928546f 100644 cd ..; \ else true; fi --- -2.31.1 - diff --git a/pat/gcc-alpine/0012-libitm-disable-FORTIFY.patch b/pat/gcc-alpine/0012-libitm-disable-FORTIFY.patch @@ -1,4 +1,4 @@ -From 10f38bef9af2e3d6a32253ca18d5ae0123e25e1b Mon Sep 17 00:00:00 2001 +From 717346fbbd6642ba6b0c3af2deb3771794346507 Mon Sep 17 00:00:00 2001 From: Ariadne Conill <ariadne@dereferenced.org> Date: Fri, 21 Aug 2020 06:53:36 +0000 Subject: [PATCH] libitm: disable FORTIFY @@ -8,7 +8,7 @@ Subject: [PATCH] libitm: disable FORTIFY 1 file changed, 10 insertions(+) diff --git a/libitm/configure.tgt b/libitm/configure.tgt -index d1beb5c9ec8..c2b50b95c01 100644 +index 06e90973ef3..669e64236c3 100644 --- a/libitm/configure.tgt +++ b/libitm/configure.tgt @@ -47,6 +47,16 @@ if test "$gcc_cv_have_tls" = yes ; then @@ -28,6 +28,3 @@ index d1beb5c9ec8..c2b50b95c01 100644 # Map the target cpu to an ARCH sub-directory. At the same time, # work out any special compilation flags as necessary. case "${target_cpu}" in --- -2.31.1 - diff --git a/pat/gcc-alpine/0013-libgcc_s.patch b/pat/gcc-alpine/0013-libgcc_s.patch @@ -1,57 +0,0 @@ -From 3614b3586d4a0f75e454943895977a9df1b734d5 Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy <nsz@port70.net> -Date: Sat, 24 Oct 2015 20:09:53 +0000 -Subject: [PATCH] libgcc_s - ---- - gcc/config/i386/i386-expand.c | 4 ++-- - libgcc/config/i386/cpuinfo.c | 6 +++--- - libgcc/config/i386/t-linux | 2 +- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c -index 47d52550e5e..9cb8cc7950e 100644 ---- a/gcc/config/i386/i386-expand.c -+++ b/gcc/config/i386/i386-expand.c -@@ -12338,10 +12338,10 @@ - { - case IX86_BUILTIN_CPU_INIT: - { -- /* Make it call __cpu_indicator_init in libgcc. */ -+ /* Make it call __cpu_indicator_init_local in libgcc.a. */ - tree call_expr, fndecl, type; - type = build_function_type_list (integer_type_node, NULL_TREE); -- fndecl = build_fn_decl ("__cpu_indicator_init", type); -+ fndecl = build_fn_decl ("__cpu_indicator_init_local", type); - call_expr = build_call_expr (fndecl, 0); - return expand_expr (call_expr, target, mode, EXPAND_NORMAL); - } -diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c -index 83301a1445f..89fdc7eb587 100644 ---- a/libgcc/config/i386/cpuinfo.c -+++ b/libgcc/config/i386/cpuinfo.c -@@ -516,7 +516,7 @@ __cpu_indicator_init (void) - return 0; - } - --#if defined SHARED && defined USE_ELF_SYMVER --__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0"); --__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0"); -+#ifndef SHARED -+int __cpu_indicator_init_local (void) -+ __attribute__ ((weak, alias ("__cpu_indicator_init"))); - #endif -diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux -index 8506a635790..564296f788e 100644 ---- a/libgcc/config/i386/t-linux -+++ b/libgcc/config/i386/t-linux -@@ -3,5 +3,5 @@ - # t-slibgcc-elf-ver and t-linux - SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver - --HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS) -+HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS) - CRTSTUFF_T_CFLAGS += $(CET_FLAGS) --- -2.31.1 - diff --git a/pat/gcc-alpine/0014-nopie.patch b/pat/gcc-alpine/0014-nopie.patch @@ -1,4 +1,4 @@ -From 8e58f9aa5b86dc92e5a1fa71e40e499739473894 Mon Sep 17 00:00:00 2001 +From db28b1e0f3b06325026ec5b5e7cdca4e9992e05c Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy <nsz@port70.net> Date: Sat, 7 Nov 2015 02:08:05 +0000 Subject: [PATCH] nopie @@ -9,10 +9,10 @@ Subject: [PATCH] nopie 2 files changed, 40 insertions(+) diff --git a/gcc/configure b/gcc/configure -index 17b878e4b4e..808570b6c99 100755 +index e9060112384..2f6b3265a6c 100755 --- a/gcc/configure +++ b/gcc/configure -@@ -30784,6 +30784,33 @@ fi +@@ -32497,6 +32497,33 @@ fi $as_echo "$gcc_cv_no_pie" >&6; } if test "$gcc_cv_no_pie" = "yes"; then NO_PIE_FLAG="-no-pie" @@ -47,10 +47,10 @@ index 17b878e4b4e..808570b6c99 100755 diff --git a/gcc/configure.ac b/gcc/configure.ac -index bf64ffbe46f..9c2571de709 100644 +index 75a7048045c..e683d3a7a5f 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac -@@ -6866,6 +6866,19 @@ AC_CACHE_CHECK([for -no-pie option], +@@ -7681,6 +7681,19 @@ AC_CACHE_CHECK([for -no-pie option], LDFLAGS="$saved_LDFLAGS"]) if test "$gcc_cv_no_pie" = "yes"; then NO_PIE_FLAG="-no-pie" @@ -70,6 +70,3 @@ index bf64ffbe46f..9c2571de709 100644 fi AC_SUBST([NO_PIE_FLAG]) --- -2.31.1 - diff --git a/pat/gcc-alpine/0015-dlang-use-libucontext-on-mips64.patch b/pat/gcc-alpine/0015-dlang-use-libucontext-on-mips64.patch @@ -0,0 +1,21 @@ +From 686e85d8a05f9f9e6c983afb13f937bd88fe84dd Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Thu, 6 Jan 2022 03:18:32 +0000 +Subject: [PATCH] dlang: use libucontext on mips64 + +--- + libphobos/configure.tgt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt +index 0063dd23249..c5e782a1238 100644 +--- a/libphobos/configure.tgt ++++ b/libphobos/configure.tgt +@@ -38,6 +38,7 @@ case "${target}" in + ;; + mips*-*-linux*) + LIBPHOBOS_SUPPORTED=yes ++ LIBDRUNTIME_NEEDS_UCONTEXT=yes + ;; + power*-*-freebsd*) + LIBPHOBOS_SUPPORTED=yes diff --git a/pat/gcc-alpine/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch b/pat/gcc-alpine/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch @@ -1,25 +0,0 @@ -From c5ee6bb497f640877be668428292487eb026d79e Mon Sep 17 00:00:00 2001 -From: Ariadne Conill <ariadne@dereferenced.org> -Date: Fri, 21 Aug 2020 06:57:09 +0000 -Subject: [PATCH] libffi: use __linux__ instead of __gnu_linux__ for musl - ---- - libffi/src/closures.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libffi/src/closures.c b/libffi/src/closures.c -index 721ff00ea43..22a699c6340 100644 ---- a/libffi/src/closures.c -+++ b/libffi/src/closures.c -@@ -34,7 +34,7 @@ - #include <ffi_common.h> - - #if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE --# if __gnu_linux__ && !defined(__ANDROID__) -+# if __linux__ && !defined(__ANDROID__) - /* This macro indicates it may be forbidden to map anonymous memory - with both write and execute permission. Code compiled when this - option is defined will attempt to map such pages once, but if it --- -2.31.1 - diff --git a/pat/gcc-alpine/0016-ada-fix-shared-linking.patch b/pat/gcc-alpine/0016-ada-fix-shared-linking.patch @@ -0,0 +1,39 @@ +From fd642f8cd61849a9dc169588be5562ceda96a889 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Fri, 21 Aug 2020 06:59:16 +0000 +Subject: [PATCH] ada: fix shared linking + +--- + gcc/ada/link.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/gcc/ada/link.c b/gcc/ada/link.c +index a7574efb472..0ad0d66463c 100644 +--- a/gcc/ada/link.c ++++ b/gcc/ada/link.c +@@ -107,9 +107,9 @@ const char *__gnat_default_libgcc_subdir = "lib"; + || defined (__NetBSD__) || defined (__OpenBSD__) \ + || defined (__QNX__) + const char *__gnat_object_file_option = "-Wl,@"; +-const char *__gnat_run_path_option = "-Wl,-rpath,"; +-char __gnat_shared_libgnat_default = STATIC; +-char __gnat_shared_libgcc_default = STATIC; ++const char *__gnat_run_path_option = ""; ++char __gnat_shared_libgnat_default = SHARED; ++char __gnat_shared_libgcc_default = SHARED; + int __gnat_link_max = 8192; + unsigned char __gnat_objlist_file_supported = 1; + const char *__gnat_object_library_extension = ".a"; +@@ -129,9 +129,9 @@ const char *__gnat_default_libgcc_subdir = "lib"; + + #elif defined (__linux__) || defined (__GLIBC__) + const char *__gnat_object_file_option = "-Wl,@"; +-const char *__gnat_run_path_option = "-Wl,-rpath,"; +-char __gnat_shared_libgnat_default = STATIC; +-char __gnat_shared_libgcc_default = STATIC; ++const char *__gnat_run_path_option = ""; ++char __gnat_shared_libgnat_default = SHARED; ++char __gnat_shared_libgcc_default = SHARED; + int __gnat_link_max = 8192; + unsigned char __gnat_objlist_file_supported = 1; + const char *__gnat_object_library_extension = ".a"; diff --git a/pat/gcc-alpine/0016-dlang-update-zlib-binding.patch b/pat/gcc-alpine/0016-dlang-update-zlib-binding.patch @@ -1,425 +0,0 @@ -From b2e1bf216169f470ced86f1f3e95c89debf606cd Mon Sep 17 00:00:00 2001 -From: Ariadne Conill <ariadne@dereferenced.org> -Date: Fri, 21 Aug 2020 06:57:51 +0000 -Subject: [PATCH] dlang: update zlib binding - ---- - libphobos/src/std/zlib.d | 266 ++++++++++++++++++++++++++++----------- - 1 file changed, 196 insertions(+), 70 deletions(-) - -diff --git a/libphobos/src/std/zlib.d b/libphobos/src/std/zlib.d -index e6cce240fd5..bd2fe37ebec 100644 ---- a/libphobos/src/std/zlib.d -+++ b/libphobos/src/std/zlib.d -@@ -1,7 +1,7 @@ - // Written in the D programming language. - - /** -- * Compress/decompress data using the $(HTTP www._zlib.net, _zlib library). -+ * Compress/decompress data using the $(HTTP www.zlib.net, zlib library). - * - * Examples: - * -@@ -43,12 +43,12 @@ - * References: - * $(HTTP en.wikipedia.org/wiki/Zlib, Wikipedia) - * -- * Copyright: Copyright Digital Mars 2000 - 2011. -+ * Copyright: Copyright The D Language Foundation 2000 - 2011. - * License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). - * Authors: $(HTTP digitalmars.com, Walter Bright) -- * Source: $(PHOBOSSRC std/_zlib.d) -+ * Source: $(PHOBOSSRC std/zlib.d) - */ --/* Copyright Digital Mars 2000 - 2011. -+/* Copyright The D Language Foundation 2000 - 2011. - * Distributed under the Boost Software License, Version 1.0. - * (See accompanying file LICENSE_1_0.txt or copy at - * http://www.boost.org/LICENSE_1_0.txt) -@@ -75,9 +75,9 @@ enum - - class ZlibException : Exception - { -- this(int errnum) -- { string msg; -- -+ private static string getmsg(int errnum) nothrow @nogc pure @safe -+ { -+ string msg; - switch (errnum) - { - case Z_STREAM_END: msg = "stream end"; break; -@@ -90,7 +90,12 @@ class ZlibException : Exception - case Z_VERSION_ERROR: msg = "version error"; break; - default: msg = "unknown error"; break; - } -- super(msg); -+ return msg; -+ } -+ -+ this(int errnum) -+ { -+ super(getmsg(errnum)); - } - } - -@@ -104,7 +109,7 @@ class ZlibException : Exception - * buf = buffer containing input data - * - * Returns: -- * A $(D uint) checksum for the provided input data and starting checksum -+ * A `uint` checksum for the provided input data and starting checksum - * - * See_Also: - * $(LINK http://en.wikipedia.org/wiki/Adler-32) -@@ -147,7 +152,7 @@ uint adler32(uint adler, const(void)[] buf) - * buf = buffer containing input data - * - * Returns: -- * A $(D uint) checksum for the provided input data and starting checksum -+ * A `uint` checksum for the provided input data and starting checksum - * - * See_Also: - * $(LINK http://en.wikipedia.org/wiki/Cyclic_redundancy_check) -@@ -191,13 +196,14 @@ uint crc32(uint crc, const(void)[] buf) - ubyte[] compress(const(void)[] srcbuf, int level) - in - { -- assert(-1 <= level && level <= 9); -+ assert(-1 <= level && level <= 9, "Compression level needs to be within [-1, 9]."); - } --body -+do - { - import core.memory : GC; -+ import std.array : uninitializedArray; - auto destlen = srcbuf.length + ((srcbuf.length + 1023) / 1024) + 12; -- auto destbuf = new ubyte[destlen]; -+ auto destbuf = uninitializedArray!(ubyte[])(destlen); - auto err = etc.c.zlib.compress2(destbuf.ptr, &destlen, cast(ubyte *) srcbuf.ptr, srcbuf.length, level); - if (err) - { -@@ -276,7 +282,7 @@ void[] uncompress(const(void)[] srcbuf, size_t destlen = 0u, int winbits = 15) - throw new ZlibException(err); - } - } -- assert(0); -+ assert(0, "Unreachable code"); - } - - @system unittest -@@ -370,9 +376,9 @@ class Compress - this(int level, HeaderFormat header = HeaderFormat.deflate) - in - { -- assert(1 <= level && level <= 9); -+ assert(1 <= level && level <= 9, "Legal compression level are in [1, 9]."); - } -- body -+ do - { - this.level = level; - this.gzip = header == HeaderFormat.gzip; -@@ -406,6 +412,7 @@ class Compress - const(void)[] compress(const(void)[] buf) - { - import core.memory : GC; -+ import std.array : uninitializedArray; - int err; - ubyte[] destbuf; - -@@ -420,7 +427,7 @@ class Compress - inited = 1; - } - -- destbuf = new ubyte[zs.avail_in + buf.length]; -+ destbuf = uninitializedArray!(ubyte[])(zs.avail_in + buf.length); - zs.next_out = destbuf.ptr; - zs.avail_out = to!uint(destbuf.length); - -@@ -461,9 +468,10 @@ class Compress - void[] flush(int mode = Z_FINISH) - in - { -- assert(mode == Z_FINISH || mode == Z_SYNC_FLUSH || mode == Z_FULL_FLUSH); -+ assert(mode == Z_FINISH || mode == Z_SYNC_FLUSH || mode == Z_FULL_FLUSH, -+ "Mode must be either Z_FINISH, Z_SYNC_FLUSH or Z_FULL_FLUSH."); - } -- body -+ do - { - import core.memory : GC; - ubyte[] destbuf; -@@ -523,6 +531,7 @@ class UnCompress - z_stream zs; - int inited; - int done; -+ bool inputEnded; - size_t destbufsize; - - HeaderFormat format; -@@ -571,16 +580,16 @@ class UnCompress - const(void)[] uncompress(const(void)[] buf) - in - { -- assert(!done); -+ assert(!done, "Buffer has been flushed."); - } -- body -+ do - { -+ if (inputEnded || !buf.length) -+ return null; -+ - import core.memory : GC; -+ import std.array : uninitializedArray; - int err; -- ubyte[] destbuf; -- -- if (buf.length == 0) -- return null; - - if (!inited) - { -@@ -598,26 +607,152 @@ class UnCompress - - if (!destbufsize) - destbufsize = to!uint(buf.length) * 2; -- destbuf = new ubyte[zs.avail_in * 2 + destbufsize]; -- zs.next_out = destbuf.ptr; -- zs.avail_out = to!uint(destbuf.length); -- -- if (zs.avail_in) -- buf = zs.next_in[0 .. zs.avail_in] ~ cast(ubyte[]) buf; -+ auto destbuf = uninitializedArray!(ubyte[])(destbufsize); -+ size_t destFill; - - zs.next_in = cast(ubyte*) buf.ptr; - zs.avail_in = to!uint(buf.length); - -- err = inflate(&zs, Z_NO_FLUSH); -- if (err != Z_STREAM_END && err != Z_OK) -+ while (true) - { -- GC.free(destbuf.ptr); -- error(err); -+ auto oldAvailIn = zs.avail_in; -+ -+ zs.next_out = destbuf[destFill .. $].ptr; -+ zs.avail_out = to!uint(destbuf.length - destFill); -+ -+ err = inflate(&zs, Z_NO_FLUSH); -+ if (err == Z_STREAM_END) -+ { -+ inputEnded = true; -+ break; -+ } -+ else if (err != Z_OK) -+ { -+ GC.free(destbuf.ptr); -+ error(err); -+ } -+ else if (!zs.avail_in) -+ break; -+ -+ /* -+ According to the zlib manual inflate() stops when either there's -+ no more data to uncompress or the output buffer is full -+ So at this point, the output buffer is too full -+ */ -+ -+ destFill = destbuf.length; -+ -+ if (destbuf.capacity) -+ { -+ if (destbuf.length < destbuf.capacity) -+ destbuf.length = destbuf.capacity; -+ else -+ { -+ auto newLength = GC.extend(destbuf.ptr, destbufsize, destbufsize); -+ -+ if (newLength && destbuf.length < destbuf.capacity) -+ destbuf.length = destbuf.capacity; -+ else -+ destbuf.length += destbufsize; -+ } -+ } -+ else -+ destbuf.length += destbufsize; - } -+ - destbuf.length = destbuf.length - zs.avail_out; - return destbuf; - } - -+ // Test for issues 3191 and 9505 -+ @system unittest -+ { -+ import std.algorithm.comparison; -+ import std.array; -+ import std.file; -+ import std.zlib; -+ -+ // Data that can be easily compressed -+ ubyte[1024] originalData; -+ -+ // This should yield a compression ratio of at least 1/2 -+ auto compressedData = compress(originalData, 9); -+ assert(compressedData.length < originalData.length / 2, -+ "The compression ratio is too low to accurately test this situation"); -+ -+ auto chunkSize = compressedData.length / 4; -+ assert(chunkSize < compressedData.length, -+ "The length of the compressed data is too small to accurately test this situation"); -+ -+ auto decompressor = new UnCompress(); -+ ubyte[originalData.length] uncompressedData; -+ ubyte[] reusedBuf; -+ int progress; -+ -+ reusedBuf.length = chunkSize; -+ -+ for (int i = 0; i < compressedData.length; i += chunkSize) -+ { -+ auto len = min(chunkSize, compressedData.length - i); -+ // simulate reading from a stream in small chunks -+ reusedBuf[0 .. len] = compressedData[i .. i + len]; -+ -+ // decompress using same input buffer -+ auto chunk = decompressor.uncompress(reusedBuf); -+ assert(progress + chunk.length <= originalData.length, -+ "The uncompressed result is bigger than the original data"); -+ -+ uncompressedData[progress .. progress + chunk.length] = cast(const ubyte[]) chunk[]; -+ progress += chunk.length; -+ } -+ -+ auto chunk = decompressor.flush(); -+ assert(progress + chunk.length <= originalData.length, -+ "The uncompressed result is bigger than the original data"); -+ -+ uncompressedData[progress .. progress + chunk.length] = cast(const ubyte[]) chunk[]; -+ progress += chunk.length; -+ -+ assert(progress == originalData.length, -+ "The uncompressed and the original data sizes differ"); -+ assert(originalData[] == uncompressedData[], -+ "The uncompressed and the original data differ"); -+ } -+ -+ @system unittest -+ { -+ ubyte[1024] invalidData; -+ auto decompressor = new UnCompress(); -+ -+ try -+ { -+ auto uncompressedData = decompressor.uncompress(invalidData); -+ } -+ catch (ZlibException e) -+ { -+ assert(e.msg == "data error"); -+ return; -+ } -+ -+ assert(false, "Corrupted data didn't result in an error"); -+ } -+ -+ @system unittest -+ { -+ ubyte[2014] originalData = void; -+ auto compressedData = compress(originalData, 9); -+ -+ auto decompressor = new UnCompress(); -+ auto uncompressedData = decompressor.uncompress(compressedData ~ cast(ubyte[]) "whatever"); -+ -+ assert(originalData.length == uncompressedData.length, -+ "The uncompressed and the original data sizes differ"); -+ assert(originalData[] == uncompressedData[], -+ "The uncompressed and the original data differ"); -+ assert(!decompressor.uncompress("whatever").length, -+ "Compression continued after the end"); -+ } -+ - /** - * Decompress and return any remaining data. - * The returned data should be appended to that returned by uncompress(). -@@ -626,49 +761,40 @@ class UnCompress - void[] flush() - in - { -- assert(!done); -+ assert(!done, "Buffer has been flushed before."); - } - out - { -- assert(done); -+ assert(done, "Flushing failed."); - } -- body -+ do - { -- import core.memory : GC; -- ubyte[] extra; -- ubyte[] destbuf; -- int err; -- - done = 1; -- if (!inited) -- return null; -+ return null; -+ } - -- L1: -- destbuf = new ubyte[zs.avail_in * 2 + 100]; -- zs.next_out = destbuf.ptr; -- zs.avail_out = to!uint(destbuf.length); -+ /// Returns true if all input data has been decompressed and no further data -+ /// can be decompressed (inflate() returned Z_STREAM_END) -+ @property bool empty() const -+ { -+ return inputEnded; -+ } - -- err = etc.c.zlib.inflate(&zs, Z_NO_FLUSH); -- if (err == Z_OK && zs.avail_out == 0) -- { -- extra ~= destbuf; -- goto L1; -- } -- if (err != Z_STREAM_END) -- { -- GC.free(destbuf.ptr); -- if (err == Z_OK) -- err = Z_BUF_ERROR; -- error(err); -- } -- destbuf = destbuf.ptr[0 .. zs.next_out - destbuf.ptr]; -- err = etc.c.zlib.inflateEnd(&zs); -- inited = 0; -- if (err) -- error(err); -- if (extra.length) -- destbuf = extra ~ destbuf; -- return destbuf; -+ /// -+ @system unittest -+ { -+ // some random data -+ ubyte[1024] originalData = void; -+ -+ // append garbage data (or don't, this works in both cases) -+ auto compressedData = cast(ubyte[]) compress(originalData) ~ cast(ubyte[]) "whatever"; -+ -+ auto decompressor = new UnCompress(); -+ auto uncompressedData = decompressor.uncompress(compressedData); -+ -+ assert(uncompressedData[] == originalData[], -+ "The uncompressed and the original data differ"); -+ assert(decompressor.empty, "The UnCompressor reports not being done"); - } - } - --- -2.31.1 - diff --git a/pat/gcc-alpine/0017-build-fix-CXXFLAGS_FOR_BUILD-passing.patch b/pat/gcc-alpine/0017-build-fix-CXXFLAGS_FOR_BUILD-passing.patch @@ -0,0 +1,21 @@ +From a547632f5c7caec4a164e8d5e5b568fb7a461365 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Fri, 21 Aug 2020 06:59:43 +0000 +Subject: [PATCH] build: fix CXXFLAGS_FOR_BUILD passing + +--- + Makefile.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile.in b/Makefile.in +index 593495e1650..b96f60e33e2 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -176,6 +176,7 @@ BUILD_EXPORTS = \ + # built for the build system to override those in BASE_FLAGS_TO_PASS. + EXTRA_BUILD_FLAGS = \ + CFLAGS="$(CFLAGS_FOR_BUILD)" \ ++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)" + + # This is the list of directories to built for the host system. diff --git a/pat/gcc-alpine/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch b/pat/gcc-alpine/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch @@ -1,51 +0,0 @@ -From 76c7eb27b9dfe96f2f1db4fa6f29ce28715ad2a4 Mon Sep 17 00:00:00 2001 -From: Ariadne Conill <ariadne@dereferenced.org> -Date: Fri, 21 Aug 2020 06:58:22 +0000 -Subject: [PATCH] dlang: fix fcntl on mips, add libucontext dep - ---- - libphobos/configure.tgt | 1 + - libphobos/libdruntime/core/sys/posix/fcntl.d | 15 +++++++++++++++ - 2 files changed, 16 insertions(+) - -diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt -index 94e42bf5509..73f2e4b7f01 100644 ---- a/libphobos/configure.tgt -+++ b/libphobos/configure.tgt -@@ -35,6 +35,7 @@ case "${target}" in - ;; - mips*-*-linux*) - LIBPHOBOS_SUPPORTED=yes -+ LIBDRUNTIME_NEEDS_UCONTEXT=yes - ;; - power*-*-linux*) - LIBPHOBOS_SUPPORTED=yes -diff --git a/libphobos/libdruntime/core/sys/posix/fcntl.d b/libphobos/libdruntime/core/sys/posix/fcntl.d -index 9febcff849b..cb34e2108bd 100644 ---- a/libphobos/libdruntime/core/sys/posix/fcntl.d -+++ b/libphobos/libdruntime/core/sys/posix/fcntl.d -@@ -870,6 +870,21 @@ else version (CRuntime_Musl) - F_SETLKW = 7, - } - } -+ else version (MIPS_Any) -+ { -+ enum -+ { -+ O_DIRECTORY = 0x010000, // octal 0200000 -+ O_NOFOLLOW = 0x020000, // octal 0400000 -+ O_DIRECT = 0x008000, // octal 0100000 -+ O_LARGEFILE = 0x002000, // octal 0020000 -+ O_TMPFILE = 0x410000, // octal 020200000 -+ -+ F_GETLK = 33, -+ F_SETLK = 34, -+ F_SETLKW = 35, -+ } -+ } - else - static assert(0, "Platform not supported"); - --- -2.31.1 - diff --git a/pat/gcc-alpine/0018-ada-fix-shared-linking.patch b/pat/gcc-alpine/0018-ada-fix-shared-linking.patch @@ -1,42 +0,0 @@ -From 95fee2cfb1a6a32b7e671861b58ee93978ba16b8 Mon Sep 17 00:00:00 2001 -From: Ariadne Conill <ariadne@dereferenced.org> -Date: Fri, 21 Aug 2020 06:59:16 +0000 -Subject: [PATCH] ada: fix shared linking - ---- - gcc/ada/link.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/gcc/ada/link.c b/gcc/ada/link.c -index 02c413a412f..f0e52a87d6e 100644 ---- a/gcc/ada/link.c -+++ b/gcc/ada/link.c -@@ -107,9 +107,9 @@ const char *__gnat_default_libgcc_subdir = "lib"; - || defined (__NetBSD__) || defined (__OpenBSD__) \ - || defined (__QNX__) - const char *__gnat_object_file_option = "-Wl,@"; --const char *__gnat_run_path_option = "-Wl,-rpath,"; --char __gnat_shared_libgnat_default = STATIC; --char __gnat_shared_libgcc_default = STATIC; -+const char *__gnat_run_path_option = ""; -+char __gnat_shared_libgnat_default = SHARED; -+char __gnat_shared_libgcc_default = SHARED; - int __gnat_link_max = 8192; - unsigned char __gnat_objlist_file_supported = 1; - const char *__gnat_object_library_extension = ".a"; -@@ -129,9 +129,9 @@ const char *__gnat_default_libgcc_subdir = "lib"; - - #elif defined (__linux__) || defined (__GLIBC__) - const char *__gnat_object_file_option = "-Wl,@"; --const char *__gnat_run_path_option = "-Wl,-rpath,"; --char __gnat_shared_libgnat_default = STATIC; --char __gnat_shared_libgcc_default = STATIC; -+const char *__gnat_run_path_option = ""; -+char __gnat_shared_libgnat_default = SHARED; -+char __gnat_shared_libgcc_default = SHARED; - int __gnat_link_max = 8192; - unsigned char __gnat_objlist_file_supported = 1; - const char *__gnat_object_library_extension = ".a"; --- -2.31.1 - diff --git a/pat/gcc-alpine/0018-add-fortify-headers-paths.patch b/pat/gcc-alpine/0018-add-fortify-headers-paths.patch @@ -0,0 +1,22 @@ +From 5bd37f8ee93a0fe1a3f841f48ed6626e7e0aa19d Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Fri, 21 Aug 2020 07:01:06 +0000 +Subject: [PATCH] add fortify-headers paths + +--- + gcc/config/linux.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/gcc/config/linux.h b/gcc/config/linux.h +index 74f70793d90..61b07f319f6 100644 +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -172,6 +172,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + + #ifdef NATIVE_SYSTEM_HEADER_DIR + #define INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 2 }, \ ++ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 0 }, \ + { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ + { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, + #else diff --git a/pat/gcc-alpine/0019-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch b/pat/gcc-alpine/0019-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch @@ -0,0 +1,28 @@ +From d2577dc78a1f159e5c41fd0b53e73fa0e264cb52 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Fri, 21 Aug 2020 07:03:00 +0000 +Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to + it unconditionally, as otherwise we get link failures if some objects are + -fstack-protector built and final link happens with -fno-stack-protector. + This seems to be the common case when bootstrapping gcc, the piepatches do + not seem to fully fix the crosstoolchain and bootstrap sequence wrt. + stack-protector flag usage. + +--- + gcc/gcc.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/gcc/gcc.cc b/gcc/gcc.cc +index cc99d0b7aa1..c60a75371f8 100644 +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -1004,8 +1004,7 @@ proper position among the other output files. */ + + #ifndef LINK_SSP_SPEC + #ifdef TARGET_LIBC_PROVIDES_SSP +-#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ +- "|fstack-protector-strong|fstack-protector-explicit:}" ++#define LINK_SSP_SPEC "-lssp_nonshared" + #else + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ + "|fstack-protector-strong|fstack-protector-explicit" \ diff --git a/pat/gcc-alpine/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch b/pat/gcc-alpine/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch @@ -1,24 +0,0 @@ -From aa0311c59892d7fbc4ffa9e2f0520391521cc4dd Mon Sep 17 00:00:00 2001 -From: Ariadne Conill <ariadne@dereferenced.org> -Date: Fri, 21 Aug 2020 06:59:43 +0000 -Subject: [PATCH] build: fix CXXFLAGS_FOR_BUILD passing - ---- - Makefile.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Makefile.in b/Makefile.in -index 36e369df6e7..63627db68cf 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -170,6 +170,7 @@ BUILD_EXPORTS = \ - # built for the build system to override those in BASE_FLAGS_TO_PASS. - EXTRA_BUILD_FLAGS = \ - CFLAGS="$(CFLAGS_FOR_BUILD)" \ -+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ - LDFLAGS="$(LDFLAGS_FOR_BUILD)" - - # This is the list of directories to built for the host system. --- -2.31.1 - diff --git a/pat/gcc-alpine/0020-add-fortify-headers-paths.patch b/pat/gcc-alpine/0020-add-fortify-headers-paths.patch @@ -1,25 +0,0 @@ -From 39e86416709d3d34f46da7cd7b8a3e5a8f0ff7cd Mon Sep 17 00:00:00 2001 -From: Ariadne Conill <ariadne@dereferenced.org> -Date: Fri, 21 Aug 2020 07:01:06 +0000 -Subject: [PATCH] add fortify-headers paths - ---- - gcc/config/linux.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/gcc/config/linux.h b/gcc/config/linux.h -index 95654bcdb5a..d88df8f154a 100644 ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -167,6 +167,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - - #ifdef NATIVE_SYSTEM_HEADER_DIR - #define INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 2 }, \ -+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 0 }, \ - { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ - { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, - #else --- -2.31.1 - diff --git a/pat/gcc-alpine/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch b/pat/gcc-alpine/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch @@ -1,31 +0,0 @@ -From c6b54651688cf062ae48ca3402d6d2e08b70ceed Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> -Date: Fri, 21 Aug 2020 07:03:00 +0000 -Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to - it unconditionally, as otherwise we get link failures if some objects are - -fstack-protector built and final link happens with -fno-stack-protector. - This seems to be the common case when bootstrapping gcc, the piepatches do - not seem to fully fix the crosstoolchain and bootstrap sequence wrt. - stack-protector flag usage. - ---- - gcc/gcc.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/gcc/gcc.c b/gcc/gcc.c -index daeb4d0c8ea..6920bec0fa0 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -894,8 +894,7 @@ proper position among the other output files. */ - - #ifndef LINK_SSP_SPEC - #ifdef TARGET_LIBC_PROVIDES_SSP --#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ -- "|fstack-protector-strong|fstack-protector-explicit:}" -+#define LINK_SSP_SPEC "-lssp_nonshared" - #else - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit" \ --- -2.31.1 - diff --git a/pat/gcc-alpine/0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch b/pat/gcc-alpine/0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch @@ -1,69 +0,0 @@ -From 4841bee243517cd52504f97ea934f44bc0c1fd5c Mon Sep 17 00:00:00 2001 -From: Ariadne Conill <ariadne@dereferenced.org> -Date: Fri, 21 Aug 2020 07:03:42 +0000 -Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when - linking libtsan. - ---- - gcc/gcc.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 6920bec0fa0..40e07354b3d 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -696,10 +696,10 @@ proper position among the other output files. */ - #define LIBASAN_SPEC STATIC_LIBASAN_LIBS - #elif defined(HAVE_LD_STATIC_DYNAMIC) - #define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \ -- " %{!static-libasan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \ -+ " %{!static-libasan:--push-state --no-as-needed}" \ - " -lasan " \ - " %{static-libasan:" LD_DYNAMIC_OPTION "}" \ -- " %{!static-libasan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ -+ " %{!static-libasan:--pop-state}" \ - STATIC_LIBASAN_LIBS - #else - #define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS -@@ -717,10 +717,10 @@ proper position among the other output files. */ - #define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS - #elif defined(HAVE_LD_STATIC_DYNAMIC) - #define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \ -- " %{!static-libtsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \ -+ " %{!static-libtsan:--push-state --no-as-needed}" \ - " -ltsan " \ - " %{static-libtsan:" LD_DYNAMIC_OPTION "}" \ -- " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ -+ " %{!static-libtsan:--pop-state}" \ - STATIC_LIBTSAN_LIBS - #else - #define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS -@@ -738,10 +738,10 @@ proper position among the other output files. */ - #define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS - #elif defined(HAVE_LD_STATIC_DYNAMIC) - #define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \ -- " %{!static-liblsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \ -+ " %{!static-liblsan:--push-state --no-as-needed}" \ - " -llsan " \ - " %{static-liblsan:" LD_DYNAMIC_OPTION "}" \ -- " %{!static-liblsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ -+ " %{!static-liblsan:--pop-state}" \ - STATIC_LIBLSAN_LIBS - #else - #define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS -@@ -757,10 +757,10 @@ proper position among the other output files. */ - " %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}" - #ifdef HAVE_LD_STATIC_DYNAMIC - #define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \ -- " %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \ -+ " %{!static-libubsan:--push-state --no-as-needed}" \ - " -lubsan " \ - " %{static-libubsan:" LD_DYNAMIC_OPTION "}" \ -- " %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ -+ " %{!static-libubsan:--pop-state}" \ - STATIC_LIBUBSAN_LIBS - #else - #define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS --- -2.31.1 - diff --git a/pat/gcc-alpine/0023-Pure-64-bit-MIPS.patch b/pat/gcc-alpine/0023-Pure-64-bit-MIPS.patch @@ -1,47 +0,0 @@ -From 720c0d7094d27b6cbfe9669c4f65e2021debcb07 Mon Sep 17 00:00:00 2001 -From: Nils Andreas Svee <me@lochnair.net> -Date: Thu, 21 Dec 2017 03:14:33 +0100 -Subject: [PATCH] Pure 64-bit MIPS - ---- - gcc/config/mips/mips.h | 8 ++++---- - gcc/config/mips/t-linux64 | 6 +++--- - 2 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h -index 3ce0c19a29a..b9920b49167 100644 ---- a/gcc/config/mips/mips.h -+++ b/gcc/config/mips/mips.h -@@ -3424,11 +3424,11 @@ struct GTY(()) machine_function { - /* If we are *not* using multilibs and the default ABI is not ABI_32 we - need to change these from /lib and /usr/lib. */ - #if MIPS_ABI_DEFAULT == ABI_N32 --#define STANDARD_STARTFILE_PREFIX_1 "/lib32/" --#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib32/" -+#define STANDARD_STARTFILE_PREFIX_1 "/lib/" -+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" - #elif MIPS_ABI_DEFAULT == ABI_64 --#define STANDARD_STARTFILE_PREFIX_1 "/lib64/" --#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib64/" -+#define STANDARD_STARTFILE_PREFIX_1 "/lib/" -+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" - #endif - - /* Load store bonding is not supported by micromips and fix_24k. The -diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64 -index ceb58d3b5f3..8116e23ebba 100644 ---- a/gcc/config/mips/t-linux64 -+++ b/gcc/config/mips/t-linux64 -@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64 - MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el) - MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) - MULTILIB_OSDIRNAMES = \ -- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ -- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ -- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) -+ ../lib \ -+ ../lib32 \ -+ ../lib --- -2.31.1 - diff --git a/pat/gcc-alpine/0024-use-pure-64-bit-configuration-where-appropriate.patch b/pat/gcc-alpine/0024-use-pure-64-bit-configuration-where-appropriate.patch @@ -1,121 +0,0 @@ -From c60bb23972769f687dcac689ddf00f88e46b8bb7 Mon Sep 17 00:00:00 2001 -From: Ariadne Conill <ariadne@dereferenced.org> -Date: Fri, 21 Aug 2020 07:04:40 +0000 -Subject: [PATCH] use pure 64-bit configuration where appropriate - ---- - gcc/config/aarch64/t-aarch64-linux | 2 +- - gcc/config/i386/t-linux64 | 4 ++-- - gcc/config/rs6000/t-linux | 6 ++++-- - gcc/config/rs6000/t-linux64 | 4 ++-- - gcc/config/rs6000/t-linux64bele | 4 ++-- - gcc/config/rs6000/t-linux64lebe | 4 ++-- - gcc/config/s390/t-linux64 | 4 ++-- - 7 files changed, 15 insertions(+), 13 deletions(-) - -diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux -index 83e59e33b85..6ec56fdf6a8 100644 ---- a/gcc/config/aarch64/t-aarch64-linux -+++ b/gcc/config/aarch64/t-aarch64-linux -@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm - LIB1ASMFUNCS = _aarch64_sync_cache_range - - AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) --MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) -+MULTILIB_OSDIRNAMES = mabi.lp64=../lib - MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) - - MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) -diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 -index 1171e218578..256f8c079ba 100644 ---- a/gcc/config/i386/t-linux64 -+++ b/gcc/config/i386/t-linux64 -@@ -33,6 +33,6 @@ - comma=, - MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) - MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) --MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) --MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) -+MULTILIB_OSDIRNAMES = m64=../lib -+MULTILIB_OSDIRNAMES+= m32=../lib32 - MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) -diff --git a/gcc/config/rs6000/t-linux b/gcc/config/rs6000/t-linux -index aeb7440c492..ab14c455d8d 100644 ---- a/gcc/config/rs6000/t-linux -+++ b/gcc/config/rs6000/t-linux -@@ -2,7 +2,8 @@ - # or soft-float. - ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float))) - ifneq (,$(findstring powerpc64,$(target))) --MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu) -+MULTILIB_OSDIRNAMES := m64=../lib -+MULTILIB_OSDIRNAMES += m32=../lib32 - else - MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu) - endif -@@ -10,7 +11,8 @@ ifneq (,$(findstring powerpcle,$(target))) - MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME)) - endif - ifneq (,$(findstring powerpc64le,$(target))) --MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES)) -+MULTILIB_OSDIRNAMES := m64=../lib -+MULTILIB_OSDIRNAMES += m32=../lib32 - endif - endif - -diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64 -index 264a7e27524..d1e460811cc 100644 ---- a/gcc/config/rs6000/t-linux64 -+++ b/gcc/config/rs6000/t-linux64 -@@ -28,8 +28,8 @@ - MULTILIB_OPTIONS := m64/m32 - MULTILIB_DIRNAMES := 64 32 - MULTILIB_EXTRA_OPTS := --MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) --MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) -+MULTILIB_OSDIRNAMES := m64=../lib -+MULTILIB_OSDIRNAMES += m32=../lib32 - - rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c - $(COMPILE) $< -diff --git a/gcc/config/rs6000/t-linux64bele b/gcc/config/rs6000/t-linux64bele -index 97c1ee6fb4d..08d72639cb6 100644 ---- a/gcc/config/rs6000/t-linux64bele -+++ b/gcc/config/rs6000/t-linux64bele -@@ -2,6 +2,6 @@ - - MULTILIB_OPTIONS += mlittle - MULTILIB_DIRNAMES += le --MULTILIB_OSDIRNAMES += $(subst =,.mlittle=,$(subst lible32,lib32le,$(subst lible64,lib64le,$(subst lib,lible,$(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES)))))) --MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mlittle%,$(MULTILIB_OSDIRNAMES))) -+MULTILIB_OSDIRNAMES = m64=../lib -+MULTILIB_OSDIRNAMES+= m32=../lib32 - MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN} -diff --git a/gcc/config/rs6000/t-linux64lebe b/gcc/config/rs6000/t-linux64lebe -index 2e63bdb9fc9..c6e1c5db65d 100644 ---- a/gcc/config/rs6000/t-linux64lebe -+++ b/gcc/config/rs6000/t-linux64lebe -@@ -2,6 +2,6 @@ - - MULTILIB_OPTIONS += mbig - MULTILIB_DIRNAMES += be --MULTILIB_OSDIRNAMES += $(subst =,.mbig=,$(subst libbe32,lib32be,$(subst libbe64,lib64be,$(subst lib,libbe,$(subst le-linux,-linux,$(MULTILIB_OSDIRNAMES)))))) --MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mbig%,$(MULTILIB_OSDIRNAMES))) -+MULTILIB_OSDIRNAMES := m64=../lib -+MULTILIB_OSDIRNAMES += m32=../lib32 - MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN} -diff --git a/gcc/config/s390/t-linux64 b/gcc/config/s390/t-linux64 -index cc6ab367072..7f498ee1cdc 100644 ---- a/gcc/config/s390/t-linux64 -+++ b/gcc/config/s390/t-linux64 -@@ -7,5 +7,5 @@ - - MULTILIB_OPTIONS = m64/m31 - MULTILIB_DIRNAMES = 64 32 --MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu) --MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu) -+MULTILIB_OSDIRNAMES = m64=../lib -+MULTILIB_OSDIRNAMES+= m32=../lib32 --- -2.31.1 - diff --git a/pat/gcc-alpine/0025-always-build-libgcc_eh.a.patch b/pat/gcc-alpine/0025-always-build-libgcc_eh.a.patch @@ -1,51 +0,0 @@ -From 00917df4274ea2fb33b08c963a97cf1b28f59dd3 Mon Sep 17 00:00:00 2001 -From: Ariadne Conill <ariadne@dereferenced.org> -Date: Fri, 21 Aug 2020 07:05:41 +0000 -Subject: [PATCH] always build libgcc_eh.a - -highly inspired by: - http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch ---- - libgcc/Makefile.in | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in -index 851e7657d07..99ec513a1a6 100644 ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -956,8 +956,9 @@ ifneq ($(LIBUNWIND),) - all: libunwind.a - endif - -+all: libgcc_eh.a - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1159,10 +1160,6 @@ install-libunwind: - install-shared: - $(mkinstalldirs) $(DESTDIR)$(inst_libdir) - -- $(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/ -- chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a -- $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a -- - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) -@@ -1179,6 +1176,10 @@ ifeq ($(enable_gcov),yes) - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a - endif - -+ $(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a -+ - parts="$(INSTALL_PARTS)"; \ - for file in $$parts; do \ - rm -f $(DESTDIR)$(inst_libdir)/$$file; \ --- -2.31.1 - diff --git a/pat/gcc-alpine/0025-x86_64-disable-multilib-support.patch b/pat/gcc-alpine/0025-x86_64-disable-multilib-support.patch @@ -0,0 +1,23 @@ +From bf63353ea679e0bbf2c2f17bb64c75ebd590c6e7 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Thu, 6 Jan 2022 03:14:54 +0000 +Subject: [PATCH] x86_64: disable multilib support + +multilib is not presently supported on Alpine GCC +--- + gcc/config/i386/t-linux64 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 +index 5526ad0e6cc..78866afab36 100644 +--- a/gcc/config/i386/t-linux64 ++++ b/gcc/config/i386/t-linux64 +@@ -33,6 +33,6 @@ + comma=, + MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) + MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) +-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) +-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) ++MULTILIB_OSDIRNAMES = m64=../lib ++MULTILIB_OSDIRNAMES+= m32=../lib32 + MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) diff --git a/pat/gcc-alpine/0026-ada-libgnarl-compatibility-for-musl.patch b/pat/gcc-alpine/0026-ada-libgnarl-compatibility-for-musl.patch @@ -1,133 +0,0 @@ -From: Ariadne Conill <ariadne@dereferenced.org> -From: Olsken (updated patches) -Date: Sat, 21 Aug 2021 08:51:52 +0000 -Subject: [PATCH] ada: libgnarl compatibility for musl - -diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads -index 2272f83d6..1d7845654 100644 ---- a/gcc/ada/libgnarl/s-osinte__linux.ads -+++ b/gcc/ada/libgnarl/s-osinte__linux.ads -@@ -401,12 +401,6 @@ package System.OS_Interface is - PTHREAD_RWLOCK_PREFER_WRITER_NP : constant := 1; - PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2; - -- function pthread_rwlockattr_setkind_np -- (attr : access pthread_rwlockattr_t; -- pref : int) return int; -- pragma Import -- (C, pthread_rwlockattr_setkind_np, "pthread_rwlockattr_setkind_np"); -- - function pthread_rwlock_init - (mutex : access pthread_rwlock_t; - attr : access pthread_rwlockattr_t) return int; -@@ -468,11 +462,6 @@ package System.OS_Interface is - protocol : int) return int; - pragma Import (C, pthread_mutexattr_setprotocol); - -- function pthread_mutexattr_setprioceiling -- (attr : access pthread_mutexattr_t; -- prioceiling : int) return int; -- pragma Import (C, pthread_mutexattr_setprioceiling); -- - type struct_sched_param is record - sched_priority : int; -- scheduling priority - end record; -diff --git a/gcc/ada/libgnarl/s-taprop__linux.adb b/gcc/ada/libgnarl/s-taprop__linux.adb -index 757a6cdfd..18e60e8d1 100644 ---- a/gcc/ada/libgnarl/s-taprop__linux.adb -+++ b/gcc/ada/libgnarl/s-taprop__linux.adb -@@ -198,9 +198,6 @@ package body System.Task_Primitives.Operations is - pragma Import - (C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup"); - -- function GNAT_has_cap_sys_nice return C.int; -- pragma Import -- (C, GNAT_has_cap_sys_nice, "__gnat_has_cap_sys_nice"); - -- We do not have pragma Linker_Options ("-lcap"); here, because this - -- library is not present on many Linux systems. 'libcap' is the Linux - -- "capabilities" library, called by __gnat_has_cap_sys_nice. -@@ -210,44 +207,6 @@ package body System.Task_Primitives.Operations is - -- Convert Ada priority to Linux priority. Priorities are 1 .. 99 on - -- GNU/Linux, so we map 0 .. 98 to 1 .. 99. - -- function Get_Ceiling_Support return Boolean; -- -- Get the value of the Ceiling_Support constant (see below). -- -- Note well: If this function or related code is modified, it should be -- -- tested by hand, because automated testing doesn't exercise it. -- -- ------------------------- -- -- Get_Ceiling_Support -- -- ------------------------- -- -- function Get_Ceiling_Support return Boolean is -- Ceiling_Support : Boolean := False; -- begin -- if Locking_Policy /= 'C' then -- return False; -- end if; -- -- declare -- function geteuid return Integer; -- pragma Import (C, geteuid, "geteuid"); -- Superuser : constant Boolean := geteuid = 0; -- Has_Cap : constant C.int := GNAT_has_cap_sys_nice; -- pragma Assert (Has_Cap in 0 | 1); -- begin -- Ceiling_Support := Superuser or else Has_Cap = 1; -- end; -- -- return Ceiling_Support; -- end Get_Ceiling_Support; -- -- pragma Warnings (Off, "non-preelaborable call not allowed*"); -- Ceiling_Support : constant Boolean := Get_Ceiling_Support; -- pragma Warnings (On, "non-preelaborable call not allowed*"); -- -- True if the locking policy is Ceiling_Locking, and the current process -- -- has permission to use this policy. The process has permission if it is -- -- running as 'root', or if the capability was set by the setcap command, -- -- as in "sudo /sbin/setcap cap_sys_nice=ep exe_file". If it doesn't have -- -- permission, then a request for Ceiling_Locking is ignored. -- - type RTS_Lock_Ptr is not null access all RTS_Lock; - - function Init_Mutex (L : RTS_Lock_Ptr; Prio : Any_Priority) return C.int; -@@ -344,7 +303,9 @@ package body System.Task_Primitives.Operations is - -- Init_Mutex -- - ---------------- - -+ pragma Warnings (Off, "formal parameter * is not referenced"); - function Init_Mutex (L : RTS_Lock_Ptr; Prio : Any_Priority) return C.int is -+ pragma Warnings (On, "formal parameter * is not referenced"); - Mutex_Attr : aliased pthread_mutexattr_t; - Result, Result_2 : C.int; - -@@ -356,16 +317,7 @@ package body System.Task_Primitives.Operations is - return Result; - end if; - -- if Ceiling_Support then -- Result := pthread_mutexattr_setprotocol -- (Mutex_Attr'Access, PTHREAD_PRIO_PROTECT); -- pragma Assert (Result = 0); -- -- Result := pthread_mutexattr_setprioceiling -- (Mutex_Attr'Access, Prio_To_Linux_Prio (Prio)); -- pragma Assert (Result = 0); -- -- elsif Locking_Policy = 'I' then -+ if Locking_Policy = 'I' then - Result := pthread_mutexattr_setprotocol - (Mutex_Attr'Access, PTHREAD_PRIO_INHERIT); - pragma Assert (Result = 0); -@@ -405,11 +357,6 @@ package body System.Task_Primitives.Operations is - Result := pthread_rwlockattr_init (RWlock_Attr'Access); - pragma Assert (Result = 0); - -- Result := pthread_rwlockattr_setkind_np -- (RWlock_Attr'Access, -- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); -- pragma Assert (Result = 0); -- - Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access); - - pragma Assert (Result in 0 | ENOMEM); diff --git a/pat/gcc-alpine/0027-ada-musl-support-fixes.patch b/pat/gcc-alpine/0027-ada-musl-support-fixes.patch @@ -1,223 +0,0 @@ -From 21692d89e7876dcaecea3e3c961c6504be4a83e9 Mon Sep 17 00:00:00 2001 -From: Ariadne Conill <ariadne@dereferenced.org> -Date: Fri, 21 Aug 2020 07:07:48 +0000 -Subject: [PATCH] ada: musl support fixes - ---- - gcc/ada/Makefile.rtl | 10 +++++----- - gcc/ada/adaint.c | 34 +++++++++++++++++++--------------- - gcc/ada/adaint.h | 10 ++++------ - gcc/ada/terminals.c | 8 ++++---- - 4 files changed, 32 insertions(+), 30 deletions(-) - -diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl -index 55ff9b0f3d5..0fadf4e4b79 100644 ---- a/gcc/ada/Makefile.rtl -+++ b/gcc/ada/Makefile.rtl -@@ -1533,7 +1533,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),) - s-intman.adb<libgnarl/s-intman__posix.adb \ - s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \ - $(TRASYM_DWARF_UNIX_PAIRS) \ -- s-tsmona.adb<libgnat/s-tsmona__linux.adb \ -+ s-tsmona.adb<libgnat/s-tsmona.adb \ - a-exetim.adb<libgnarl/a-exetim__posix.adb \ - a-exetim.ads<libgnarl/a-exetim__default.ads \ - s-linux.ads<libgnarl/s-linux.ads \ -@@ -2083,7 +2083,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),) - s-osinte.adb<libgnarl/s-osinte__posix.adb \ - s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \ - $(TRASYM_DWARF_UNIX_PAIRS) \ -- s-tsmona.adb<libgnat/s-tsmona__linux.adb \ -+ s-tsmona.adb<libgnat/s-tsmona.adb \ - $(ATOMICS_TARGET_PAIRS) \ - $(ATOMICS_BUILTINS_TARGET_PAIRS) \ - system.ads<libgnat/system-linux-ppc.ads -@@ -2112,7 +2112,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),) - endif - - # ARM linux, GNU eabi --ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),) -+ifeq ($(strip $(filter-out arm% linux-gnueabi% linux-musleabi% linux-muslgnueabi%,$(target_cpu) $(target_os))),) - LIBGNAT_TARGET_PAIRS = \ - a-intnam.ads<libgnarl/a-intnam__linux.ads \ - s-inmaop.adb<libgnarl/s-inmaop__posix.adb \ -@@ -2305,7 +2305,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),) - s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \ - s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \ - $(TRASYM_DWARF_UNIX_PAIRS) \ -- s-tsmona.adb<libgnat/s-tsmona__linux.adb \ -+ s-tsmona.adb<libgnat/s-tsmona.adb \ - $(ATOMICS_TARGET_PAIRS) \ - $(ATOMICS_BUILTINS_TARGET_PAIRS) \ - system.ads<libgnat/system-linux-ia64.ads -@@ -2401,7 +2401,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),) - s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \ - s-taspri.ads<libgnarl/s-taspri__posix.ads \ - $(TRASYM_DWARF_UNIX_PAIRS) \ -- s-tsmona.adb<libgnat/s-tsmona__linux.adb \ -+ s-tsmona.adb<libgnat/s-tsmona.adb \ - $(ATOMICS_TARGET_PAIRS) \ - $(X86_64_TARGET_PAIRS) \ - system.ads<libgnat/system-linux-x86.ads -diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c -index 595abf87d65..00858c24f53 100644 ---- a/gcc/ada/adaint.c -+++ b/gcc/ada/adaint.c -@@ -90,6 +90,11 @@ - #include <sys/param.h> - #include <sys/pstat.h> - #endif -+ -+#if defined (linux) -+#define _GNU_SOURCE 1 -+#include <sched.h> -+#endif - - #ifdef __PikeOS__ - #define __BSD_VISIBLE 1 -@@ -3308,7 +3313,6 @@ __gnat_lwp_self (void) - #endif - - #if defined (__linux__) --#include <sched.h> - - /* glibc versions earlier than 2.7 do not define the routines to handle - dynamically allocated CPU sets. For these targets, we use the static -@@ -3318,7 +3322,7 @@ __gnat_lwp_self (void) - - /* Dynamic cpu sets */ - --cpu_set_t * -+void * - __gnat_cpu_alloc (size_t count) - { - return CPU_ALLOC (count); -@@ -3331,33 +3335,33 @@ __gnat_cpu_alloc_size (size_t count) - } - - void --__gnat_cpu_free (cpu_set_t *set) -+__gnat_cpu_free (void *set) - { -- CPU_FREE (set); -+ CPU_FREE ((cpu_set_t *) set); - } - - void --__gnat_cpu_zero (size_t count, cpu_set_t *set) -+__gnat_cpu_zero (size_t count, void *set) - { -- CPU_ZERO_S (count, set); -+ CPU_ZERO_S (count, (cpu_set_t *) set); - } - - void --__gnat_cpu_set (int cpu, size_t count, cpu_set_t *set) -+__gnat_cpu_set (int cpu, size_t count, void *set) - { - /* Ada handles CPU numbers starting from 1, while C identifies the first - CPU by a 0, so we need to adjust. */ -- CPU_SET_S (cpu - 1, count, set); -+ CPU_SET_S (cpu - 1, count, (cpu_set_t *) set); - } - - #else /* !CPU_ALLOC */ - - /* Static cpu sets */ - --cpu_set_t * -+void * - __gnat_cpu_alloc (size_t count ATTRIBUTE_UNUSED) - { -- return (cpu_set_t *) xmalloc (sizeof (cpu_set_t)); -+ return xmalloc (sizeof (cpu_set_t)); - } - - size_t -@@ -3367,23 +3371,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED) - } - - void --__gnat_cpu_free (cpu_set_t *set) -+__gnat_cpu_free (void *set) - { - free (set); - } - - void --__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, cpu_set_t *set) -+__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, void *set) - { -- CPU_ZERO (set); -+ CPU_ZERO ((cpu_set_t *) set); - } - - void --__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, cpu_set_t *set) -+__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, void *set) - { - /* Ada handles CPU numbers starting from 1, while C identifies the first - CPU by a 0, so we need to adjust. */ -- CPU_SET (cpu - 1, set); -+ CPU_SET (cpu - 1, (cpu_set_t *) set); - } - #endif /* !CPU_ALLOC */ - #endif /* __linux__ */ -diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h -index 311e240dfcc..1c4d0050103 100644 ---- a/gcc/ada/adaint.h -+++ b/gcc/ada/adaint.h -@@ -316,13 +316,11 @@ extern void *__gnat_lwp_self (void); - - /* Routines for interface to required CPU set primitives */ - --#include <sched.h> -- --extern cpu_set_t *__gnat_cpu_alloc (size_t); -+extern void * __gnat_cpu_alloc (size_t); - extern size_t __gnat_cpu_alloc_size (size_t); --extern void __gnat_cpu_free (cpu_set_t *); --extern void __gnat_cpu_zero (size_t, cpu_set_t *); --extern void __gnat_cpu_set (int, size_t, cpu_set_t *); -+extern void __gnat_cpu_free (void *); -+extern void __gnat_cpu_zero (size_t, void *); -+extern void __gnat_cpu_set (int, size_t, void *); - #endif - - #if defined (_WIN32) -diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c -index af4417fab90..bab6bf3ca87 100644 ---- a/gcc/ada/terminals.c -+++ b/gcc/ada/terminals.c -@@ -1145,7 +1145,7 @@ __gnat_setup_winsize (void *desc, int rows, int columns) - /* POSIX does not specify how to open the master side of a terminal.Several - methods are available (system specific): - 1- using a cloning device (USE_CLONE_DEVICE) -- 2- getpt (USE_GETPT) -+ 2- posix_openpt (USE_POSIX_OPENPT) - 3- openpty (USE_OPENPTY) - - When using the cloning device method, the macro USE_CLONE_DEVICE should -@@ -1159,7 +1159,7 @@ __gnat_setup_winsize (void *desc, int rows, int columns) - #if defined (__APPLE__) || defined (BSD) - #define USE_OPENPTY - #elif defined (__linux__) --#define USE_GETPT -+#define USE_POSIX_OPENPT - #elif defined (__sun__) - #define USE_CLONE_DEVICE "/dev/ptmx" - #elif defined (_AIX) -@@ -1208,8 +1208,8 @@ allocate_pty_desc (pty_desc **desc) { - int master_fd = -1; - char *slave_name = NULL; - --#ifdef USE_GETPT -- master_fd = getpt (); -+#if defined(USE_POSIX_OPENPT) -+ master_fd = posix_openpt(O_RDWR | O_NOCTTY); - #elif defined (USE_OPENPTY) - status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL); - #elif defined (USE_CLONE_DEVICE) --- -2.31.1 - diff --git a/pat/gcc-alpine/0027-always-build-libgcc_eh.a.patch b/pat/gcc-alpine/0027-always-build-libgcc_eh.a.patch @@ -0,0 +1,48 @@ +From 51a35c0fa0e793c6a2c64ae1449c0cfd681d8f8a Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Fri, 21 Aug 2020 07:05:41 +0000 +Subject: [PATCH] always build libgcc_eh.a + +highly inspired by: + http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch +--- + libgcc/Makefile.in | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in +index 09b3ec8bc2e..c9ca58c64cc 100644 +--- a/libgcc/Makefile.in ++++ b/libgcc/Makefile.in +@@ -957,8 +957,9 @@ ifneq ($(LIBUNWIND),) + all: libunwind.a + endif + ++all: libgcc_eh.a + ifeq ($(enable_shared),yes) +-all: libgcc_eh.a libgcc_s$(SHLIB_EXT) ++all: libgcc_s$(SHLIB_EXT) + ifneq ($(LIBUNWIND),) + all: libunwind$(SHLIB_EXT) + libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) +@@ -1160,10 +1161,6 @@ install-libunwind: + install-shared: + $(mkinstalldirs) $(DESTDIR)$(inst_libdir) + +- $(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/ +- chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a +- $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a +- + $(subst @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_base_name@,libgcc_s,$(subst \ + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) +@@ -1180,6 +1177,10 @@ ifeq ($(enable_gcov),yes) + $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a + endif + ++ $(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/ ++ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a ++ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a ++ + parts="$(INSTALL_PARTS)"; \ + for file in $$parts; do \ + rm -f $(DESTDIR)$(inst_libdir)/$$file; \ diff --git a/pat/gcc-alpine/0029-ada-musl-support-fixes.patch b/pat/gcc-alpine/0029-ada-musl-support-fixes.patch @@ -0,0 +1,220 @@ +From 82addb1312f4f58a412a664228944009aa5cb569 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Fri, 21 Aug 2020 07:07:48 +0000 +Subject: [PATCH] ada: musl support fixes + +--- + gcc/ada/Makefile.rtl | 10 +++++----- + gcc/ada/adaint.c | 34 +++++++++++++++++++--------------- + gcc/ada/adaint.h | 10 ++++------ + gcc/ada/terminals.c | 8 ++++---- + 4 files changed, 32 insertions(+), 30 deletions(-) + +diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl +index aaf853e3a2a..e2dd3587ed5 100644 +--- a/gcc/ada/Makefile.rtl ++++ b/gcc/ada/Makefile.rtl +@@ -1633,7 +1633,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),) + s-intman.adb<libgnarl/s-intman__posix.adb \ + s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \ + $(TRASYM_DWARF_UNIX_PAIRS) \ +- s-tsmona.adb<libgnat/s-tsmona__linux.adb \ ++ s-tsmona.adb<libgnat/s-tsmona.adb \ + a-exetim.adb<libgnarl/a-exetim__posix.adb \ + a-exetim.ads<libgnarl/a-exetim__default.ads \ + s-linux.ads<libgnarl/s-linux.ads \ +@@ -2258,7 +2258,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),) + s-tasinf.adb<libgnarl/s-tasinf__linux.adb \ + s-taspri.ads<libgnarl/s-taspri__posix.ads \ + $(TRASYM_DWARF_UNIX_PAIRS) \ +- s-tsmona.adb<libgnat/s-tsmona__linux.adb \ ++ s-tsmona.adb<libgnat/s-tsmona.adb \ + $(ATOMICS_TARGET_PAIRS) \ + $(ATOMICS_BUILTINS_TARGET_PAIRS) \ + system.ads<libgnat/system-linux-ppc.ads +@@ -2289,7 +2289,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),) + endif + + # ARM linux, GNU eabi +-ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),) ++ifeq ($(strip $(filter-out arm% linux-gnueabi% linux-musleabi% linux-muslgnueabi%,$(target_cpu) $(target_os))),) + LIBGNAT_TARGET_PAIRS = \ + a-intnam.ads<libgnarl/a-intnam__linux.ads \ + s-inmaop.adb<libgnarl/s-inmaop__posix.adb \ +@@ -2504,7 +2504,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),) + s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \ + s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \ + $(TRASYM_DWARF_UNIX_PAIRS) \ +- s-tsmona.adb<libgnat/s-tsmona__linux.adb \ ++ s-tsmona.adb<libgnat/s-tsmona.adb \ + $(ATOMICS_TARGET_PAIRS) \ + $(ATOMICS_BUILTINS_TARGET_PAIRS) \ + $(GNATRTL_128BIT_PAIRS) \ +@@ -2608,7 +2608,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),) + s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \ + s-taspri.ads<libgnarl/s-taspri__posix.ads \ + $(TRASYM_DWARF_UNIX_PAIRS) \ +- s-tsmona.adb<libgnat/s-tsmona__linux.adb \ ++ s-tsmona.adb<libgnat/s-tsmona.adb \ + $(ATOMICS_TARGET_PAIRS) \ + $(X86_64_TARGET_PAIRS) \ + $(GNATRTL_128BIT_PAIRS) \ +diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c +index 591d033fbca..a485cbf15b9 100644 +--- a/gcc/ada/adaint.c ++++ b/gcc/ada/adaint.c +@@ -91,6 +91,11 @@ + #include <sys/param.h> + #include <sys/pstat.h> + #endif ++ ++#if defined (linux) || defined(__linux__) ++#define _GNU_SOURCE 1 ++#include <sched.h> ++#endif + + #ifdef __PikeOS__ + #define __BSD_VISIBLE 1 +@@ -3446,7 +3451,6 @@ __gnat_lwp_self (void) + #endif + + #if defined (__linux__) +-#include <sched.h> + + /* glibc versions earlier than 2.7 do not define the routines to handle + dynamically allocated CPU sets. For these targets, we use the static +@@ -3456,7 +3460,7 @@ __gnat_lwp_self (void) + + /* Dynamic cpu sets */ + +-cpu_set_t * ++void * + __gnat_cpu_alloc (size_t count) + { + return CPU_ALLOC (count); +@@ -3469,33 +3473,33 @@ __gnat_cpu_alloc_size (size_t count) + } + + void +-__gnat_cpu_free (cpu_set_t *set) ++__gnat_cpu_free (void *set) + { +- CPU_FREE (set); ++ CPU_FREE ((cpu_set_t *) set); + } + + void +-__gnat_cpu_zero (size_t count, cpu_set_t *set) ++__gnat_cpu_zero (size_t count, void *set) + { +- CPU_ZERO_S (count, set); ++ CPU_ZERO_S (count, (cpu_set_t *) set); + } + + void +-__gnat_cpu_set (int cpu, size_t count, cpu_set_t *set) ++__gnat_cpu_set (int cpu, size_t count, void *set) + { + /* Ada handles CPU numbers starting from 1, while C identifies the first + CPU by a 0, so we need to adjust. */ +- CPU_SET_S (cpu - 1, count, set); ++ CPU_SET_S (cpu - 1, count, (cpu_set_t *) set); + } + + #else /* !CPU_ALLOC */ + + /* Static cpu sets */ + +-cpu_set_t * ++void * + __gnat_cpu_alloc (size_t count ATTRIBUTE_UNUSED) + { +- return (cpu_set_t *) xmalloc (sizeof (cpu_set_t)); ++ return xmalloc (sizeof (cpu_set_t)); + } + + size_t +@@ -3505,23 +3509,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED) + } + + void +-__gnat_cpu_free (cpu_set_t *set) ++__gnat_cpu_free (void *set) + { + free (set); + } + + void +-__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, cpu_set_t *set) ++__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, void *set) + { +- CPU_ZERO (set); ++ CPU_ZERO ((cpu_set_t *) set); + } + + void +-__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, cpu_set_t *set) ++__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, void *set) + { + /* Ada handles CPU numbers starting from 1, while C identifies the first + CPU by a 0, so we need to adjust. */ +- CPU_SET (cpu - 1, set); ++ CPU_SET (cpu - 1, (cpu_set_t *) set); + } + #endif /* !CPU_ALLOC */ + #endif /* __linux__ */ +diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h +index 2631be5ad3e..d442f4bd6cd 100644 +--- a/gcc/ada/adaint.h ++++ b/gcc/ada/adaint.h +@@ -321,13 +321,11 @@ extern void *__gnat_lwp_self (void); + + /* Routines for interface to required CPU set primitives */ + +-#include <sched.h> +- +-extern cpu_set_t *__gnat_cpu_alloc (size_t); ++extern void * __gnat_cpu_alloc (size_t); + extern size_t __gnat_cpu_alloc_size (size_t); +-extern void __gnat_cpu_free (cpu_set_t *); +-extern void __gnat_cpu_zero (size_t, cpu_set_t *); +-extern void __gnat_cpu_set (int, size_t, cpu_set_t *); ++extern void __gnat_cpu_free (void *); ++extern void __gnat_cpu_zero (size_t, void *); ++extern void __gnat_cpu_set (int, size_t, void *); + #endif + + #if defined (_WIN32) +diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c +index 32d30a49c7e..d960e32e2d0 100644 +--- a/gcc/ada/terminals.c ++++ b/gcc/ada/terminals.c +@@ -1132,7 +1132,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED, + /* POSIX does not specify how to open the master side of a terminal.Several + methods are available (system specific): + 1- using a cloning device (USE_CLONE_DEVICE) +- 2- getpt (USE_GETPT) ++ 2- posix_openpt (USE_POSIX_OPENPT) + 3- openpty (USE_OPENPTY) + + When using the cloning device method, the macro USE_CLONE_DEVICE should +@@ -1146,7 +1146,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED, + #if defined (__APPLE__) || defined (BSD) + #define USE_OPENPTY + #elif defined (__linux__) +-#define USE_GETPT ++#define USE_POSIX_OPENPT + #elif defined (__sun__) + #define USE_CLONE_DEVICE "/dev/ptmx" + #elif defined (_AIX) +@@ -1195,8 +1195,8 @@ allocate_pty_desc (pty_desc **desc) { + int master_fd = -1; + char *slave_name = NULL; + +-#ifdef USE_GETPT +- master_fd = getpt (); ++#if defined(USE_POSIX_OPENPT) ++ master_fd = posix_openpt(O_RDWR | O_NOCTTY); + #elif defined (USE_OPENPTY) + status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL); + #elif defined (USE_CLONE_DEVICE) diff --git a/pat/gcc-alpine/0029-gcc-go-Don-t-include-sys-user.h.patch b/pat/gcc-alpine/0029-gcc-go-Don-t-include-sys-user.h.patch @@ -1,30 +0,0 @@ -From 40322de36043aaa3cbb98d7f01037f53fc1b5a98 Mon Sep 17 00:00:00 2001 -From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> -Date: Sun, 30 Aug 2020 17:58:21 +0200 -Subject: [PATCH] gcc-go: Don't include sys/user.h -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Taken from Adélie Linux. ---- - libgo/sysinfo.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c -index 0692fd41eb7..c8d987358d9 100644 ---- a/libgo/sysinfo.c -+++ b/libgo/sysinfo.c -@@ -73,9 +73,6 @@ - #include <sys/times.h> - #include <sys/wait.h> - #include <sys/un.h> --#if defined(HAVE_SYS_USER_H) --#include <sys/user.h> --#endif - #if defined(HAVE_SYS_UTSNAME_H) - #include <sys/utsname.h> - #endif --- -2.31.1 - diff --git a/pat/gcc-alpine/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch b/pat/gcc-alpine/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch @@ -1,29 +0,0 @@ -From f1503cf97b5a5c6f9466145f5eb1ed3b5f200119 Mon Sep 17 00:00:00 2001 -From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> -Date: Sun, 30 Aug 2020 17:59:22 +0200 -Subject: [PATCH] gcc-go: Fix ucontext_t on PPC64 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Taken from Adélie Linux. ---- - libgo/runtime/go-signal.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c -index b429fdb2403..fd1c885f043 100644 ---- a/libgo/runtime/go-signal.c -+++ b/libgo/runtime/go-signal.c -@@ -224,7 +224,7 @@ getSiginfo(siginfo_t *info, void *context __attribute__((unused))) - #elif defined(__alpha__) && defined(__linux__) - ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.sc_pc; - #elif defined(__PPC__) && defined(__linux__) -- ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip; -+ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32]; - #elif defined(__PPC__) && defined(_AIX) - ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.jmp_context.iar; - #elif defined(__aarch64__) && defined(__linux__) --- -2.31.1 - diff --git a/pat/gcc-alpine/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch b/pat/gcc-alpine/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch @@ -1,43 +0,0 @@ -From fc950e32b9ebc2bae09604ebe630df6df454151d Mon Sep 17 00:00:00 2001 -From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> -Date: Sun, 30 Aug 2020 17:59:45 +0200 -Subject: [PATCH] gcc-go: Fix handling of signal 34 on musl -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Taken from Adélie Linux. ---- - libgo/mksigtab.sh | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/libgo/mksigtab.sh b/libgo/mksigtab.sh -index 11e4ec436bd..fe866eacb27 100644 ---- a/libgo/mksigtab.sh -+++ b/libgo/mksigtab.sh -@@ -82,7 +82,7 @@ checksig _SIGPWR '{_SigNotify, "SIGPWR: power failure restart"}' - checksig _SIGEMT '{_SigThrow, "SIGEMT: emulate instruction executed"}' - checksig _SIGINFO '{_SigNotify, "SIGINFO: status request from keyboard"}' - checksig _SIGTHR '{_SigNotify, "SIGTHR: reserved"}' --checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}' -+#checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}' - checksig _SIGWAITING '{_SigNotify, "SIGWAITING: reserved signal no longer used by"}' - checksig _SIGLWP '{_SigNotify, "SIGLWP: reserved signal no longer used by"}' - checksig _SIGFREEZE '{_SigNotify, "SIGFREEZE: special signal used by CPR"}' -@@ -95,10 +95,12 @@ checksig _SIGLOST ' {_SigNotify, "SIGLOST: resource lost (Sun); server died (G - - # Special handling of signals 32 and 33 on GNU/Linux systems, - # because they are special to glibc. -+# Signal 34 is additionally special to Linux systems with musl. - if test "${GOOS}" = "linux"; then -- SIGLIST=$SIGLIST"_32__33_" -+ SIGLIST=$SIGLIST"_32__33__34_" - echo ' 32: {_SigSetStack + _SigUnblock, "signal 32"}, /* SIGCANCEL; see issue 6997 */' - echo ' 33: {_SigSetStack + _SigUnblock, "signal 33"}, /* SIGSETXID; see issues 3871, 9400, 12498 */' -+ echo ' 34: {_SigSetStack + _SigUnblock, "signal 34"}, /* see issue 30062 */' - fi - - if test "${GOOS}" = "aix"; then --- -2.31.1 - diff --git a/pat/gcc-alpine/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch b/pat/gcc-alpine/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch @@ -1,38 +0,0 @@ -From 3be2284d92c560204e9eddb20db56d57fe584360 Mon Sep 17 00:00:00 2001 -From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> -Date: Sun, 30 Aug 2020 18:01:03 +0200 -Subject: [PATCH] gcc-go: Use int64 type as offset argument for mmap -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Taken from Adélie Linux. ---- - libgo/go/runtime/mem_gccgo.go | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libgo/go/runtime/mem_gccgo.go b/libgo/go/runtime/mem_gccgo.go -index ba38ebaa9ab..3c9e5ce9461 100644 ---- a/libgo/go/runtime/mem_gccgo.go -+++ b/libgo/go/runtime/mem_gccgo.go -@@ -15,7 +15,7 @@ import ( - //go:linkname sysFree - - //extern mmap --func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) unsafe.Pointer -+func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) unsafe.Pointer - - //extern munmap - func munmap(addr unsafe.Pointer, length uintptr) int32 -@@ -37,7 +37,7 @@ func init() { - } - } - --func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (unsafe.Pointer, int) { -+func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) (unsafe.Pointer, int) { - p := sysMmap(addr, n, prot, flags, fd, off) - if uintptr(p) == _MAP_FAILED { - return nil, errno() --- -2.31.1 - diff --git a/pat/gcc-alpine/0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch b/pat/gcc-alpine/0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch @@ -1,24 +0,0 @@ -From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> -From: Olsken (updated patches) -Date: Sat, 21 Aug 2021 08:51:52 +0000 -Subject: [PATCH] gcc-go: Fix st_{a,m,c}tim fields in generated sysinfo.go - -There are more than one st_{a,m,c}tim fields in struct stat on time64 machines. - -Run the Go-isation on all of them. - -Taken from Adélie Linux. - -diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh -index 0c52ea5d7..6fef104cc 100755 ---- a/libgo/mksysinfo.sh -+++ b/libgo/mksysinfo.sh -@@ -510,7 +510,7 @@ fi - - # For historical reasons Go uses the suffix "timespec" instead of "tim" for - # stat_t's time fields on NetBSD. --st_times='-e s/st_atim/Atim/ -e s/st_mtim/Mtim/ -e s/st_ctim/Ctim/' -+st_times='-e s/st_atim/Atim/g -e s/st_mtim/Mtim/g -e s/st_ctim/Ctim/g' - if test "${GOOS}" = "netbsd"; then - st_times='-e s/st_atim/Atimespec/ -e s/st_mtim/Mtimespec/ -e s/st_ctim/Ctimespec/' - fi diff --git a/pat/gcc-alpine/0033-gcc-go-link-to-libucontext.patch b/pat/gcc-alpine/0033-gcc-go-link-to-libucontext.patch @@ -0,0 +1,101 @@ +From ecc2a2e70e44fa76a75b12d0893bc1702b72a1b4 Mon Sep 17 00:00:00 2001 +From: Ian Lance Taylor <iant@golang.org> +Date: Mon, 19 Dec 2022 10:37:06 -0800 +Subject: [PATCH] libgo: check for makecontext in -lucontext +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Patch from Sören Tempel. + +Change-Id: I74b4052cc7aca19224afd6d9a2739c3fae46b722 +Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/458396 +Reviewed-by: Cherry Mui <cherryyz@google.com> +Reviewed-by: Than McIntosh <thanm@google.com> +--- + libgo/configure | 57 ++++++++++++++++++++++++++++++++++++++++++++++ + libgo/configure.ac | 3 +++ + 2 files changed, 60 insertions(+) + +diff --git a/libgo/configure b/libgo/configure +index 460fdad7..a607dbff 100755 +--- a/libgo/configure ++++ b/libgo/configure +@@ -14818,6 +14818,63 @@ fi + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing makecontext" >&5 ++$as_echo_n "checking for library containing makecontext... " >&6; } ++if ${ac_cv_search_makecontext+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ac_func_search_save_LIBS=$LIBS ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char makecontext (); ++int ++main () ++{ ++return makecontext (); ++ ; ++ return 0; ++} ++_ACEOF ++for ac_lib in '' ucontext; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_search_makecontext=$ac_res ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_makecontext+:} false; then : ++ break ++fi ++done ++if ${ac_cv_search_makecontext+:} false; then : ++ ++else ++ ac_cv_search_makecontext=no ++fi ++rm conftest.$ac_ext ++LIBS=$ac_func_search_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_makecontext" >&5 ++$as_echo "$ac_cv_search_makecontext" >&6; } ++ac_res=$ac_cv_search_makecontext ++if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ++ ++fi ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5 + $as_echo_n "checking for library containing sched_yield... " >&6; } + if ${ac_cv_search_sched_yield+:} false; then : +diff --git a/libgo/configure.ac b/libgo/configure.ac +index 09554a37..a59aa091 100644 +--- a/libgo/configure.ac ++++ b/libgo/configure.ac +@@ -570,6 +570,9 @@ PTHREAD_LIBS= + AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS=-lpthread) + AC_SUBST(PTHREAD_LIBS) + ++dnl Test if -lucontext is required for makecontext. ++AC_SEARCH_LIBS([makecontext], [ucontext]) ++ + dnl Test if -lrt is required for sched_yield or nanosleep or clock_gettime. + AC_SEARCH_LIBS([sched_yield], [rt]) + AC_SEARCH_LIBS([nanosleep], [rt]) diff --git a/pat/gcc-alpine/0034-Use-generic-errstr.go-implementation-on-musl.patch b/pat/gcc-alpine/0034-Use-generic-errstr.go-implementation-on-musl.patch @@ -0,0 +1,204 @@ +From b3840bdcc0eee2a4d099a9af52199944ade7acb9 Mon Sep 17 00:00:00 2001 +From: Ian Lance Taylor <iant@golang.org> +Date: Tue, 29 Nov 2022 17:28:44 -0800 +Subject: [PATCH] syscall, runtime: always call XSI strerror_r +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This does the right thing for either glibc or musl on GNU/Linux. + +Based on patch by Sören Tempel. + +Change-Id: If2969e131f0fae456d58b35d839d8abe191fcc59 +Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/454176 +Reviewed-by: Cherry Mui <cherryyz@google.com> +Reviewed-by: Ian Lance Taylor <iant@google.com> +TryBot-Bypass: Ian Lance Taylor <iant@google.com> +--- + libgo/Makefile.am | 1 + + libgo/Makefile.in | 6 +++++- + libgo/go/syscall/errstr.go | 22 ++++++++----------- + libgo/go/syscall/errstr_glibc.go | 33 ---------------------------- + libgo/runtime/go-strerror.c | 37 ++++++++++++++++++++++++++++++++ + 5 files changed, 52 insertions(+), 47 deletions(-) + delete mode 100644 libgo/go/syscall/errstr_glibc.go + create mode 100644 libgo/runtime/go-strerror.c + +diff --git a/libgo/Makefile.am b/libgo/Makefile.am +index e0a1eec5..df568743 100644 +--- a/libgo/Makefile.am ++++ b/libgo/Makefile.am +@@ -465,6 +465,7 @@ runtime_files = \ + runtime/go-nanotime.c \ + runtime/go-now.c \ + runtime/go-nosys.c \ ++ runtime/go-strerror.c \ + runtime/go-reflect-call.c \ + runtime/go-setenv.c \ + runtime/go-signal.c \ +diff --git a/libgo/Makefile.in b/libgo/Makefile.in +index 7bef5df9..f2f3f0fc 100644 +--- a/libgo/Makefile.in ++++ b/libgo/Makefile.in +@@ -247,7 +247,7 @@ am__objects_4 = runtime/aeshash.lo runtime/go-assert.lo \ + runtime/go-fieldtrack.lo runtime/go-matherr.lo \ + runtime/go-memclr.lo runtime/go-memmove.lo \ + runtime/go-memequal.lo runtime/go-nanotime.lo \ +- runtime/go-now.lo runtime/go-nosys.lo \ ++ runtime/go-now.lo runtime/go-nosys.lo runtime/go-strerror.lo \ + runtime/go-reflect-call.lo runtime/go-setenv.lo \ + runtime/go-signal.lo runtime/go-unsafe-pointer.lo \ + runtime/go-unsetenv.lo runtime/go-unwind.lo \ +@@ -917,6 +917,7 @@ runtime_files = \ + runtime/go-nanotime.c \ + runtime/go-now.c \ + runtime/go-nosys.c \ ++ runtime/go-strerror.c \ + runtime/go-reflect-call.c \ + runtime/go-setenv.c \ + runtime/go-signal.c \ +@@ -1390,6 +1391,8 @@ runtime/go-now.lo: runtime/$(am__dirstamp) \ + runtime/$(DEPDIR)/$(am__dirstamp) + runtime/go-nosys.lo: runtime/$(am__dirstamp) \ + runtime/$(DEPDIR)/$(am__dirstamp) ++runtime/go-strerror.lo: runtime/$(am__dirstamp) \ ++ runtime/$(DEPDIR)/$(am__dirstamp) + runtime/go-reflect-call.lo: runtime/$(am__dirstamp) \ + runtime/$(DEPDIR)/$(am__dirstamp) + runtime/go-setenv.lo: runtime/$(am__dirstamp) \ +@@ -1457,6 +1460,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-reflect-call.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-setenv.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-signal.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-strerror.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unsafe-pointer.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unsetenv.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unwind.Plo@am__quote@ +diff --git a/libgo/go/syscall/errstr.go b/libgo/go/syscall/errstr.go +index 6c2441d3..9f688e2a 100644 +--- a/libgo/go/syscall/errstr.go ++++ b/libgo/go/syscall/errstr.go +@@ -4,23 +4,19 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-// +build !hurd +-// +build !linux +- + package syscall + +-//sysnb strerror_r(errnum int, buf []byte) (err Errno) +-//strerror_r(errnum _C_int, buf *byte, buflen Size_t) _C_int ++import "internal/bytealg" ++ ++//extern go_strerror ++func go_strerror(_C_int, *byte, Size_t) _C_int + + func Errstr(errnum int) string { +- for len := 128; ; len *= 2 { +- b := make([]byte, len) +- errno := strerror_r(errnum, b) ++ for size := 128; ; size *= 2 { ++ b := make([]byte, size) ++ errno := go_strerror(_C_int(errnum), &b[0], Size_t(len(b))) + if errno == 0 { +- i := 0 +- for b[i] != 0 { +- i++ +- } ++ i := bytealg.IndexByte(b, 0) + // Lowercase first letter: Bad -> bad, but + // STREAM -> STREAM. + if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' { +@@ -29,7 +25,7 @@ func Errstr(errnum int) string { + return string(b[:i]) + } + if errno != ERANGE { +- return "errstr failure" ++ return "strerror_r failure" + } + } + } +diff --git a/libgo/go/syscall/errstr_glibc.go b/libgo/go/syscall/errstr_glibc.go +deleted file mode 100644 +index 5b19e6f2..00000000 +--- a/libgo/go/syscall/errstr_glibc.go ++++ /dev/null +@@ -1,33 +0,0 @@ +-// errstr_glibc.go -- GNU/Linux and GNU/Hurd specific error strings. +- +-// Copyright 2010 The Go Authors. All rights reserved. +-// Use of this source code is governed by a BSD-style +-// license that can be found in the LICENSE file. +- +-// We use this rather than errstr.go because on GNU/Linux sterror_r +-// returns a pointer to the error message, and may not use buf at all. +- +-// +build hurd linux +- +-package syscall +- +-import "unsafe" +- +-//sysnb strerror_r(errnum int, b []byte) (errstr *byte) +-//strerror_r(errnum _C_int, b *byte, len Size_t) *byte +- +-func Errstr(errnum int) string { +- a := make([]byte, 128) +- p := strerror_r(errnum, a) +- b := (*[1000]byte)(unsafe.Pointer(p)) +- i := 0 +- for b[i] != 0 { +- i++ +- } +- // Lowercase first letter: Bad -> bad, but STREAM -> STREAM. +- if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' { +- c := b[0] + 'a' - 'A' +- return string(c) + string(b[1:i]) +- } +- return string(b[:i]) +-} +diff --git a/libgo/runtime/go-strerror.c b/libgo/runtime/go-strerror.c +new file mode 100644 +index 00000000..13d1d91d +--- /dev/null ++++ b/libgo/runtime/go-strerror.c +@@ -0,0 +1,37 @@ ++/* go-strerror.c -- wrapper around XSI-compliant strerror_r. ++ ++ Copyright 2022 The Go Authors. All rights reserved. ++ Use of this source code is governed by a BSD-style ++ license that can be found in the LICENSE file. */ ++ ++/* There are two version of strerror_r on GNU/Linux: a GNU-specific ++ and an XSI-compliant version. The former version is only available ++ on glibc. Since glibc 2.13, the XSI-compliant version is also ++ provided by glibc if _GNU_SOURCE is not defined. Since the ++ entirety of gofrontend is compiled with _GNU_SOURCE, this file ++ exists to selectively undefine it and provides an alias to the ++ XSI-compliant version of strerror_r(3). */ ++ ++#ifdef __linux__ ++ ++/* Force selection of XSI-compliant strerror_r by glibc. */ ++#undef XOPEN_SOURCE ++#define XOPEN_SOURCE 600 ++#undef _POSIX_C_SOURCE ++#define _POSIX_C_SOURCE 200112L ++#undef _GNU_SOURCE ++ ++#endif /* __linux__ */ ++ ++#include <string.h> ++ ++#ifndef HAVE_STRERROR_R ++// Provided by go-nosys.c if not provided by libc itself. ++extern int strerror_r (int, char *, size_t); ++#endif ++ ++int ++go_strerror (int errnum, char *buf, size_t buflen) ++{ ++ return strerror_r (errnum, buf, buflen); ++} diff --git a/pat/gcc-alpine/0034-gcc-go-signal-34-is-special-on-musl-libc.patch b/pat/gcc-alpine/0034-gcc-go-signal-34-is-special-on-musl-libc.patch @@ -1,29 +0,0 @@ -From dd1465b56f76ada5c7383ebd98ef02311a3b907c Mon Sep 17 00:00:00 2001 -From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> -Date: Sun, 30 Aug 2020 18:03:03 +0200 -Subject: [PATCH] gcc-go: signal 34 is special on musl libc -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Taken from Adélie Linux. ---- - libgo/go/runtime/signal_gccgo.go | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libgo/go/runtime/signal_gccgo.go b/libgo/go/runtime/signal_gccgo.go -index c555712a03c..9e228580d37 100644 ---- a/libgo/go/runtime/signal_gccgo.go -+++ b/libgo/go/runtime/signal_gccgo.go -@@ -106,7 +106,7 @@ func getsig(i uint32) uintptr { - if sigaction(i, nil, &sa) < 0 { - // On GNU/Linux glibc rejects attempts to call - // sigaction with signal 32 (SIGCANCEL) or 33 (SIGSETXID). -- if GOOS == "linux" && (i == 32 || i == 33) { -+ if GOOS == "linux" && (i == 32 || i == 33 || i == 34) { - return _SIG_DFL - } - throw("sigaction read failure") --- -2.31.1 - diff --git a/pat/gcc-alpine/0035-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch b/pat/gcc-alpine/0035-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch @@ -0,0 +1,263 @@ +From 573a66e4146c9a65d895af9081a4d3d49cfc9e7a Mon Sep 17 00:00:00 2001 +From: Drew DeVault <sir@cmpwn.com> +Date: Wed, 9 Dec 2020 16:07:26 +0000 +Subject: [PATCH] configure: Add --enable-autolink-libatomic, use in + LINK_GCC_C_SEQUENCE_SPEC [PR81358] + +This fixes issues with RISC-V. +--- + Makefile.in | 1 + + gcc/config.in | 6 ++++++ + gcc/config/gnu-user.h | 12 +++++++++++- + gcc/configure | 32 ++++++++++++++++++++++++++++++-- + gcc/configure.ac | 22 +++++++++++++++++++++- + gcc/doc/install.texi | 8 ++++++++ + gcc/doc/tm.texi | 8 +++++++- + gcc/doc/tm.texi.in | 8 +++++++- + gcc/gcc.cc | 12 +++++++++++- + 9 files changed, 102 insertions(+), 7 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index b564ddbf792..a95c7407d16 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -232,6 +232,7 @@ HOST_EXPORTS = \ + RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \ + READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \ + TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ ++ TARGET_CONFIGDIRS="$(TARGET_CONFIGDIRS)"; export TARGET_CONFIGDIRS; \ + HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \ + GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \ + GMPINC="$(HOST_GMPINC)"; export GMPINC; \ +diff --git a/gcc/config.in b/gcc/config.in +index f0fbf123aa8..af84efc4f9e 100644 +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -118,6 +118,12 @@ + #endif + + ++/* Define if libatomic should always be linked. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_AUTOLINK_LIBATOMIC ++#endif ++ ++ + /* Define to 1 to specify that we are using the BID decimal floating point + format instead of DPD */ + #ifndef USED_FOR_TARGET +diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h +index 8433e56c3e1..0347f10da8b 100644 +--- a/gcc/config/gnu-user.h ++++ b/gcc/config/gnu-user.h +@@ -109,8 +109,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} " + #endif + ++#if !defined(LINK_LIBATOMIC_SPEC) && defined(ENABLE_AUTOLINK_LIBATOMIC) ++# ifdef LD_AS_NEEDED_OPTION ++# define LINK_LIBATOMIC_SPEC LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION ++# else ++# define LINK_LIBATOMIC_SPEC "-latomic" ++# endif ++#elif !defined(LINK_LIBATOMIC_SPEC) ++# define LINK_LIBATOMIC_SPEC "" ++#endif ++ + #define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \ +- "%{static|static-pie:--start-group} %G %{!nolibc:%L} \ ++ "%{static|static-pie:--start-group} %G %{!nolibc:" LINK_LIBATOMIC_SPEC " %L} \ + %{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}" + + #undef LINK_GCC_C_SEQUENCE_SPEC +diff --git a/gcc/configure b/gcc/configure +index 2f6b3265a6c..6dc65bf4ccb 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -981,6 +981,7 @@ with_changes_root_url + enable_languages + with_multilib_list + with_multilib_generator ++enable_autolink_libatomic + with_zstd + with_zstd_include + with_zstd_lib +@@ -1710,6 +1711,9 @@ Optional Features: + --disable-shared don't provide a shared libgcc + --disable-gcov don't provide libgcov and related host tools + --enable-languages=LIST specify which front-ends to build ++ --enable-autolink-libatomic ++ enable automatic linking of libatomic (ignored if ++ not built) + --disable-rpath do not hardcode runtime library paths + --enable-sjlj-exceptions + arrange to use setjmp/longjmp exception handling +@@ -8324,7 +8328,6 @@ else + fi + + +- + # Check whether --with-multilib-generator was given. + if test "${with_multilib_generator+set}" = set; then : + withval=$with_multilib_generator; : +@@ -8332,6 +8335,32 @@ else + with_multilib_generator=default + fi + ++# If libatomic is available, whether it should be linked automatically ++# Check whether --enable-autolink-libatomic was given. ++if test "${enable_autolink_libatomic+set}" = set; then : ++ enableval=$enable_autolink_libatomic; ++ case $enable_autolink_libatomic in ++ yes | no) ;; ++ *) as_fn_error $? "'$enable_autolink_libatomic' is an invalid value for ++--enable-autolink-libatomic. Valid choices are 'yes' and 'no'." "$LINENO" 5 ;; ++ esac ++ ++else ++ enable_autolink_libatomic='' ++fi ++ ++ ++if test x$enable_autolink_libatomic = xyes; then ++ if echo " ${TARGET_CONFIGDIRS} " | grep " libatomic " > /dev/null 2>&1 ; then ++ ++$as_echo "#define ENABLE_AUTOLINK_LIBATOMIC 1" >>confdefs.h ++ ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libatomic is not build for this target, --enable-autolink-libatomic ignored" >&5 ++$as_echo "$as_me: WARNING: libatomic is not build for this target, --enable-autolink-libatomic ignored" >&2;} ++ fi ++fi ++ + + # ------------------------- + # Checks for other programs +@@ -34296,4 +34325,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + fi + +- +diff --git a/gcc/configure.ac b/gcc/configure.ac +index e683d3a7a5f..07c81c78336 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1205,6 +1205,27 @@ AC_ARG_WITH(multilib-generator, + :, + with_multilib_generator=default) + ++# If libatomic is available, whether it should be linked automatically ++AC_ARG_ENABLE(autolink-libatomic, ++[AS_HELP_STRING([--enable-autolink-libatomic], ++ [enable automatic linking of libatomic (ignored if not built)])], ++[ ++ case $enable_autolink_libatomic in ++ yes | no) ;; ++ *) AC_MSG_ERROR(['$enable_autolink_libatomic' is an invalid value for ++--enable-autolink-libatomic. Valid choices are 'yes' and 'no'.]) ;; ++ esac ++], [enable_autolink_libatomic='']) ++ ++if test x$enable_autolink_libatomic = xyes; then ++ if echo " ${TARGET_CONFIGDIRS} " | grep " libatomic " > /dev/null 2>&1 ; then ++ AC_DEFINE(ENABLE_AUTOLINK_LIBATOMIC, 1, ++ [Define if libatomic should always be linked.]) ++ else ++ AC_MSG_WARN([libatomic is not build for this target, --enable-autolink-libatomic ignored]) ++ fi ++fi ++ + # ------------------------- + # Checks for other programs + # ------------------------- +@@ -7839,4 +7860,3 @@ done + ], + [subdirs='$subdirs']) + AC_OUTPUT +- +diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi +index 48408d842db..c90be0ee750 100644 +--- a/gcc/doc/install.texi ++++ b/gcc/doc/install.texi +@@ -2295,6 +2295,14 @@ files, but these changed header paths may conflict with some compilation + environments. Enabled by default, and may be disabled using + @option{--disable-canonical-system-headers}. + ++@item --enable-autolink-libatomic ++@itemx --disable-autolink-libatomic ++Tell GCC that it should automatically link libatomic; if supported by ++the linker, the file is only linked as needed. This flag is ignored ++when libatomic is not built. Note that this conigure flag is in particular ++useful when building an offloading-target compiler; as for those, a ++user had to specify @code{-foffload=target=-latomic} otherwise. ++ + @item --with-glibc-version=@var{major}.@var{minor} + Tell GCC that when the GNU C Library (glibc) is used on the target it + will be version @var{major}.@var{minor} or later. Normally this can +diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi +index c5006afc00d..56b62c69ae8 100644 +--- a/gcc/doc/tm.texi ++++ b/gcc/doc/tm.texi +@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search. + + @defmac LINK_GCC_C_SEQUENCE_SPEC + The sequence in which libgcc and libc are specified to the linker. +-By default this is @code{%G %L %G}. ++By default this is @code{%G LINK_LIBATOMIC_SPEC %L %G}. ++@end defmac ++ ++@defmac LINK_LIBATOMIC_SPEC ++This macro is used in the default @code{LINK_GCC_C_SEQUENCE_SPEC} to link ++libatomic. By default, it is unset unless @code{ENABLE_AUTOLINK_LIBATOMIC} ++is set. + @end defmac + + @defmac POST_LINK_SPEC +diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in +index f869ddd5e5b..57c93f24ac3 100644 +--- a/gcc/doc/tm.texi.in ++++ b/gcc/doc/tm.texi.in +@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search. + + @defmac LINK_GCC_C_SEQUENCE_SPEC + The sequence in which libgcc and libc are specified to the linker. +-By default this is @code{%G %L %G}. ++By default this is @code{%G LINK_LIBATOMIC_SPEC %L %G}. ++@end defmac ++ ++@defmac LINK_LIBATOMIC_SPEC ++This macro is used in the default @code{LINK_GCC_C_SEQUENCE_SPEC} to link ++libatomic. By default, it is unset unless @code{ENABLE_AUTOLINK_LIBATOMIC} ++is set. + @end defmac + + @defmac POST_LINK_SPEC +diff --git a/gcc/gcc.cc b/gcc/gcc.cc +index 735b2b1bba1..f10f3c91aa7 100644 +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -987,13 +987,23 @@ proper position among the other output files. */ + # define ASM_DEBUG_OPTION_SPEC "" + #endif + ++#if !defined(LINK_LIBATOMIC_SPEC) && defined(ENABLE_AUTOLINK_LIBATOMIC) ++# ifdef LD_AS_NEEDED_OPTION ++# define LINK_LIBATOMIC_SPEC LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION ++# else ++# define LINK_LIBATOMIC_SPEC "-latomic" ++# endif ++#elif !defined(LINK_LIBATOMIC_SPEC) ++# define LINK_LIBATOMIC_SPEC "" ++#endif ++ + /* Here is the spec for running the linker, after compiling all files. */ + + /* This is overridable by the target in case they need to specify the + -lgcc and -lc order specially, yet not require them to override all + of LINK_COMMAND_SPEC. */ + #ifndef LINK_GCC_C_SEQUENCE_SPEC +-#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}" ++#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:" LINK_LIBATOMIC_SPEC " %L %G}" + #endif + + #ifdef ENABLE_DEFAULT_SSP diff --git a/pat/gcc-alpine/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch b/pat/gcc-alpine/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch @@ -1,30 +0,0 @@ -From 382d4516db8a7c183e9d7b5ec16a9bc175523ac9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net> -Date: Sun, 30 Aug 2020 19:26:53 +0200 -Subject: [PATCH] gcc-go: Prefer _off_t over _off64_t - -musl does not seem to have _off64_t. ---- - libgo/mksysinfo.sh | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh -index 972e2c379bc..8d6da15f983 100755 ---- a/libgo/mksysinfo.sh -+++ b/libgo/mksysinfo.sh -@@ -379,11 +379,7 @@ fi - # Some basic types. - echo 'type Size_t _size_t' >> ${OUT} - echo "type Ssize_t _ssize_t" >> ${OUT} --if grep '^const _HAVE_OFF64_T = ' gen-sysinfo.go > /dev/null 2>&1; then -- echo "type Offset_t _off64_t" >> ${OUT} --else -- echo "type Offset_t _off_t" >> ${OUT} --fi -+echo "type Offset_t _off_t" >> ${OUT} - echo "type Mode_t _mode_t" >> ${OUT} - echo "type Pid_t _pid_t" >> ${OUT} - echo "type Uid_t _uid_t" >> ${OUT} --- -2.31.1 - diff --git a/pat/gcc-alpine/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch b/pat/gcc-alpine/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch @@ -1,27 +0,0 @@ -From 79d8ab42aefb1d3c5f794f51df643ab040c30e30 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net> -Date: Sun, 30 Aug 2020 19:27:51 +0200 -Subject: [PATCH] gcc-go: undef SETCONTEXT_CLOBBERS_TLS in proc.c - ---- - libgo/runtime/proc.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c -index 6f7d2e27996..5afd7902497 100644 ---- a/libgo/runtime/proc.c -+++ b/libgo/runtime/proc.c -@@ -66,6 +66,10 @@ static void gscanstack(G*); - - __thread G *g __asm__(GOSYM_PREFIX "runtime.g"); - -+/* libucontext does not seem to support tlsbase, undef the macro -+ * here to make sure we define initcontext and fixcontext as dummies. */ -+#undef SETCONTEXT_CLOBBERS_TLS -+ - #ifndef SETCONTEXT_CLOBBERS_TLS - - static inline void --- -2.31.1 - diff --git a/pat/gcc-alpine/0037-gcc-go-link-to-libucontext.patch b/pat/gcc-alpine/0037-gcc-go-link-to-libucontext.patch @@ -1,25 +0,0 @@ -From d42de24395e4f07cf6412896d4cd8c7f83a9b875 Mon Sep 17 00:00:00 2001 -From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> -Date: Mon, 31 Aug 2020 08:59:40 +0200 -Subject: [PATCH] gcc-go: link to libucontext - ---- - Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.in b/Makefile.in -index 63627db68cf..c7f1f84d683 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -48823,7 +48823,7 @@ configure-target-libgo: - esac; \ - module_srcdir=libgo; \ - rm -f no-such-file || : ; \ -- CONFIG_SITE=no-such-file $(SHELL) \ -+ CONFIG_SITE=no-such-file LIBS="-lucontext $$LIBS" $(SHELL) \ - $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ --- -2.31.1 - diff --git a/pat/gcc-alpine/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch b/pat/gcc-alpine/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch @@ -1,26 +0,0 @@ -From 570cd2b596daf12e8dfe1a444fe405a7c26fc2bc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net> -Date: Mon, 31 Aug 2020 20:26:56 +0200 -Subject: [PATCH] gcc-go: Disable printing of unaccessible ppc64 struct members - -These struct members do not seem to exist on musl. ---- - libgo/runtime/go-signal.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c -index fd1c885f043..e845e453332 100644 ---- a/libgo/runtime/go-signal.c -+++ b/libgo/runtime/go-signal.c -@@ -333,7 +333,7 @@ dumpregs(siginfo_t *info __attribute__((unused)), void *context __attribute__((u - runtime_printf("sp %X\n", m->sc_regs[30]); - runtime_printf("pc %X\n", m->sc_pc); - } --#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__linux__) -+#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__GLIBC__) - { - mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext; - int i; --- -2.31.1 - diff --git a/pat/gcc-alpine/0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch b/pat/gcc-alpine/0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch @@ -0,0 +1,59 @@ +From 5e658f4659c551330ea68f5667e4f951b218f32d Mon Sep 17 00:00:00 2001 +From: Ian Lance Taylor <iant@golang.org> +Date: Wed, 26 Oct 2022 17:23:42 -0700 +Subject: [PATCH] runtime: use _libgo_off_t_type when calling C mmap +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The last argument to the C mmap function is type off_t, not uintptr. +On some 32-bit systems, off_t is larger than uintptr. + +Based on patch by Sören Tempel. + +Change-Id: Ib6f9d5bcd4734f99a72889e2282b97ec3c8fbd34 +Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/445735 +Reviewed-by: Cherry Mui <cherryyz@google.com> +Reviewed-by: Than McIntosh <thanm@google.com> +--- + libgo/go/runtime/mem_gccgo.go | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libgo/go/runtime/mem_gccgo.go b/libgo/go/runtime/mem_gccgo.go +index fa3389d8..1e84f4f5 100644 +--- a/libgo/go/runtime/mem_gccgo.go ++++ b/libgo/go/runtime/mem_gccgo.go +@@ -15,7 +15,7 @@ import ( + //go:linkname sysFree + + //extern mmap +-func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) unsafe.Pointer ++func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off _libgo_off_t_type) unsafe.Pointer + + //extern munmap + func munmap(addr unsafe.Pointer, length uintptr) int32 +@@ -38,7 +38,7 @@ func init() { + } + + func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (unsafe.Pointer, int) { +- p := sysMmap(addr, n, prot, flags, fd, off) ++ p := sysMmap(addr, n, prot, flags, fd, _libgo_off_t_type(off)) + if uintptr(p) == _MAP_FAILED { + return nil, errno() + } +@@ -47,6 +47,7 @@ func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (u + + // Don't split the stack as this method may be invoked without a valid G, which + // prevents us from allocating more stack. ++// + //go:nosplit + func sysAlloc(n uintptr, sysStat *sysMemStat) unsafe.Pointer { + p, err := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, mmapFD, 0) +@@ -165,6 +166,7 @@ func sysHugePage(v unsafe.Pointer, n uintptr) { + + // Don't split the stack as this function may be invoked without a valid G, + // which prevents us from allocating more stack. ++// + //go:nosplit + func sysFree(v unsafe.Pointer, n uintptr, sysStat *sysMemStat) { + sysStat.add(-int64(n)) diff --git a/pat/gcc-alpine/0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch b/pat/gcc-alpine/0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch @@ -1,264 +0,0 @@ -From: Drew DeVault <sir@cmpwn.com> -From: Olsken (updated patches) -Date: Sat, 21 Aug 2021 08:51:52 +0000 -Subject: [PATCH] configure: Add --enable-autolink-libatomic, use in - LINK_GCC_C_SEQUENCE_SPEC [PR81358] - -This fixes issues with RISC-V. - -diff --git a/Makefile.in b/Makefile.in -index 047be0255..765f6b89b 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -221,6 +221,7 @@ HOST_EXPORTS = \ - RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \ - READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \ - TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ -+ TARGET_CONFIGDIRS="$(TARGET_CONFIGDIRS)"; export TARGET_CONFIGDIRS; \ - HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \ - GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \ - GMPINC="$(HOST_GMPINC)"; export GMPINC; \ -diff --git a/gcc/config.in b/gcc/config.in -index 313c13c8e..d0287d4cc 100644 ---- a/gcc/config.in -+++ b/gcc/config.in -@@ -106,6 +106,12 @@ - #endif - - -+/* Define if libatomic should always be linked. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_AUTOLINK_LIBATOMIC -+#endif -+ -+ - /* Define to 1 to specify that we are using the BID decimal floating point - format instead of DPD */ - #ifndef USED_FOR_TARGET -diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h -index e1a04e9fd..ef1ffa6d2 100644 ---- a/gcc/config/gnu-user.h -+++ b/gcc/config/gnu-user.h -@@ -109,8 +109,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} " - #endif - -+#if !defined(LINK_LIBATOMIC_SPEC) && defined(ENABLE_AUTOLINK_LIBATOMIC) -+# ifdef LD_AS_NEEDED_OPTION -+# define LINK_LIBATOMIC_SPEC LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION -+# else -+# define LINK_LIBATOMIC_SPEC "-latomic" -+# endif -+#elif !defined(LINK_LIBATOMIC_SPEC) -+# define LINK_LIBATOMIC_SPEC "" -+#endif -+ - #define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \ -- "%{static|static-pie:--start-group} %G %{!nolibc:%L} \ -+ "%{static|static-pie:--start-group} %G %{!nolibc:" LINK_LIBATOMIC_SPEC " %L} \ - %{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}" - - #undef LINK_GCC_C_SEQUENCE_SPEC -diff --git a/gcc/configure b/gcc/configure -index 9b28369e3..8afa1c84f 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -978,6 +978,7 @@ with_changes_root_url - enable_languages - with_multilib_list - with_multilib_generator -+enable_autolink_libatomic - with_zstd - with_zstd_include - with_zstd_lib -@@ -1706,6 +1707,9 @@ Optional Features: - --disable-shared don't provide a shared libgcc - --disable-gcov don't provide libgcov and related host tools - --enable-languages=LIST specify which front-ends to build -+ --enable-autolink-libatomic -+ enable automatic linking of libatomic (ignored if -+ not built) - --disable-rpath do not hardcode runtime library paths - --enable-sjlj-exceptions - arrange to use setjmp/longjmp exception handling -@@ -8076,6 +8080,33 @@ else - fi - - -+# If libatomic is available, whether it should be linked automatically -+# Check whether --enable-autolink-libatomic was given. -+if test "${enable_autolink_libatomic+set}" = set; then : -+ enableval=$enable_autolink_libatomic; -+ case $enable_autolink_libatomic in -+ yes | no) ;; -+ *) as_fn_error $? "'$enable_autolink_libatomic' is an invalid value for -+--enable-autolink-libatomic. Valid choices are 'yes' and 'no'." "$LINENO" 5 ;; -+ esac -+ -+else -+ enable_autolink_libatomic='' -+fi -+ -+ -+if test x$enable_autolink_libatomic = xyes; then -+ if echo " ${TARGET_CONFIGDIRS} " | grep " libatomic " > /dev/null 2>&1 ; then -+ -+$as_echo "#define ENABLE_AUTOLINK_LIBATOMIC 1" >>confdefs.h -+ -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libatomic is not build for this target, --enable-autolink-libatomic ignored" >&5 -+$as_echo "$as_me: WARNING: libatomic is not build for this target, --enable-autolink-libatomic ignored" >&2;} -+ fi -+fi -+ -+ - # ------------------------- - # Checks for other programs - # ------------------------- -@@ -19392,7 +19423,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 19395 "configure" -+#line 19426 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -19498,7 +19529,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 19501 "configure" -+#line 19532 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -33588,4 +33619,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} - fi - -- -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 162e08cbc..115ba8ac6 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -1149,6 +1149,28 @@ AC_ARG_WITH(multilib-generator, - :, - with_multilib_generator=default) - -+# If libatomic is available, whether it should be linked automatically -+AC_ARG_ENABLE(autolink-libatomic, -+[AS_HELP_STRING([--enable-autolink-libatomic], -+ [enable automatic linking of libatomic (ignored if not built)])], -+[ -+ case $enable_autolink_libatomic in -+ yes | no) ;; -+ *) AC_MSG_ERROR(['$enable_autolink_libatomic' is an invalid value for -+--enable-autolink-libatomic. Valid choices are 'yes' and 'no'.]) ;; -+ esac -+], [enable_autolink_libatomic='']) -+ -+if test x$enable_autolink_libatomic = xyes; then -+ if echo " ${TARGET_CONFIGDIRS} " | grep " libatomic " > /dev/null 2>&1 ; then -+ AC_DEFINE(ENABLE_AUTOLINK_LIBATOMIC, 1, -+ [Define if libatomic should always be linked.]) -+ else -+ AC_MSG_WARN([libatomic is not build for this target, --enable-autolink-libatomic ignored]) -+ fi -+fi -+ -+ - # ------------------------- - # Checks for other programs - # ------------------------- -@@ -7553,4 +7575,3 @@ done - ], - [subdirs='$subdirs']) - AC_OUTPUT -- -diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi -index 4c38244ae..4a544e6a4 100644 ---- a/gcc/doc/install.texi -+++ b/gcc/doc/install.texi -@@ -2213,6 +2213,14 @@ files, but these changed header paths may conflict with some compilation - environments. Enabled by default, and may be disabled using - @option{--disable-canonical-system-headers}. - -+@item --enable-autolink-libatomic -+@itemx --disable-autolink-libatomic -+Tell GCC that it should automatically link libatomic; if supported by -+the linker, the file is only linked as needed. This flag is ignored -+when libatomic is not built. Note that this conigure flag is in particular -+useful when building an offloading-target compiler; as for those, a -+user had to specify @code{-foffload=target=-latomic} otherwise. -+ - @item --with-glibc-version=@var{major}.@var{minor} - Tell GCC that when the GNU C Library (glibc) is used on the target it - will be version @var{major}.@var{minor} or later. Normally this can -diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi -index b370bc76b..acc782739 100644 ---- a/gcc/doc/tm.texi -+++ b/gcc/doc/tm.texi -@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search. - - @defmac LINK_GCC_C_SEQUENCE_SPEC - The sequence in which libgcc and libc are specified to the linker. --By default this is @code{%G %L %G}. -+By default this is @code{%G LINK_LIBATOMIC_SPEC %L %G}. -+@end defmac -+ -+@defmac LINK_LIBATOMIC_SPEC -+This macro is used in the default @code{LINK_GCC_C_SEQUENCE_SPEC} to link -+libatomic. By default, it is unset unless @code{ENABLE_AUTOLINK_LIBATOMIC} -+is set. - @end defmac - - @defmac POST_LINK_SPEC -diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in -index 2974dae27..80e003a38 100644 ---- a/gcc/doc/tm.texi.in -+++ b/gcc/doc/tm.texi.in -@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search. - - @defmac LINK_GCC_C_SEQUENCE_SPEC - The sequence in which libgcc and libc are specified to the linker. --By default this is @code{%G %L %G}. -+By default this is @code{%G LINK_LIBATOMIC_SPEC %L %G}. -+@end defmac -+ -+@defmac LINK_LIBATOMIC_SPEC -+This macro is used in the default @code{LINK_GCC_C_SEQUENCE_SPEC} to link -+libatomic. By default, it is unset unless @code{ENABLE_AUTOLINK_LIBATOMIC} -+is set. - @end defmac - - @defmac POST_LINK_SPEC -diff --git a/gcc/gcc.c b/gcc/gcc.c -index d7f3ee55c..bc1bd1686 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -980,13 +980,23 @@ proper position among the other output files. */ - # define ASM_DEBUG_OPTION_SPEC "" - #endif - -+#if !defined(LINK_LIBATOMIC_SPEC) && defined(ENABLE_AUTOLINK_LIBATOMIC) -+# ifdef LD_AS_NEEDED_OPTION -+# define LINK_LIBATOMIC_SPEC LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION -+# else -+# define LINK_LIBATOMIC_SPEC "-latomic" -+# endif -+#elif !defined(LINK_LIBATOMIC_SPEC) -+# define LINK_LIBATOMIC_SPEC "" -+#endif -+ - /* Here is the spec for running the linker, after compiling all files. */ - - /* This is overridable by the target in case they need to specify the - -lgcc and -lc order specially, yet not require them to override all - of LINK_COMMAND_SPEC. */ - #ifndef LINK_GCC_C_SEQUENCE_SPEC --#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}" -+#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:" LINK_LIBATOMIC_SPEC " %L %G}" - #endif - - #ifdef ENABLE_DEFAULT_SSP diff --git a/pat/gcc-alpine/0041-Use-generic-errstr.go-implementation-on-musl.patch b/pat/gcc-alpine/0041-Use-generic-errstr.go-implementation-on-musl.patch @@ -1,48 +0,0 @@ -From 70d70a1106b31ab840dbf5361312af221a2d5f04 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net> -Date: Mon, 19 Apr 2021 07:21:41 +0200 -Subject: [PATCH] Use generic errstr.go implementation on musl - -glibc provides two version of strerror_r() depending on a feature test -macro. The first is the XSI-compliant version which returns an int, the -second is GNU-specific and returns a char pointer. - -Similarity, gcc's libgo provides two implementations of Errstr() both of -which use strerror_r(). On Linux, it is assumed that the GNU-specific -strerror_r version is used. However, musl only provides the -XSI-compliant version of strerror_r. This patch enables the generic -Errstr() implementation which also uses the XSI-compliant version of -strerror_r. ---- - libgo/go/syscall/errstr.go | 1 - - libgo/go/syscall/errstr_glibc.go | 2 +- - 2 files changed, 1 insertion(+), 2 deletions(-) - -diff --git a/libgo/go/syscall/errstr.go b/libgo/go/syscall/errstr.go -index 6c2441d364d..8f7c5538163 100644 ---- a/libgo/go/syscall/errstr.go -+++ b/libgo/go/syscall/errstr.go -@@ -5,7 +5,6 @@ - // license that can be found in the LICENSE file. - - // +build !hurd --// +build !linux - - package syscall - -diff --git a/libgo/go/syscall/errstr_glibc.go b/libgo/go/syscall/errstr_glibc.go -index 5b19e6f202d..8dc60172186 100644 ---- a/libgo/go/syscall/errstr_glibc.go -+++ b/libgo/go/syscall/errstr_glibc.go -@@ -7,7 +7,7 @@ - // We use this rather than errstr.go because on GNU/Linux sterror_r - // returns a pointer to the error message, and may not use buf at all. - --// +build hurd linux -+// +build hurd !linux - - package syscall - --- -2.31.1 - diff --git a/pat/gcc-alpine/0042-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch b/pat/gcc-alpine/0042-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch @@ -1,21 +0,0 @@ -From: Alpine Linux community -From: Olsken (updated patches) -Date: Sat, 21 Aug 2021 08:51:52 +0000 - -diff --git a/gcc/gcc.c b/gcc/gcc.c -index bc1bd1686..b5c83977f 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -1005,6 +1005,12 @@ proper position among the other output files. */ - #define NO_SSP_SPEC "" - #endif - -+#ifdef ENABLE_DEFAULT_SSP -+#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} " -+#else -+#define NO_SSP_SPEC "" -+#endif -+ - #ifndef LINK_SSP_SPEC - #ifdef TARGET_LIBC_PROVIDES_SSP - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ diff --git a/pat/gcc-alpine/0043-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch b/pat/gcc-alpine/0043-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch @@ -1,21 +0,0 @@ -From: Alpine Linux community -From: Olsken (updated patches) -Date: Sat, 21 Aug 2021 08:51:52 +0000 - -diff --git a/gcc/config.in b/gcc/config.in -index d0287d4cc..8c10816c4 100644 ---- a/gcc/config.in -+++ b/gcc/config.in -@@ -112,6 +112,12 @@ - #endif - - -+/* Define if libatomic should always be linked. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_AUTOLINK_LIBATOMIC -+#endif -+ -+ - /* Define to 1 to specify that we are using the BID decimal floating point - format instead of DPD */ - #ifndef USED_FOR_TARGET diff --git a/pat/gcc-mlfs/fix_fenv_header-new1.patch b/pat/gcc-mlfs/fix_fenv_header-new1.patch @@ -0,0 +1,20 @@ +--- gcc-12.2.0.orig/libstdc++-v3/include/c_global/cfenv 2023-04-12 13:43:21.180583885 +0200 ++++ gcc-12.2.0/libstdc++-v3/include/c_global/cfenv 2023-04-12 13:44:49.377613899 +0200 +@@ -37,9 +37,14 @@ + + #include <bits/c++config.h> + +-#if _GLIBCXX_HAVE_FENV_H +-# include <fenv.h> +-#endif ++//#if _GLIBCXX_HAVE_FENV_H ++//# include <fenv.h> ++//#endif ++// Need to ensure this finds the C library's <fenv.h> not a libstdc++ ++// wrapper that might already be installed later in the include search path. ++#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS ++# include_next <fenv.h> ++#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS + + #ifdef _GLIBCXX_USE_C99_FENV_TR1 + diff --git a/pat/gcc-mlfs/fix_fenv_header-new2.patch b/pat/gcc-mlfs/fix_fenv_header-new2.patch @@ -0,0 +1,12 @@ +--- gcc-12.2.0.orig/libstdc++-v3/include/c_compatibility/fenv.h 2023-04-12 13:43:32.290629656 +0200 ++++ gcc-12.2.0/libstdc++-v3/include/c_compatibility/fenv.h 2023-04-12 13:45:36.341140694 +0200 +@@ -25,6 +25,9 @@ + /** @file fenv.h + * This is a Standard C++ Library header. + */ ++#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS ++# include_next <fenv.h> ++#else + + #ifndef _GLIBCXX_FENV_H + #define _GLIBCXX_FENV_H 1 diff --git a/pat/gcc-mlfs/fix_fenv_header.patch b/pat/gcc-mlfs/fix_fenv_header.patch @@ -1,5 +1,5 @@ ---- gcc-11.2.0.orig/libstdc++-v3/include/c_global/cfenv 2021-07-28 01:55:09.292315320 -0500 -+++ gcc-11.2.0/libstdc++-v3/include/c_global/cfenv 2021-08-07 10:17:27.945057906 -0500 +--- gcc-12.2.0.orig/libstdc++-v3/include/c_global/cfenv 2023-04-12 13:43:21.180583885 +0200 ++++ gcc-12.2.0/libstdc++-v3/include/c_global/cfenv 2023-04-12 13:44:49.377613899 +0200 @@ -37,9 +37,14 @@ #include <bits/c++config.h> @@ -18,8 +18,8 @@ #ifdef _GLIBCXX_USE_C99_FENV_TR1 ---- gcc-11.2.0.orig/libstdc++-v3/include/c_compatibility/fenv.h 2021-07-28 01:55:09.292315320 -0500 -+++ gcc-11.2.0/libstdc++-v3/include/c_compatibility/fenv.h 2021-08-07 10:15:08.542063961 -0500 +--- gcc-12.2.0.orig/libstdc++-v3/include/c_compatibility/fenv.h 2023-04-12 13:43:32.290629656 +0200 ++++ gcc-12.2.0/libstdc++-v3/include/c_compatibility/fenv.h 2023-04-12 13:45:36.341140694 +0200 @@ -25,6 +25,9 @@ /** @file fenv.h * This is a Standard C++ Library header. diff --git a/pat/iproute2-galeb/0001-ipstats_c-define-MIN.patch b/pat/iproute2-galeb/0001-ipstats_c-define-MIN.patch @@ -0,0 +1,13 @@ +--- ip.orig/ipstats.c 2023-04-14 11:51:56.799193658 +0200 ++++ ip/ipstats.c 2023-04-14 11:53:27.942786127 +0200 +@@ -6,6 +6,10 @@ + #include "utils.h" + #include "ip_common.h" + ++#ifndef MIN ++#define MIN(a, b) ((a) < (b) ? (a) : (b)) ++#endif ++ + struct ipstats_stat_dump_filters { + /* mask[0] filters outer attributes. Then individual nests have their + * filtering mask at the index of the nested attribute. diff --git a/pat/musl-galeb/0001-Prevent-redefinition-warnings.patch b/pat/musl-galeb/0001-Prevent-redefinition-warnings.patch @@ -0,0 +1,14 @@ +--- include.orig/stdc-predef.h 2023-04-12 20:10:38.173711260 +0200 ++++ include/stdc-predef.h 2023-04-12 20:10:49.143751737 +0200 +@@ -7,7 +7,11 @@ + #define __STDC_IEC_559__ 1 + #endif + ++#ifndef __STDC_UTF_16__ + #define __STDC_UTF_16__ 1 ++#endif ++#ifndef __STDC_UTF_32__ + #define __STDC_UTF_32__ 1 ++#endif + + #endif diff --git a/pat/musl-galeb/0002-string_h-basename.patch b/pat/musl-galeb/0002-string_h-basename.patch @@ -0,0 +1,11 @@ +--- include.orig/string.h 2023-04-12 20:15:39.174821892 +0200 ++++ include/string.h 2023-04-12 20:16:13.518281945 +0200 +@@ -96,7 +96,7 @@ + void *memrchr(const void *, int, size_t); + void *mempcpy(void *, const void *, size_t); + #ifndef __cplusplus +-char *basename(); ++extern char *basename(char *); + #endif + #endif + diff --git a/pat/musl-galeb/0003-byteswap_h-parentheses.patch b/pat/musl-galeb/0003-byteswap_h-parentheses.patch @@ -0,0 +1,17 @@ +--- include.orig/byteswap.h 2023-04-12 20:25:58.163903358 +0200 ++++ include/byteswap.h 2023-04-12 20:34:47.369351733 +0200 +@@ -11,12 +11,12 @@ + + static __inline uint32_t __bswap_32(uint32_t __x) + { +- return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24; ++ return (__x>>24) | ((__x>>8)&0xff00) | ((__x<<8)&0xff0000) | (__x<<24); + } + + static __inline uint64_t __bswap_64(uint64_t __x) + { +- return __bswap_32(__x)+0ULL<<32 | __bswap_32(__x>>32); ++ return ((__bswap_32(__x)+0ULL)<<32) | __bswap_32(__x>>32); + } + + #define bswap_16(x) __bswap_16(x) diff --git a/pat/musl-galeb/0004-endian_h-parentheses.patch b/pat/musl-galeb/0004-endian_h-parentheses.patch @@ -0,0 +1,17 @@ +--- include.orig/endian.h 2023-04-12 20:33:08.488956542 +0200 ++++ include/endian.h 2023-04-12 20:34:08.059194630 +0200 +@@ -23,12 +23,12 @@ + + static __inline uint32_t __bswap32(uint32_t __x) + { +- return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24; ++ return (__x>>24) | ((__x>>8)&0xff00) | ((__x<<8)&0xff0000) | __x<<24; + } + + static __inline uint64_t __bswap64(uint64_t __x) + { +- return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32); ++ return ((__bswap32(__x)+0ULL)<<32) | __bswap32(__x>>32); + } + + #if __BYTE_ORDER == __LITTLE_ENDIAN diff --git a/pat/musl-galeb/0005-stdlib_h-libiberty-dont-redefine-alloca.patch b/pat/musl-galeb/0005-stdlib_h-libiberty-dont-redefine-alloca.patch @@ -0,0 +1,12 @@ +--- include.orig/stdlib.h 2023-04-13 08:42:10.944612278 +0200 ++++ include/stdlib.h 2023-04-13 08:42:26.367971398 +0200 +@@ -137,7 +137,9 @@ + #endif + + #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++#ifndef alloca + #include <alloca.h> ++#endif + char *mktemp (char *); + int mkstemps (char *, int); + int mkostemps (char *, int, int);