From fe18c5acad12bd327899f7c4620bc89e3fad3847 Mon Sep 17 00:00:00 2001 From: dslm4515 <27793627+dslm4515@users.noreply.github.com> Date: Tue, 22 Jun 2021 16:40:46 -0500 Subject: [PATCH 01/14] Removal of cmake option -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON allows llvm headers to install, per @andzai1995 --- 3-chroot/026-llvm | 1 - 1 file changed, 1 deletion(-) diff --git a/3-chroot/026-llvm b/3-chroot/026-llvm index 818b17a..e6b6095 100644 --- a/3-chroot/026-llvm +++ b/3-chroot/026-llvm @@ -41,7 +41,6 @@ export CXXFLAGS=" -g -g1" cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DLLVM_BUILD_LLVM_DYLIB=ON \ -DLLVM_BUILD_TESTS=OFF \ From 8c69ad4b2640c3c8e6bcbfcf7b1f826ddd9c21c3 Mon Sep 17 00:00:00 2001 From: dslm4515 <27793627+dslm4515@users.noreply.github.com> Date: Fri, 25 Jun 2021 17:55:58 -0500 Subject: [PATCH 02/14] Updated list of sources for download. --- sources.list | 109 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 96 insertions(+), 13 deletions(-) diff --git a/sources.list b/sources.list index 8ac1dae..d0d4613 100644 --- a/sources.list +++ b/sources.list @@ -1,15 +1,98 @@ +https://www.kernel.org/pub/linux/docs/man-pages/man-pages-5.11.tar.xz +https://www.musl-libc.org/releases/musl-1.2.2.tar.gz +http://skarnet.org/software/skalibs/skalibs-2.10.0.3.tar.gz +https://skarnet.org/software/utmps/utmps-0.1.0.2.tar.gz +https://www.iana.org/time-zones/repository/releases/tzdata2021a.tar.gz +https://www.iana.org/time-zones/repository/releases/tzcode2021a.tar.gz +https://dev.alpinelinux.org/archive/posixtz/posixtz-0.5.tar.xz +http://www.lysator.liu.se/~nisse/misc/argp-standalone-1.3.tar.gz +https://zlib.net/zlib-1.2.11.tar.xz +ftp://ftp.astron.com/pub/file/file-5.40.tar.gz +http://ftp.gnu.org/gnu/readline/readline-8.1.tar.gz +http://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz +https://github.com/gavinhoward/bc/releases/download/4.0.2/bc-4.0.2.tar.xz +http://ftp.gnu.org/gnu/binutils/binutils-2.36.1.tar.xz +http://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz +http://www.mpfr.org/mpfr-4.1.0/mpfr-4.1.0.tar.xz +https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz +https://github.com/shadow-maint/shadow/releases/download/4.8.1/shadow-4.8.1.tar.xz +https://dev.alpinelinux.org/~nenolod/gcc-10.3.1_git20210424.tar.xz +http://isl.gforge.inria.fr/isl-0.23.tar.bz2 +http://anduin.linuxfromscratch.org/LFS/bzip2-1.0.8.tar.gz +https://distfiles.dereferenced.org/pkgconf/pkgconf-1.7.4.tar.xz +http://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz +https://download.savannah.gnu.org/releases/attr/attr-2.5.1.tar.gz +https://download.savannah.gnu.org/releases/acl/acl-2.3.1.tar.xz +https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.50.tar.xz +http://ftp.gnu.org/gnu/sed/sed-4.8.tar.xz +https://sourceforge.net/projects/psmisc/files/psmisc/psmisc-23.4.tar.xz +https://github.com/Mic92/iana-etc/releases/download/20210526/iana-etc-20210526.tar.gz +http://ftp.gnu.org/gnu/bison/bison-3.7.6.tar.xz +https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz +http://ftp.gnu.org/gnu/grep/grep-3.6.tar.xz +http://ftp.gnu.org/gnu/bash/bash-5.1.tar.gz +http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz +https://ftp.gnu.org/gnu/gdbm/gdbm-1.19.tar.gz +http://ftp.gnu.org/gnu/gperf/gperf-3.1.tar.gz +https://prdownloads.sourceforge.net/expat/expat-2.4.1.tar.xz +https://ftp.gnu.org/gnu/inetutils/inetutils-2.0.tar.xz +https://www.cpan.org/src/5.0/perl-5.34.0.tar.xz +https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.46.tar.gz +https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz +http://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz +http://ftp.gnu.org/gnu/automake/automake-1.16.3.tar.xz +https://github.com/pullmoll/musl-fts/archive/v1.2.7.tar.gz +https://github.com/pullmoll/musl-obstack/archive/v1.1.tar.gz +https://github.com/pullmoll/musl-rpmatch/archive/v1.0.tar.gz +https://tukaani.org/xz/xz-5.2.5.tar.xz +https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-29.tar.xz +http://ftp.barfooze.de/pub/sabotage/tarballs/gettext-tiny-0.3.2.tar.xz +https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz +https://sourceware.org/ftp/elfutils/0.185/elfutils-0.185.tar.bz2 +ftp://sourceware.org/pub/libffi/libffi-3.3.tar.gz +http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.3.3.tar.gz +https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tar.xz +https://github.com/ninja-build/ninja/archive/v1.10.2/ninja-1.10.2.tar.gz +https://github.com/mesonbuild/meson/releases/download/0.58.0/meson-0.58.0.tar.gz +https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-3.3.17.tar.xz +http://ftp.gnu.org/gnu/coreutils/coreutils-8.32.tar.xz +https://github.com/libcheck/check/releases/download/0.15.2/check-0.15.2.tar.gz +http://ftp.gnu.org/gnu/diffutils/diffutils-3.7.tar.xz +http://ftp.gnu.org/gnu/gawk/gawk-5.1.0.tar.xz +http://ftp.gnu.org/gnu/findutils/findutils-4.8.0.tar.xz +http://ftp.gnu.org/gnu/groff/groff-1.22.4.tar.gz +https://ftp.gnu.org/gnu/grub/grub-2.06.tar.xz +https://www.greenwoodsoftware.com/less/less-581.tar.gz +http://ftp.gnu.org/gnu/gzip/gzip-1.10.tar.xz +https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-5.12.0.tar.xz +https://www.kernel.org/pub/linux/utils/kbd/kbd-2.4.0.tar.xz +http://download.savannah.gnu.org/releases/libpipeline/libpipeline-1.5.3.tar.gz +http://ftp.gnu.org/gnu/make/make-4.3.tar.bz2 +http://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz +http://download.savannah.gnu.org/releases/man-db/man-db-2.9.4.tar.xz +http://ftp.gnu.org/gnu/tar/tar-1.34.tar.xz +http://ftp.gnu.org/gnu/texinfo/texinfo-6.7.tar.xz +http://anduin.linuxfromscratch.org/LFS/vim-8.2.2890.tar.gz +https://www.kernel.org/pub/linux/utils/util-linux/v2.36/util-linux-2.36.2.tar.xz +https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.46.2/e2fsprogs-1.46.2.tar.gz +https://dev.gentoo.org/~blueness/eudev/eudev-3.2.10.tar.gz +https://ftp.gnu.org/gnu/cpio/cpio-2.13.tar.bz2 +https://skarnet.org/software/execline/execline-2.8.0.1.tar.gz +https://www.skarnet.org/software/s6/s6-2.10.0.3.tar.gz +https://www.skarnet.org/software/s6-rc/s6-rc-0.5.2.2.tar.gz +https://www.skarnet.org/software/s6-linux-utils/s6-linux-utils-2.5.1.5.tar.gz +https://www.skarnet.org/software/s6-portable-utils/s6-portable-utils-2.2.3.2.tar.gz +https://www.skarnet.org/software/s6-linux-init/s6-linux-init-1.0.6.3.tar.gz +https://ftp.gnu.org/gnu/which/which-2.21.tar.gz +ftp://mama.indstate.edu/linux/tree/tree-1.8.0.tgz +https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.12.10.tar.xz +http://distcache.freebsd.org/local-distfiles/itetcu/libexecinfo-1.1.tar.bz2 https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/llvm-11.0.0.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/clang-11.0.0.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/compiler-rt-11.0.0.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/lld-11.0.0.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/libunwind-11.0.0.src.tar.xz -https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/libcxxabi-11.0.0.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/clang-11.0.0.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/compiler-rt-11.0.0.src.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/libcxx-11.0.0.src.tar.xz -https://ftp.gnu.org/gnu/binutils/binutils-2.36.1.tar.xz -https://dev.alpinelinux.org/~nenolod/gcc-10.2.1_pre2.tar.xz -https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz -https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz -https://www.mpfr.org/mpfr-4.1.0/mpfr-4.1.0.tar.xz -ftp://ftp.astron.com/pub/file/file-5.39.tar.gz -https://www.musl-libc.org/releases/musl-1.2.1.tar.gz -https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.11.11.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/libcxxabi-11.0.0.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/libunwind-11.0.0.src.tar.xz +https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/lld-11.0.0.src.tar.xz +https://cmake.org/files/v3.20/cmake-3.20.4.tar.gz +https://dist.libuv.org/dist/v1.41.0/libuv-v1.41.0.tar.gz From b15cba4c4d43d0f9f0f6faa57283f390e54e5739 Mon Sep 17 00:00:00 2001 From: dslm4515 <27793627+dslm4515@users.noreply.github.com> Date: Fri, 25 Jun 2021 19:10:31 -0500 Subject: [PATCH 03/14] Upgraded GCC for cgnutools to 10.3.1_git20210424 --- 1-cgnutools/5-GCC-final | 43 +- .../0001-posix_memalign.patch | 4 +- .../0002-gcc-poison-system-directories.patch | 8 +- ...-Turn-on-Wl-z-relro-z-now-by-default.patch | 6 +- ...Y_SOURCE-2-by-default-for-C-C-ObjC-O.patch | 6 +- ...-pass-as-needed-by-default-to-the-li.patch | 4 +- ...rmat-and-Wformat-security-by-default.patch | 4 +- .../0007-Enable-Wtrampolines-by-default.patch | 6 +- ...ostdlib-nodefaultlibs-and-ffreestand.patch | 4 +- ...mt-doesn-t-encounter-problems-during.patch | 4 +- ...clare-asprintf-if-defined-as-a-macro.patch | 4 +- ...opy-PIC-objects-during-build-process.patch | 4 +- .../0012-libitm-disable-FORTIFY.patch | 4 +- .../0013-libgcc_s.patch | 10 +- .../0014-nopie.patch | 4 +- ...ux__-instead-of-__gnu_linux__-for-mu.patch | 4 +- .../0016-dlang-update-zlib-binding.patch | 4 +- ...ix-fcntl-on-mips-add-libucontext-dep.patch | 4 +- .../0018-ada-fix-shared-linking.patch | 4 +- ...build-fix-CXXFLAGS_FOR_BUILD-passing.patch | 4 +- .../0020-add-fortify-headers-paths.patch | 4 +- ...age-provides-libssp_nonshared.a.-We-.patch | 4 +- ...e-pop-state-for-gold-as-well-when-li.patch | 4 +- .../0023-Pure-64-bit-MIPS.patch | 4 +- ...-bit-configuration-where-appropriate.patch | 4 +- .../0025-always-build-libgcc_eh.a.patch | 4 +- ...-ada-libgnarl-compatibility-for-musl.patch | 4 +- .../0027-ada-musl-support-fixes.patch | 4 +- ...o-Use-_off_t-type-instead-of-_loff_t.patch | 4 +- ...0029-gcc-go-Don-t-include-sys-user.h.patch | 4 +- .../0030-gcc-go-Fix-ucontext_t-on-PPC64.patch | 4 +- ...go-Fix-handling-of-signal-34-on-musl.patch | 4 +- ...t64-type-as-offset-argument-for-mmap.patch | 4 +- ...-m-c-tim-fields-in-generated-sysinfo.patch | 4 +- ...go-signal-34-is-special-on-musl-libc.patch | 4 +- ...5-gcc-go-Prefer-_off_t-over-_off64_t.patch | 4 +- ...ef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch | 4 +- .../0037-gcc-go-link-to-libucontext.patch | 4 +- ...rinting-of-unaccessible-ppc64-struct.patch | 4 +- ...time_Musl-Support-v1.2.0-for-32-bits.patch | 4 +- ...able-autolink-libatomic-use-in-LINK_.patch | 8 +- ...ric-errstr.go-implementation-on-musl.patch | 48 ++ .../apply_patches.sh | 46 ++ .../apply_patches_ct.sh | 45 ++ patches/gcc-alpine-10.2.1p2/APKBUILD | 691 ------------------ patches/gcc-alpine-10.2.1p2/get_patches.sh | 45 -- 46 files changed, 230 insertions(+), 868 deletions(-) rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0001-posix_memalign.patch (95%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0002-gcc-poison-system-directories.patch (98%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0003-Turn-on-Wl-z-relro-z-now-by-default.patch (92%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch (93%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch (99%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0006-Enable-Wformat-and-Wformat-security-by-default.patch (95%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0007-Enable-Wtrampolines-by-default.patch (84%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch (96%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch (95%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch (91%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0011-libiberty-copy-PIC-objects-during-build-process.patch (90%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0012-libitm-disable-FORTIFY.patch (92%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0013-libgcc_s.patch (90%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0014-nopie.patch (96%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch (91%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0016-dlang-update-zlib-binding.patch (99%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch (95%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0018-ada-fix-shared-linking.patch (95%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch (89%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0020-add-fortify-headers-paths.patch (91%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch (94%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch (97%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0023-Pure-64-bit-MIPS.patch (96%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0024-use-pure-64-bit-configuration-where-appropriate.patch (98%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0025-always-build-libgcc_eh.a.patch (95%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0026-ada-libgnarl-compatibility-for-musl.patch (98%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0027-ada-musl-support-fixes.patch (99%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch (95%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0029-gcc-go-Don-t-include-sys-user.h.patch (90%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch (93%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch (96%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch (94%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch (94%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0034-gcc-go-signal-34-is-special-on-musl-libc.patch (92%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch (92%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch (91%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0037-gcc-go-link-to-libucontext.patch (90%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch (92%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch (96%) mode change 100755 => 100644 rename patches/{gcc-alpine-10.2.1p2 => gcc-10.3.1_git20210424-alpine}/0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch (98%) mode change 100755 => 100644 create mode 100644 patches/gcc-10.3.1_git20210424-alpine/0041-Use-generic-errstr.go-implementation-on-musl.patch create mode 100755 patches/gcc-10.3.1_git20210424-alpine/apply_patches.sh create mode 100755 patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh delete mode 100755 patches/gcc-alpine-10.2.1p2/APKBUILD delete mode 100755 patches/gcc-alpine-10.2.1p2/get_patches.sh diff --git a/1-cgnutools/5-GCC-final b/1-cgnutools/5-GCC-final index b607e3e..822dbd9 100644 --- a/1-cgnutools/5-GCC-final +++ b/1-cgnutools/5-GCC-final @@ -10,48 +10,7 @@ gunzip -cd ../pkgs/mpc-1.2.1.tar.gz | tar -xf - mv -v mpc-1.2.1 mpc # Apply patches [from Alpine-linux] -for p in 0001-posix_memalign.patch \ - 0002-gcc-poison-system-directories.patch \ - 0003-Turn-on-Wl-z-relro-z-now-by-default.patch \ - 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch \ - 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch \ - 0006-Enable-Wformat-and-Wformat-security-by-default.patch \ - 0007-Enable-Wtrampolines-by-default.patch \ - 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch \ - 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch \ - 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch \ - 0011-libiberty-copy-PIC-objects-during-build-process.patch \ - 0012-libitm-disable-FORTIFY.patch \ - 0013-libgcc_s.patch \ - 0014-nopie.patch \ - 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch \ - 0016-dlang-update-zlib-binding.patch \ - 0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch \ - 0018-ada-fix-shared-linking.patch \ - 0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch \ - 0020-add-fortify-headers-paths.patch \ - 0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch \ - 0023-Pure-64-bit-MIPS.patch \ - 0024-use-pure-64-bit-configuration-where-appropriate.patch \ - 0025-always-build-libgcc_eh.a.patch \ - 0026-ada-libgnarl-compatibility-for-musl.patch \ - 0027-ada-musl-support-fixes.patch \ - 0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch \ - 0029-gcc-go-Don-t-include-sys-user.h.patch \ - 0030-gcc-go-Fix-ucontext_t-on-PPC64.patch \ - 0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch \ - 0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch \ - 0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch \ - 0034-gcc-go-signal-34-is-special-on-musl-libc.patch \ - 0035-gcc-go-Prefer-_off_t-over-_off64_t.patch \ - 0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch \ - 0037-gcc-go-link-to-libucontext.patch \ - 0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch \ - 0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch \ - 0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch -do - patch -Np1 -i ../patches/gcc-alpine-10.2.1p2/$p -done +bash ../patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh # For 64-bit systems, fix a file so GCC installs libraries in 'lib' and not 'lib64' case $(uname -m) in diff --git a/patches/gcc-alpine-10.2.1p2/0001-posix_memalign.patch b/patches/gcc-10.3.1_git20210424-alpine/0001-posix_memalign.patch old mode 100755 new mode 100644 similarity index 95% rename from patches/gcc-alpine-10.2.1p2/0001-posix_memalign.patch rename to patches/gcc-10.3.1_git20210424-alpine/0001-posix_memalign.patch index 5426dfc..34397ae --- a/patches/gcc-alpine-10.2.1p2/0001-posix_memalign.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0001-posix_memalign.patch @@ -1,4 +1,4 @@ -From 7f677ad886b42c475199f7fd40c056691af90e35 Mon Sep 17 00:00:00 2001 +From 00951a574e9698d8549cc5ea1793059849cab47f Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Fri, 26 Jan 2018 20:32:50 +0000 Subject: [PATCH] posix_memalign @@ -38,5 +38,5 @@ index 87344d9383f..ece428df487 100644 else return NULL; -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0002-gcc-poison-system-directories.patch b/patches/gcc-10.3.1_git20210424-alpine/0002-gcc-poison-system-directories.patch old mode 100755 new mode 100644 similarity index 98% rename from patches/gcc-alpine-10.2.1p2/0002-gcc-poison-system-directories.patch rename to patches/gcc-10.3.1_git20210424-alpine/0002-gcc-poison-system-directories.patch index 58d38ac..329cfda --- a/patches/gcc-alpine-10.2.1p2/0002-gcc-poison-system-directories.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0002-gcc-poison-system-directories.patch @@ -1,4 +1,4 @@ -From 4e2ce3fb169bd8d0a692c9916bd8762879a4b307 Mon Sep 17 00:00:00 2001 +From 0cd08ecfaf79062115dd12744068970502b99c01 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 29 Mar 2013 08:59:00 +0400 Subject: [PATCH] gcc: poison-system-directories @@ -26,7 +26,7 @@ Upstream-Status: Pending 7 files changed, 68 insertions(+) diff --git a/gcc/common.opt b/gcc/common.opt -index 9cc47b16cac..d8b2e237d89 100644 +index ec5235c3a41..ca942863064 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -682,6 +682,10 @@ Wreturn-local-addr @@ -120,7 +120,7 @@ index 84dceb8074a..bf64ffbe46f 100644 AC_SUBST(subdirs) AC_SUBST(srcdir) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index 7775bcc72eb..034d3066c2b 100644 +index eabeec944e7..cd31b522e42 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -348,6 +348,7 @@ Objective-C and Objective-C++ Dialects}. @@ -199,5 +199,5 @@ index 8a2bda00f80..9098ab044ab 100644 /* Use given -I paths for #include "..." but not #include <...>, and -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0003-Turn-on-Wl-z-relro-z-now-by-default.patch b/patches/gcc-10.3.1_git20210424-alpine/0003-Turn-on-Wl-z-relro-z-now-by-default.patch old mode 100755 new mode 100644 similarity index 92% rename from patches/gcc-alpine-10.2.1p2/0003-Turn-on-Wl-z-relro-z-now-by-default.patch rename to patches/gcc-10.3.1_git20210424-alpine/0003-Turn-on-Wl-z-relro-z-now-by-default.patch index 03f813f..d5bd8ca --- a/patches/gcc-alpine-10.2.1p2/0003-Turn-on-Wl-z-relro-z-now-by-default.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0003-Turn-on-Wl-z-relro-z-now-by-default.patch @@ -1,4 +1,4 @@ -From fb482d4dfeba07edf4c74f5e139ac74365672859 Mon Sep 17 00:00:00 2001 +From f0338445838d12a82c803c1579653332e2710157 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:45:49 +0000 Subject: [PATCH] Turn on -Wl,-z,relro,-z,now by default. @@ -9,7 +9,7 @@ Subject: [PATCH] Turn on -Wl,-z,relro,-z,now by default. 2 files changed, 4 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index 034d3066c2b..4885efe3247 100644 +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 @@ -35,5 +35,5 @@ index b2200c5185a..625c9ab7902 100644 %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ %{Wno-poison-system-directories:--no-poison-system-directories} \ -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch b/patches/gcc-10.3.1_git20210424-alpine/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch old mode 100755 new mode 100644 similarity index 93% rename from patches/gcc-alpine-10.2.1p2/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch rename to patches/gcc-10.3.1_git20210424-alpine/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch index f423d19..a9fcf03 --- a/patches/gcc-alpine-10.2.1p2/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch @@ -1,4 +1,4 @@ -From 5060f83f84478ddfa288ce8498bc1067d201f878 Mon Sep 17 00:00:00 2001 +From 6aa52d7bf25389177c389ea77eb477e7952d1154 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:46:22 +0000 Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, @@ -25,7 +25,7 @@ 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 4885efe3247..a3e5e002fa5 100644 +index 17d371ef432..fe793ac08db 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -9230,6 +9230,12 @@ also turns on the following optimization flags: @@ -42,5 +42,5 @@ index 4885efe3247..a3e5e002fa5 100644 @opindex O3 Optimize yet more. @option{-O3} turns on all optimizations specified -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch b/patches/gcc-10.3.1_git20210424-alpine/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch old mode 100755 new mode 100644 similarity index 99% rename from patches/gcc-alpine-10.2.1p2/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch rename to patches/gcc-10.3.1_git20210424-alpine/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch index 3332095..ac31d32 --- a/patches/gcc-alpine-10.2.1p2/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch @@ -1,4 +1,4 @@ -From 42fe81fa3cb44239b40833e9044109447000b64f Mon Sep 17 00:00:00 2001 +From 7b624ee24d9299889c35c84303811012f8b8f1d2 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:46:56 +0000 Subject: [PATCH] On linux targets pass --as-needed by default to the linker, @@ -265,5 +265,5 @@ index 625c9ab7902..7aec9d3a016 100644 #else #define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0006-Enable-Wformat-and-Wformat-security-by-default.patch b/patches/gcc-10.3.1_git20210424-alpine/0006-Enable-Wformat-and-Wformat-security-by-default.patch old mode 100755 new mode 100644 similarity index 95% rename from patches/gcc-alpine-10.2.1p2/0006-Enable-Wformat-and-Wformat-security-by-default.patch rename to patches/gcc-10.3.1_git20210424-alpine/0006-Enable-Wformat-and-Wformat-security-by-default.patch index 29ccebb..39c1b41 --- a/patches/gcc-alpine-10.2.1p2/0006-Enable-Wformat-and-Wformat-security-by-default.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0006-Enable-Wformat-and-Wformat-security-by-default.patch @@ -1,4 +1,4 @@ -From f9dd3a98cf0bcdfb76a435f9c5ee8ac32eb0de56 Mon Sep 17 00:00:00 2001 +From 7eed1ed7399593864a097360f778e2409deb663c Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:47:43 +0000 Subject: [PATCH] Enable -Wformat and -Wformat-security by default. @@ -30,5 +30,5 @@ index c49da99d395..93f25319005 100644 Wformat-overflow= -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0007-Enable-Wtrampolines-by-default.patch b/patches/gcc-10.3.1_git20210424-alpine/0007-Enable-Wtrampolines-by-default.patch old mode 100755 new mode 100644 similarity index 84% rename from patches/gcc-alpine-10.2.1p2/0007-Enable-Wtrampolines-by-default.patch rename to patches/gcc-10.3.1_git20210424-alpine/0007-Enable-Wtrampolines-by-default.patch index 519683e..9fd6afb --- a/patches/gcc-alpine-10.2.1p2/0007-Enable-Wtrampolines-by-default.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0007-Enable-Wtrampolines-by-default.patch @@ -1,4 +1,4 @@ -From c6b661d1d4e1e551c132f6fcf44a81eb417d0f36 Mon Sep 17 00:00:00 2001 +From 63c5bf27194fbc27c6630f325b5d976aad87c5d5 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:48:24 +0000 Subject: [PATCH] Enable -Wtrampolines by default. @@ -8,7 +8,7 @@ Subject: [PATCH] Enable -Wtrampolines by default. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/common.opt b/gcc/common.opt -index d8b2e237d89..5087ae84d49 100644 +index ca942863064..0a0ab6195ee 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -774,7 +774,7 @@ Common Var(warn_system_headers) Warning @@ -21,5 +21,5 @@ index d8b2e237d89..5087ae84d49 100644 Wtype-limits -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch b/patches/gcc-10.3.1_git20210424-alpine/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch old mode 100755 new mode 100644 similarity index 96% rename from patches/gcc-alpine-10.2.1p2/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch rename to patches/gcc-10.3.1_git20210424-alpine/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch index d9be290..68395ff --- a/patches/gcc-alpine-10.2.1p2/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch @@ -1,4 +1,4 @@ -From dfd381bf37b960deb80833c6adc6b60602b93ce4 Mon Sep 17 00:00:00 2001 +From c28375576bd7ab89389c9208447a490596aa759f Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:49:40 +0000 Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding @@ -49,5 +49,5 @@ index 4aec480798b..eaecfab37ad 100644 -param=stack-clash-protection-guard-size= -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch b/patches/gcc-10.3.1_git20210424-alpine/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch old mode 100755 new mode 100644 similarity index 95% rename from patches/gcc-alpine-10.2.1p2/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch rename to patches/gcc-10.3.1_git20210424-alpine/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch index 4c69672..40ab0bf --- a/patches/gcc-alpine-10.2.1p2/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch @@ -1,4 +1,4 @@ -From 88ae4cb1c9c1c0aeb229a3947a844c5efa7cd090 Mon Sep 17 00:00:00 2001 +From 85baea39858509dacfc235396f6fbd79ac23d50d Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:50:33 +0000 Subject: [PATCH] Ensure that msgfmt doesn't encounter problems during gcc @@ -50,5 +50,5 @@ index a0f84b0cfa0..ab24a47a2fd 100644 all-local: all-local-$(USE_NLS) -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch b/patches/gcc-10.3.1_git20210424-alpine/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch old mode 100755 new mode 100644 similarity index 91% rename from patches/gcc-alpine-10.2.1p2/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch rename to patches/gcc-10.3.1_git20210424-alpine/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch index fa319d6..30e1872 --- a/patches/gcc-alpine-10.2.1p2/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch @@ -1,4 +1,4 @@ -From 568c48aac107ba0e5e6dd58f69d2d705c811c2d2 Mon Sep 17 00:00:00 2001 +From fb7d03c7ea97fc785327fd00b302c7ac17779837 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:52:07 +0000 Subject: [PATCH] Don't declare asprintf if defined as a macro. @@ -24,5 +24,5 @@ index 141cb886a85..fa0e78eb62f 100644 /* Like asprintf but allocates memory without fail. This works like xmalloc. */ -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0011-libiberty-copy-PIC-objects-during-build-process.patch b/patches/gcc-10.3.1_git20210424-alpine/0011-libiberty-copy-PIC-objects-during-build-process.patch old mode 100755 new mode 100644 similarity index 90% rename from patches/gcc-alpine-10.2.1p2/0011-libiberty-copy-PIC-objects-during-build-process.patch rename to patches/gcc-10.3.1_git20210424-alpine/0011-libiberty-copy-PIC-objects-during-build-process.patch index 850e65c..3d2c5d1 --- a/patches/gcc-alpine-10.2.1p2/0011-libiberty-copy-PIC-objects-during-build-process.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0011-libiberty-copy-PIC-objects-during-build-process.patch @@ -1,4 +1,4 @@ -From 22acb7d287fc3ac3c34638da42df50c2ecd17e49 Mon Sep 17 00:00:00 2001 +From 07467a2a24bd15a6a28154a33441adc1291789d6 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:53:00 +0000 Subject: [PATCH] libiberty: copy PIC objects during build process @@ -20,5 +20,5 @@ index d6b302e02fd..fd39928546f 100644 else true; fi -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0012-libitm-disable-FORTIFY.patch b/patches/gcc-10.3.1_git20210424-alpine/0012-libitm-disable-FORTIFY.patch old mode 100755 new mode 100644 similarity index 92% rename from patches/gcc-alpine-10.2.1p2/0012-libitm-disable-FORTIFY.patch rename to patches/gcc-10.3.1_git20210424-alpine/0012-libitm-disable-FORTIFY.patch index 1a87f84..b5669fb --- a/patches/gcc-alpine-10.2.1p2/0012-libitm-disable-FORTIFY.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0012-libitm-disable-FORTIFY.patch @@ -1,4 +1,4 @@ -From ecc9a1c23abf1eb20a7e159de747325804a7396c Mon Sep 17 00:00:00 2001 +From 07517ed455bf3f03b1be7a5c72d3705b22780a15 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:53:36 +0000 Subject: [PATCH] libitm: disable FORTIFY @@ -29,5 +29,5 @@ index d1beb5c9ec8..c2b50b95c01 100644 # work out any special compilation flags as necessary. case "${target_cpu}" in -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0013-libgcc_s.patch b/patches/gcc-10.3.1_git20210424-alpine/0013-libgcc_s.patch old mode 100755 new mode 100644 similarity index 90% rename from patches/gcc-alpine-10.2.1p2/0013-libgcc_s.patch rename to patches/gcc-10.3.1_git20210424-alpine/0013-libgcc_s.patch index 2287049..70cbbab --- a/patches/gcc-alpine-10.2.1p2/0013-libgcc_s.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0013-libgcc_s.patch @@ -1,4 +1,4 @@ -From b4f94211af85b9113c44586d6ac23bf61e5642a5 Mon Sep 17 00:00:00 2001 +From b74afde10094923279a408ff56ea99cff6c259ae Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sat, 24 Oct 2015 20:09:53 +0000 Subject: [PATCH] libgcc_s @@ -10,7 +10,7 @@ Subject: [PATCH] libgcc_s 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c -index 3942d412891..53bd0adca08 100644 +index 47d52550e5e..9cb8cc7950e 100644 --- a/gcc/config/i386/i386-expand.c +++ b/gcc/config/i386/i386-expand.c @@ -10976,10 +10976,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, @@ -27,10 +27,10 @@ index 3942d412891..53bd0adca08 100644 return expand_expr (call_expr, target, mode, EXPAND_NORMAL); } diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c -index cf5f0884bb4..ed0381e7744 100644 +index 83301a1445f..89fdc7eb587 100644 --- a/libgcc/config/i386/cpuinfo.c +++ b/libgcc/config/i386/cpuinfo.c -@@ -510,7 +510,7 @@ __cpu_indicator_init (void) +@@ -516,7 +516,7 @@ __cpu_indicator_init (void) return 0; } @@ -53,5 +53,5 @@ index 8506a635790..564296f788e 100644 +HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS) CRTSTUFF_T_CFLAGS += $(CET_FLAGS) -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0014-nopie.patch b/patches/gcc-10.3.1_git20210424-alpine/0014-nopie.patch old mode 100755 new mode 100644 similarity index 96% rename from patches/gcc-alpine-10.2.1p2/0014-nopie.patch rename to patches/gcc-10.3.1_git20210424-alpine/0014-nopie.patch index 530cff5..f4b0b4e --- a/patches/gcc-alpine-10.2.1p2/0014-nopie.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0014-nopie.patch @@ -1,4 +1,4 @@ -From a6e8f49c183c1cca21c8f291683bd84181168a28 Mon Sep 17 00:00:00 2001 +From e73096ae33c1ebf2833deab647ca825229c533f1 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sat, 7 Nov 2015 02:08:05 +0000 Subject: [PATCH] nopie @@ -71,5 +71,5 @@ index bf64ffbe46f..9c2571de709 100644 AC_SUBST([NO_PIE_FLAG]) -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch b/patches/gcc-10.3.1_git20210424-alpine/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch old mode 100755 new mode 100644 similarity index 91% rename from patches/gcc-alpine-10.2.1p2/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch rename to patches/gcc-10.3.1_git20210424-alpine/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch index 1cb91e4..064cb18 --- a/patches/gcc-alpine-10.2.1p2/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch @@ -1,4 +1,4 @@ -From 8fe40b74a707b236b067e538c5fd553671986e8c Mon Sep 17 00:00:00 2001 +From d56bf713ed0d248fccb445ac475ad69d9430bb96 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:57:09 +0000 Subject: [PATCH] libffi: use __linux__ instead of __gnu_linux__ for musl @@ -21,5 +21,5 @@ index 721ff00ea43..22a699c6340 100644 with both write and execute permission. Code compiled when this option is defined will attempt to map such pages once, but if it -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0016-dlang-update-zlib-binding.patch b/patches/gcc-10.3.1_git20210424-alpine/0016-dlang-update-zlib-binding.patch old mode 100755 new mode 100644 similarity index 99% rename from patches/gcc-alpine-10.2.1p2/0016-dlang-update-zlib-binding.patch rename to patches/gcc-10.3.1_git20210424-alpine/0016-dlang-update-zlib-binding.patch index 82ca558..4260fce --- a/patches/gcc-alpine-10.2.1p2/0016-dlang-update-zlib-binding.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0016-dlang-update-zlib-binding.patch @@ -1,4 +1,4 @@ -From 2df5298b209771e26d7f5fa08f7d0c9480a75da1 Mon Sep 17 00:00:00 2001 +From 6175b540b25a9d899772a7354a6ac2ae77c311ae Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:57:51 +0000 Subject: [PATCH] dlang: update zlib binding @@ -421,5 +421,5 @@ index e6cce240fd5..bd2fe37ebec 100644 } -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch b/patches/gcc-10.3.1_git20210424-alpine/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch old mode 100755 new mode 100644 similarity index 95% rename from patches/gcc-alpine-10.2.1p2/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch rename to patches/gcc-10.3.1_git20210424-alpine/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch index dcd553f..4621799 --- a/patches/gcc-alpine-10.2.1p2/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch @@ -1,4 +1,4 @@ -From a58c6c233b60918ce6c24b26a9902b14d089c1d4 Mon Sep 17 00:00:00 2001 +From 578f3d719c1154a38a5cf84217e3cb124da45ad8 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:58:22 +0000 Subject: [PATCH] dlang: fix fcntl on mips, add libucontext dep @@ -47,5 +47,5 @@ index 9febcff849b..cb34e2108bd 100644 static assert(0, "Platform not supported"); -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0018-ada-fix-shared-linking.patch b/patches/gcc-10.3.1_git20210424-alpine/0018-ada-fix-shared-linking.patch old mode 100755 new mode 100644 similarity index 95% rename from patches/gcc-alpine-10.2.1p2/0018-ada-fix-shared-linking.patch rename to patches/gcc-10.3.1_git20210424-alpine/0018-ada-fix-shared-linking.patch index d81e652..cac5918 --- a/patches/gcc-alpine-10.2.1p2/0018-ada-fix-shared-linking.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0018-ada-fix-shared-linking.patch @@ -1,4 +1,4 @@ -From d346eb31b11cc43dec7d065f4490b91b5c0f57b6 Mon Sep 17 00:00:00 2001 +From b3bcc4fc43170f9914772c543778560c5e473fae Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:59:16 +0000 Subject: [PATCH] ada: fix shared linking @@ -38,5 +38,5 @@ index 02c413a412f..f0e52a87d6e 100644 unsigned char __gnat_objlist_file_supported = 1; const char *__gnat_object_library_extension = ".a"; -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch b/patches/gcc-10.3.1_git20210424-alpine/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch old mode 100755 new mode 100644 similarity index 89% rename from patches/gcc-alpine-10.2.1p2/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch rename to patches/gcc-10.3.1_git20210424-alpine/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch index b2fa9b2..11aec7c --- a/patches/gcc-alpine-10.2.1p2/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch @@ -1,4 +1,4 @@ -From 185eef3c999917794ba98f179aedfeb7beda6d4a Mon Sep 17 00:00:00 2001 +From e85513f5bb1884b60d0e261e23366c3291b50d67 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:59:43 +0000 Subject: [PATCH] build: fix CXXFLAGS_FOR_BUILD passing @@ -20,5 +20,5 @@ index 36e369df6e7..63627db68cf 100644 # This is the list of directories to built for the host system. -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0020-add-fortify-headers-paths.patch b/patches/gcc-10.3.1_git20210424-alpine/0020-add-fortify-headers-paths.patch old mode 100755 new mode 100644 similarity index 91% rename from patches/gcc-alpine-10.2.1p2/0020-add-fortify-headers-paths.patch rename to patches/gcc-10.3.1_git20210424-alpine/0020-add-fortify-headers-paths.patch index a1c896d..1954992 --- a/patches/gcc-alpine-10.2.1p2/0020-add-fortify-headers-paths.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0020-add-fortify-headers-paths.patch @@ -1,4 +1,4 @@ -From 9f08de987aeef085815c3b9e8db38df68f911dd5 Mon Sep 17 00:00:00 2001 +From ba67e2205fb47afeb91c7c2ee575e426c0629845 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 07:01:06 +0000 Subject: [PATCH] add fortify-headers paths @@ -21,5 +21,5 @@ index 95654bcdb5a..d88df8f154a 100644 { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, #else -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch b/patches/gcc-10.3.1_git20210424-alpine/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch old mode 100755 new mode 100644 similarity index 94% rename from patches/gcc-alpine-10.2.1p2/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch rename to patches/gcc-10.3.1_git20210424-alpine/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch index 1d9214d..c276394 --- a/patches/gcc-alpine-10.2.1p2/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch @@ -1,4 +1,4 @@ -From cb9f97da85fa2ef271f870d131da4fc0234edd22 Mon Sep 17 00:00:00 2001 +From 76a7d4998303fe4229c814ea87621af94cb26f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 21 Aug 2020 07:03:00 +0000 Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to @@ -27,5 +27,5 @@ index daeb4d0c8ea..6920bec0fa0 100644 #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ "|fstack-protector-strong|fstack-protector-explicit" \ -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch b/patches/gcc-10.3.1_git20210424-alpine/0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch old mode 100755 new mode 100644 similarity index 97% rename from patches/gcc-alpine-10.2.1p2/0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch rename to patches/gcc-10.3.1_git20210424-alpine/0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch index 51bae04..a94f460 --- a/patches/gcc-alpine-10.2.1p2/0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch @@ -1,4 +1,4 @@ -From 41ca432ae6e8d37fb79d8536bcca36325a2e3fbf Mon Sep 17 00:00:00 2001 +From 81735c7800b3369361c40103d6d479239fa779d7 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 07:03:42 +0000 Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when @@ -65,5 +65,5 @@ index 6920bec0fa0..40e07354b3d 100644 #else #define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0023-Pure-64-bit-MIPS.patch b/patches/gcc-10.3.1_git20210424-alpine/0023-Pure-64-bit-MIPS.patch old mode 100755 new mode 100644 similarity index 96% rename from patches/gcc-alpine-10.2.1p2/0023-Pure-64-bit-MIPS.patch rename to patches/gcc-10.3.1_git20210424-alpine/0023-Pure-64-bit-MIPS.patch index 2a5bd76..0b52517 --- a/patches/gcc-alpine-10.2.1p2/0023-Pure-64-bit-MIPS.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0023-Pure-64-bit-MIPS.patch @@ -1,4 +1,4 @@ -From f72aaed9670755141b57856cb743dff06dbf3f8c Mon Sep 17 00:00:00 2001 +From bd3e178619a7d45b2b22141a2b83f67bc27b229a Mon Sep 17 00:00:00 2001 From: Nils Andreas Svee Date: Thu, 21 Dec 2017 03:14:33 +0100 Subject: [PATCH] Pure 64-bit MIPS @@ -43,5 +43,5 @@ index ceb58d3b5f3..8116e23ebba 100644 + ../lib32 \ + ../lib -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0024-use-pure-64-bit-configuration-where-appropriate.patch b/patches/gcc-10.3.1_git20210424-alpine/0024-use-pure-64-bit-configuration-where-appropriate.patch old mode 100755 new mode 100644 similarity index 98% rename from patches/gcc-alpine-10.2.1p2/0024-use-pure-64-bit-configuration-where-appropriate.patch rename to patches/gcc-10.3.1_git20210424-alpine/0024-use-pure-64-bit-configuration-where-appropriate.patch index 3e072d8..fa29a93 --- a/patches/gcc-alpine-10.2.1p2/0024-use-pure-64-bit-configuration-where-appropriate.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0024-use-pure-64-bit-configuration-where-appropriate.patch @@ -1,4 +1,4 @@ -From 845c26f4374be2f92b929bd58529b998a8f246d5 Mon Sep 17 00:00:00 2001 +From d5e2025be98fd345549d41067eac3fd3fe201a4e Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 07:04:40 +0000 Subject: [PATCH] use pure 64-bit configuration where appropriate @@ -117,5 +117,5 @@ index cc6ab367072..7f498ee1cdc 100644 +MULTILIB_OSDIRNAMES = m64=../lib +MULTILIB_OSDIRNAMES+= m32=../lib32 -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0025-always-build-libgcc_eh.a.patch b/patches/gcc-10.3.1_git20210424-alpine/0025-always-build-libgcc_eh.a.patch old mode 100755 new mode 100644 similarity index 95% rename from patches/gcc-alpine-10.2.1p2/0025-always-build-libgcc_eh.a.patch rename to patches/gcc-10.3.1_git20210424-alpine/0025-always-build-libgcc_eh.a.patch index 1faa117..125deef --- a/patches/gcc-alpine-10.2.1p2/0025-always-build-libgcc_eh.a.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0025-always-build-libgcc_eh.a.patch @@ -1,4 +1,4 @@ -From d7e5efd9f7cedbbf7595a2401232ed9e50855e10 Mon Sep 17 00:00:00 2001 +From 6a51ad76380daed31a4eadcee844647452ce6dfd Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 07:05:41 +0000 Subject: [PATCH] always build libgcc_eh.a @@ -47,5 +47,5 @@ index 851e7657d07..99ec513a1a6 100644 for file in $$parts; do \ rm -f $(DESTDIR)$(inst_libdir)/$$file; \ -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0026-ada-libgnarl-compatibility-for-musl.patch b/patches/gcc-10.3.1_git20210424-alpine/0026-ada-libgnarl-compatibility-for-musl.patch old mode 100755 new mode 100644 similarity index 98% rename from patches/gcc-alpine-10.2.1p2/0026-ada-libgnarl-compatibility-for-musl.patch rename to patches/gcc-10.3.1_git20210424-alpine/0026-ada-libgnarl-compatibility-for-musl.patch index 521d338..2150473 --- a/patches/gcc-alpine-10.2.1p2/0026-ada-libgnarl-compatibility-for-musl.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0026-ada-libgnarl-compatibility-for-musl.patch @@ -1,4 +1,4 @@ -From 495716af9b2f34fedfec2cd086218622d4539b95 Mon Sep 17 00:00:00 2001 +From 4ce9b92262575e2484836fb9bffca08be99b9a4b Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 07:06:30 +0000 Subject: [PATCH] ada: libgnarl compatibility for musl @@ -131,5 +131,5 @@ index c45559e5ba0..0b0f173e7d4 100644 pragma Assert (Result in 0 | ENOMEM); -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0027-ada-musl-support-fixes.patch b/patches/gcc-10.3.1_git20210424-alpine/0027-ada-musl-support-fixes.patch old mode 100755 new mode 100644 similarity index 99% rename from patches/gcc-alpine-10.2.1p2/0027-ada-musl-support-fixes.patch rename to patches/gcc-10.3.1_git20210424-alpine/0027-ada-musl-support-fixes.patch index c10ce5c..e213959 --- a/patches/gcc-alpine-10.2.1p2/0027-ada-musl-support-fixes.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0027-ada-musl-support-fixes.patch @@ -1,4 +1,4 @@ -From 9c13a3e217a834961ba2d8ff306dbdfa1d0c2b3a Mon Sep 17 00:00:00 2001 +From 61c266f5703b9032fc2afaa98756f89cfe62d897 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 07:07:48 +0000 Subject: [PATCH] ada: musl support fixes @@ -219,5 +219,5 @@ index af4417fab90..bab6bf3ca87 100644 status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL); #elif defined (USE_CLONE_DEVICE) -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch b/patches/gcc-10.3.1_git20210424-alpine/0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch old mode 100755 new mode 100644 similarity index 95% rename from patches/gcc-alpine-10.2.1p2/0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch rename to patches/gcc-10.3.1_git20210424-alpine/0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch index eec2c68..5752caa --- a/patches/gcc-alpine-10.2.1p2/0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch @@ -1,4 +1,4 @@ -From bf299df459a092ccc5837d8debb87340e2b9f9f9 Mon Sep 17 00:00:00 2001 +From e4d804bdeb899b4a1d6539a3ad1404ad417f6abc Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 30 Aug 2020 17:58:08 +0200 Subject: [PATCH] gcc-go: Use _off_t type instead of _loff_t @@ -44,5 +44,5 @@ index 88286c07b6e..f8f5cfb5011 100644 } n, err = splice(rfd, plroff, wfd, plwoff, len, flags) -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0029-gcc-go-Don-t-include-sys-user.h.patch b/patches/gcc-10.3.1_git20210424-alpine/0029-gcc-go-Don-t-include-sys-user.h.patch old mode 100755 new mode 100644 similarity index 90% rename from patches/gcc-alpine-10.2.1p2/0029-gcc-go-Don-t-include-sys-user.h.patch rename to patches/gcc-10.3.1_git20210424-alpine/0029-gcc-go-Don-t-include-sys-user.h.patch index 3079b17..2a7181f --- a/patches/gcc-alpine-10.2.1p2/0029-gcc-go-Don-t-include-sys-user.h.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0029-gcc-go-Don-t-include-sys-user.h.patch @@ -1,4 +1,4 @@ -From 3744f900210676e958cadc95d2ccbf3cfe9ddef0 Mon Sep 17 00:00:00 2001 +From e04850ade73b4e9de9e95438f80bb4c0325168d8 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 30 Aug 2020 17:58:21 +0200 Subject: [PATCH] gcc-go: Don't include sys/user.h @@ -26,5 +26,5 @@ index 0692fd41eb7..c8d987358d9 100644 #include #endif -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch b/patches/gcc-10.3.1_git20210424-alpine/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch old mode 100755 new mode 100644 similarity index 93% rename from patches/gcc-alpine-10.2.1p2/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch rename to patches/gcc-10.3.1_git20210424-alpine/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch index 34143b7..3308afa --- a/patches/gcc-alpine-10.2.1p2/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch @@ -1,4 +1,4 @@ -From 692dd486291e793f71a4e69b0b0c88049fc48f5a Mon Sep 17 00:00:00 2001 +From dee0f4faec19854beee5e258e91e40544fead83d Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 30 Aug 2020 17:59:22 +0200 Subject: [PATCH] gcc-go: Fix ucontext_t on PPC64 @@ -25,5 +25,5 @@ index b429fdb2403..fd1c885f043 100644 ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.jmp_context.iar; #elif defined(__aarch64__) && defined(__linux__) -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch b/patches/gcc-10.3.1_git20210424-alpine/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch old mode 100755 new mode 100644 similarity index 96% rename from patches/gcc-alpine-10.2.1p2/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch rename to patches/gcc-10.3.1_git20210424-alpine/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch index 66d2e7b..8531ba0 --- a/patches/gcc-alpine-10.2.1p2/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch @@ -1,4 +1,4 @@ -From 6a648db23fbbafbc9d13f2981a403fd747bb8fa7 Mon Sep 17 00:00:00 2001 +From 7c91fa8d1061a7dfe29081449cab03b8a3eae27f Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 30 Aug 2020 17:59:45 +0200 Subject: [PATCH] gcc-go: Fix handling of signal 34 on musl @@ -39,5 +39,5 @@ index 11e4ec436bd..fe866eacb27 100644 if test "${GOOS}" = "aix"; then -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch b/patches/gcc-10.3.1_git20210424-alpine/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch old mode 100755 new mode 100644 similarity index 94% rename from patches/gcc-alpine-10.2.1p2/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch rename to patches/gcc-10.3.1_git20210424-alpine/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch index 2a56e81..5c1892c --- a/patches/gcc-alpine-10.2.1p2/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch @@ -1,4 +1,4 @@ -From 4728164c5e66cf169676f9c3e4e5a1e99ee84fe2 Mon Sep 17 00:00:00 2001 +From 2b990c08be4548705261e067233f798520a6ace0 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 30 Aug 2020 18:01:03 +0200 Subject: [PATCH] gcc-go: Use int64 type as offset argument for mmap @@ -34,5 +34,5 @@ index ba38ebaa9ab..3c9e5ce9461 100644 if uintptr(p) == _MAP_FAILED { return nil, errno() -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch b/patches/gcc-10.3.1_git20210424-alpine/0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch old mode 100755 new mode 100644 similarity index 94% rename from patches/gcc-alpine-10.2.1p2/0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch rename to patches/gcc-10.3.1_git20210424-alpine/0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch index 2a64f01..485a418 --- a/patches/gcc-alpine-10.2.1p2/0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch @@ -1,4 +1,4 @@ -From b97a1de83b158aebe92c248c126e783eb834f685 Mon Sep 17 00:00:00 2001 +From d42dbc871f149f658b6c3379bbc531efe427253b Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 30 Aug 2020 18:02:28 +0200 Subject: [PATCH] gcc-go: Fix st_{a,m,c}tim fields in generated sysinfo.go @@ -33,5 +33,5 @@ index bd2ba32cba1..972e2c379bc 100755 -e 's/\([^a-zA-Z0-9_]\)_timespec_t\([^a-zA-Z0-9_]\)/\1Timespec\2/g' \ -e 's/\([^a-zA-Z0-9_]\)_st_timespec_t\([^a-zA-Z0-9_]\)/\1StTimespec\2/g' \ -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0034-gcc-go-signal-34-is-special-on-musl-libc.patch b/patches/gcc-10.3.1_git20210424-alpine/0034-gcc-go-signal-34-is-special-on-musl-libc.patch old mode 100755 new mode 100644 similarity index 92% rename from patches/gcc-alpine-10.2.1p2/0034-gcc-go-signal-34-is-special-on-musl-libc.patch rename to patches/gcc-10.3.1_git20210424-alpine/0034-gcc-go-signal-34-is-special-on-musl-libc.patch index f1d28f4..b085e03 --- a/patches/gcc-alpine-10.2.1p2/0034-gcc-go-signal-34-is-special-on-musl-libc.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0034-gcc-go-signal-34-is-special-on-musl-libc.patch @@ -1,4 +1,4 @@ -From 0ef3b93fe71550e08635a16e107a108c97674c9c Mon Sep 17 00:00:00 2001 +From aecc0619fab1b89a88bda30080417c0ddbb5d2aa Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 30 Aug 2020 18:03:03 +0200 Subject: [PATCH] gcc-go: signal 34 is special on musl libc @@ -25,5 +25,5 @@ index c555712a03c..9e228580d37 100644 } throw("sigaction read failure") -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch b/patches/gcc-10.3.1_git20210424-alpine/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch old mode 100755 new mode 100644 similarity index 92% rename from patches/gcc-alpine-10.2.1p2/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch rename to patches/gcc-10.3.1_git20210424-alpine/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch index e591a8b..1859b88 --- a/patches/gcc-alpine-10.2.1p2/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch @@ -1,4 +1,4 @@ -From 655dad8a3dd573f00d4a82a15dc6e998627789ae Mon Sep 17 00:00:00 2001 +From c988692ec6b151541088b1b48a29d6a54269f55c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Sun, 30 Aug 2020 19:26:53 +0200 Subject: [PATCH] gcc-go: Prefer _off_t over _off64_t @@ -26,5 +26,5 @@ index 972e2c379bc..8d6da15f983 100755 echo "type Pid_t _pid_t" >> ${OUT} echo "type Uid_t _uid_t" >> ${OUT} -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch b/patches/gcc-10.3.1_git20210424-alpine/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch old mode 100755 new mode 100644 similarity index 91% rename from patches/gcc-alpine-10.2.1p2/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch rename to patches/gcc-10.3.1_git20210424-alpine/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch index ed22766..a2c0c03 --- a/patches/gcc-alpine-10.2.1p2/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch @@ -1,4 +1,4 @@ -From 22a7ca2e5cf4ba58373b8c0898ec87a98b0e1409 Mon Sep 17 00:00:00 2001 +From f634ef3142f759c8220830b77487fe9686ee0f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Sun, 30 Aug 2020 19:27:51 +0200 Subject: [PATCH] gcc-go: undef SETCONTEXT_CLOBBERS_TLS in proc.c @@ -23,5 +23,5 @@ index 6f7d2e27996..5afd7902497 100644 static inline void -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0037-gcc-go-link-to-libucontext.patch b/patches/gcc-10.3.1_git20210424-alpine/0037-gcc-go-link-to-libucontext.patch old mode 100755 new mode 100644 similarity index 90% rename from patches/gcc-alpine-10.2.1p2/0037-gcc-go-link-to-libucontext.patch rename to patches/gcc-10.3.1_git20210424-alpine/0037-gcc-go-link-to-libucontext.patch index d4cb53e..a9befb1 --- a/patches/gcc-alpine-10.2.1p2/0037-gcc-go-link-to-libucontext.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0037-gcc-go-link-to-libucontext.patch @@ -1,4 +1,4 @@ -From 0c3a9827fb4e8b497c8a634c654218e6396052ba Mon Sep 17 00:00:00 2001 +From 13f05ade4843b355a96d72cf3464694e5eca641e Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 31 Aug 2020 08:59:40 +0200 Subject: [PATCH] gcc-go: link to libucontext @@ -21,5 +21,5 @@ index 63627db68cf..c7f1f84d683 100644 --srcdir=$${topdir}/$$module_srcdir \ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch b/patches/gcc-10.3.1_git20210424-alpine/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch old mode 100755 new mode 100644 similarity index 92% rename from patches/gcc-alpine-10.2.1p2/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch rename to patches/gcc-10.3.1_git20210424-alpine/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch index 284b765..86793d8 --- a/patches/gcc-alpine-10.2.1p2/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch @@ -1,4 +1,4 @@ -From 75c873d4960c6e4ab8ce2cfd76292a7ed3e5dcb3 Mon Sep 17 00:00:00 2001 +From 6fb1014e9a20deb8c634fc12dd9a146a800e6b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Mon, 31 Aug 2020 20:26:56 +0200 Subject: [PATCH] gcc-go: Disable printing of unaccessible ppc64 struct members @@ -22,5 +22,5 @@ index fd1c885f043..e845e453332 100644 mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext; int i; -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch b/patches/gcc-10.3.1_git20210424-alpine/0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch old mode 100755 new mode 100644 similarity index 96% rename from patches/gcc-alpine-10.2.1p2/0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch rename to patches/gcc-10.3.1_git20210424-alpine/0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch index 43a9212..bd5d628 --- a/patches/gcc-alpine-10.2.1p2/0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch @@ -1,4 +1,4 @@ -From 87a0724adb020a5c77c544a2571c4d5e7fcc342a Mon Sep 17 00:00:00 2001 +From ae168d35da22feaa01f9f77f7b578aa05cd50c96 Mon Sep 17 00:00:00 2001 From: Geod24 Date: Mon, 16 Nov 2020 18:40:46 +0100 Subject: [PATCH] CRuntime_Musl: Support v1.2.0 for 32 bits @@ -49,5 +49,5 @@ index 451c8b4fccc..ca654fbe424 100644 alias c_ulong pthread_t; version (D_LP64) -- -2.30.1 +2.31.0 diff --git a/patches/gcc-alpine-10.2.1p2/0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch b/patches/gcc-10.3.1_git20210424-alpine/0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch old mode 100755 new mode 100644 similarity index 98% rename from patches/gcc-alpine-10.2.1p2/0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch rename to patches/gcc-10.3.1_git20210424-alpine/0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch index 5956a0c..1ba5828 --- a/patches/gcc-alpine-10.2.1p2/0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch @@ -1,4 +1,4 @@ -From 839ad12c290327d3ae4d35eede0317803a4615de Mon Sep 17 00:00:00 2001 +From bfb6df1638635136c4fd8960575331476fb68d04 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 9 Dec 2020 16:07:26 +0000 Subject: [PATCH] configure: Add --enable-autolink-libatomic, use in @@ -198,7 +198,7 @@ index 7d98ec4190a..a58d5a05be2 100644 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 64e7b003a48..fc2d1a55921 100644 +index fcb7245e95c..67b485e8d0c 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. @@ -217,7 +217,7 @@ index 64e7b003a48..fc2d1a55921 100644 @defmac POST_LINK_SPEC diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in -index e31cdb251b5..d25d809b7ce 100644 +index c17209daa51..3ec63f6d091 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. @@ -265,5 +265,5 @@ index 40e07354b3d..81bd50b4d7c 100644 #ifdef ENABLE_DEFAULT_SSP -- -2.30.1 +2.31.0 diff --git a/patches/gcc-10.3.1_git20210424-alpine/0041-Use-generic-errstr.go-implementation-on-musl.patch b/patches/gcc-10.3.1_git20210424-alpine/0041-Use-generic-errstr.go-implementation-on-musl.patch new file mode 100644 index 0000000..1561a7c --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0041-Use-generic-errstr.go-implementation-on-musl.patch @@ -0,0 +1,48 @@ +From 3bc47945dab0108423dbaa211332817c4784b3db Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B6ren=20Tempel?= +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.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/apply_patches.sh b/patches/gcc-10.3.1_git20210424-alpine/apply_patches.sh new file mode 100755 index 0000000..79defbe --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/apply_patches.sh @@ -0,0 +1,46 @@ +#! /bin/bash + +for p in 0001-posix_memalign.patch \ + 0002-gcc-poison-system-directories.patch \ + 0003-Turn-on-Wl-z-relro-z-now-by-default.patch \ + 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch \ + 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch \ + 0006-Enable-Wformat-and-Wformat-security-by-default.patch \ + 0007-Enable-Wtrampolines-by-default.patch \ + 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch \ + 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch \ + 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch \ + 0011-libiberty-copy-PIC-objects-during-build-process.patch \ + 0012-libitm-disable-FORTIFY.patch \ + 0013-libgcc_s.patch \ + 0014-nopie.patch \ + 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch \ + 0016-dlang-update-zlib-binding.patch \ + 0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch \ + 0018-ada-fix-shared-linking.patch \ + 0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch \ + 0020-add-fortify-headers-paths.patch \ + 0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch \ + 0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch \ + 0023-Pure-64-bit-MIPS.patch \ + 0024-use-pure-64-bit-configuration-where-appropriate.patch \ + 0025-always-build-libgcc_eh.a.patch \ + 0026-ada-libgnarl-compatibility-for-musl.patch \ + 0027-ada-musl-support-fixes.patch \ + 0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch \ + 0029-gcc-go-Don-t-include-sys-user.h.patch \ + 0030-gcc-go-Fix-ucontext_t-on-PPC64.patch \ + 0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch \ + 0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch \ + 0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch \ + 0034-gcc-go-signal-34-is-special-on-musl-libc.patch \ + 0035-gcc-go-Prefer-_off_t-over-_off64_t.patch \ + 0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch \ + 0037-gcc-go-link-to-libucontext.patch \ + 0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch \ + 0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch \ + 0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch \ + 0041-Use-generic-errstr.go-implementation-on-musl.patch +do + patch -Np1 -i ../patches/gcc-10.3.1_git20210424-alpine/$p +done diff --git a/patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh b/patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh new file mode 100755 index 0000000..3e3632b --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh @@ -0,0 +1,45 @@ +#! /bin/bash + +for p in 0001-posix_memalign.patch \ + 0002-gcc-poison-system-directories.patch \ + 0003-Turn-on-Wl-z-relro-z-now-by-default.patch \ + 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch \ + 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch \ + 0006-Enable-Wformat-and-Wformat-security-by-default.patch \ + 0007-Enable-Wtrampolines-by-default.patch \ + 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch \ + 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch \ + 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch \ + 0011-libiberty-copy-PIC-objects-during-build-process.patch \ + 0012-libitm-disable-FORTIFY.patch \ + 0013-libgcc_s.patch \ + 0014-nopie.patch \ + 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch \ + 0016-dlang-update-zlib-binding.patch \ + 0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch \ + 0018-ada-fix-shared-linking.patch \ + 0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch \ + 0020-add-fortify-headers-paths.patch \ + 0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch \ + 0023-Pure-64-bit-MIPS.patch \ + 0024-use-pure-64-bit-configuration-where-appropriate.patch \ + 0025-always-build-libgcc_eh.a.patch \ + 0026-ada-libgnarl-compatibility-for-musl.patch \ + 0027-ada-musl-support-fixes.patch \ + 0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch \ + 0029-gcc-go-Don-t-include-sys-user.h.patch \ + 0030-gcc-go-Fix-ucontext_t-on-PPC64.patch \ + 0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch \ + 0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch \ + 0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch \ + 0034-gcc-go-signal-34-is-special-on-musl-libc.patch \ + 0035-gcc-go-Prefer-_off_t-over-_off64_t.patch \ + 0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch \ + 0037-gcc-go-link-to-libucontext.patch \ + 0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch \ + 0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch \ + 0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch \ + 0041-Use-generic-errstr.go-implementation-on-musl.patch +do + patch -Np1 -i ../patches/gcc-10.3.1_git20210424-alpine/$p +done diff --git a/patches/gcc-alpine-10.2.1p2/APKBUILD b/patches/gcc-alpine-10.2.1p2/APKBUILD deleted file mode 100755 index 6f9ee29..0000000 --- a/patches/gcc-alpine-10.2.1p2/APKBUILD +++ /dev/null @@ -1,691 +0,0 @@ -# Maintainer: Natanael Copa -pkgname=gcc -_pkgbase=10.2.1 -pkgver=10.2.1_pre2 -[ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2" -[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross="" -[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target="" - -pkgname="$pkgname$_target" -pkgrel=0 -pkgdesc="The GNU Compiler Collection" -url="https://gcc.gnu.org" -arch="all" -license="GPL-2.0-or-later LGPL-2.1-or-later" -_gccrel=$pkgver-r$pkgrel -depends="binutils$_target" -makedepends_build="gcc$_cross g++$_cross bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev" -makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev !gettext-dev libucontext-dev" -subpackages=" " -[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_target" -replaces="libstdc++ binutils" - -: "${LANG_CXX:=true}" -: "${LANG_D:=true}" -: "${LANG_OBJC:=true}" -: "${LANG_GO:=true}" -: "${LANG_FORTRAN:=true}" -: "${LANG_ADA:=true}" - -_libgomp=true -_libgcc=true -_libatomic=true -_libitm=true - -if [ "$CHOST" != "$CTARGET" ]; then - if [ "$BOOTSTRAP" = nolibc ]; then - LANG_CXX=false - LANG_ADA=false - _libgcc=false - _builddir="$srcdir/build-cross-pass2" - else - _builddir="$srcdir/build-cross-final" - fi - LANG_OBJC=false - LANG_GO=false - LANG_FORTRAN=false - LANG_D=false - _libgomp=false - _libatomic=false - _libitm=false - - # reset target flags (should be set in crosscreate abuild) - # fixup flags. seems gcc treats CPPFLAGS as global without - # _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS. - export CFLAGS="$CPPFLAGS $CFLAGS" - export CXXFLAGS="$CPPFLAGS $CXXFLAGS" - unset CPPFLAGS - export CFLAGS_FOR_TARGET=" " - export CXXFLAGS_FOR_TARGET=" " - export LDFLAGS_FOR_TARGET=" " - - STRIP_FOR_TARGET="$CTARGET-strip" -elif [ "$CBUILD" != "$CHOST" ]; then - # fixup flags. seems gcc treats CPPFLAGS as global without - # _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS. - export CFLAGS="$CPPFLAGS $CFLAGS" - export CXXFLAGS="$CPPFLAGS $CXXFLAGS" - unset CPPFLAGS - - # reset flags and cc for build - export CC_FOR_BUILD="gcc" - export CXX_FOR_BUILD="g++" - export CFLAGS_FOR_BUILD=" " - export CXXFLAGS_FOR_BUILD=" " - export LDFLAGS_FOR_BUILD=" " - export CFLAGS_FOR_TARGET=" " - export CXXFLAGS_FOR_TARGET=" " - export LDFLAGS_FOR_TARGET=" " - - # Languages that do not need bootstrapping - LANG_OBJC=false - LANG_GO=false - LANG_FORTRAN=false - LANG_D=false - - STRIP_FOR_TARGET=${CROSS_COMPILE}strip - _builddir="$srcdir/build-cross-native" -else - STRIP_FOR_TARGET=${CROSS_COMPILE}strip - _builddir="$srcdir/build" -fi - -# GDC hasn't been ported to PowerPC -# See libphobos/configure.tgt in GCC sources for supported targets -[ "$CARCH" = ppc64le ] && LANG_D=false - -# libitm has TEXTRELs in ARM build, so disable for now -case "$CTARGET_ARCH" in -arm*) _libitm=false ;; -mips*) _libitm=false ;; -esac - -# Internal libffi fails to build on MIPS at the moment, need to -# investigate further. We disable LANG_GO on mips64 as it requires -# the internal libffi. -case "$CTARGET_ARCH" in -mips*) LANG_GO=false ;; -esac - -# Fortran uses libquadmath if toolchain has __float128 -# currently on x86, x86_64 and ia64 -_libquadmath=$LANG_FORTRAN -case "$CTARGET_ARCH" in -x86 | x86_64) _libquadmath=$LANG_FORTRAN ;; -*) _libquadmath=false ;; -esac - -# libatomic is a dependency for openvswitch -$_libatomic && subpackages="$subpackages libatomic::$CTARGET_ARCH" -$_libgcc && subpackages="$subpackages libgcc::$CTARGET_ARCH" -$_libquadmath && subpackages="$subpackages libquadmath::$CTARGET_ARCH" -if $_libgomp; then - depends="$depends libgomp=$_gccrel" - subpackages="$subpackages libgomp::$CTARGET_ARCH" -fi - -_languages=c -if $LANG_CXX; then - subpackages="$subpackages libstdc++:libcxx:$CTARGET_ARCH g++$_target:gpp" - _languages="$_languages,c++" -fi -if $LANG_D; then - subpackages="$subpackages libgphobos::$CTARGET_ARCH gcc-gdc$_target:gdc" - _languages="$_languages,d" - makedepends_build="$makedepends_build libucontext-dev" -fi -if $LANG_OBJC; then - subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_target:objc" - _languages="$_languages,objc" -fi -if $LANG_GO; then - subpackages="$subpackages libgo::$CTARGET_ARCH gcc-go$_target:go" - _languages="$_languages,go" -fi -if $LANG_FORTRAN; then - subpackages="$subpackages libgfortran::$CTARGET_ARCH gfortran$_target:gfortran" - _languages="$_languages,fortran" -fi -if $LANG_ADA; then - subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH gcc-gnat$_target:gnat" - _languages="$_languages,ada" - [ "$CBUILD" = "$CTARGET" ] && makedepends_build="$makedepends_build gcc-gnat-bootstrap" - [ "$CBUILD" != "$CTARGET" ] && makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross" -fi -makedepends="$makedepends_build $makedepends_host" - -# when using upstream releases, use this URI template -# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz -# -# right now, we are using a git snapshot. -# -# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches, -# so that they can be properly tracked and easily rebased if needed. -source="https://dev.alpinelinux.org/~nenolod/gcc-${pkgver}.tar.xz - 0001-posix_memalign.patch - 0002-gcc-poison-system-directories.patch - 0003-Turn-on-Wl-z-relro-z-now-by-default.patch - 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch - 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch - 0006-Enable-Wformat-and-Wformat-security-by-default.patch - 0007-Enable-Wtrampolines-by-default.patch - 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch - 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch - 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch - 0011-libiberty-copy-PIC-objects-during-build-process.patch - 0012-libitm-disable-FORTIFY.patch - 0013-libgcc_s.patch - 0014-nopie.patch - 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch - 0016-dlang-update-zlib-binding.patch - 0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch - 0018-ada-fix-shared-linking.patch - 0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch - 0020-add-fortify-headers-paths.patch - 0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch - 0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch - 0023-Pure-64-bit-MIPS.patch - 0024-use-pure-64-bit-configuration-where-appropriate.patch - 0025-always-build-libgcc_eh.a.patch - 0026-ada-libgnarl-compatibility-for-musl.patch - 0027-ada-musl-support-fixes.patch - 0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch - 0029-gcc-go-Don-t-include-sys-user.h.patch - 0030-gcc-go-Fix-ucontext_t-on-PPC64.patch - 0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch - 0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch - 0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch - 0034-gcc-go-signal-34-is-special-on-musl-libc.patch - 0035-gcc-go-Prefer-_off_t-over-_off64_t.patch - 0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch - 0037-gcc-go-link-to-libucontext.patch - 0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch - 0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch - 0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch - " - -# we build out-of-tree -_gccdir="$srcdir"/gcc-$pkgver -_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}" -_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}" - -prepare() { - cd "$_gccdir" - - _err= - for i in $source; do - case "$i" in - *.patch) - msg "Applying $i" - patch -p1 -i "$srcdir"/$i || _err="$_err $i" - ;; - esac - done - - if [ -n "$_err" ]; then - error "The following patches failed:" - for i in $_err; do - echo " $i" - done - return 1 - fi - - echo ${_pkgbase:-$pkgver} > gcc/BASE-VER -} - -build() { - local _arch_configure= - local _libc_configure= - local _cross_configure= - local _bootstrap_configure= - local _symvers= - - cd "$_gccdir" - - case "$CTARGET" in - aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";; - armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";; - armv6-*-*-*eabihf) _arch_configure="--with-arch=armv6zk --with-tune=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-abi=aapcs-linux";; - armv7-*-*-*eabihf) _arch_configure="--with-arch=armv7-a --with-tune=generic-armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-abi=aapcs-linux --with-mode=thumb";; - mips-*-*-*) _arch_configure="--with-arch=mips32 --with-mips-plt --with-float=soft --with-abi=32";; - mips64-*-*-*) _arch_configure="--with-arch=mips3 --with-tune=mips64 --with-mips-plt --with-float=soft --with-abi=64";; - mips64el-*-*-*) _arch_configure="--with-arch=mips3 --with-tune=mips64 --with-mips-plt --with-float=soft --with-abi=64";; - mipsel-*-*-*) _arch_configure="--with-arch=mips32 --with-mips-plt --with-float=soft --with-abi=32";; - powerpc-*-*-*) _arch_configure="--enable-secureplt --enable-decimal-float=no";; - powerpc64*-*-*-*) _arch_configure="--with-abi=elfv2 --enable-secureplt --enable-decimal-float=no --enable-targets=powerpcle-linux";; - i486-*-*-*) _arch_configure="--with-arch=i486 --with-tune=generic --enable-cld";; - i586-*-*-*) _arch_configure="--with-arch=i586 --with-tune=generic --enable-cld";; - s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";; - esac - - case "$CTARGET_ARCH" in - mips*) _hash_style_configure="--with-linker-hash-style=sysv" ;; - *) _hash_style_configure="--with-linker-hash-style=gnu" ;; - esac - - case "$CTARGET_LIBC" in - musl) - # musl does not support mudflap, or libsanitizer - # libmpx uses secure_getenv and struct _libc_fpstate not present in musl - # alpine musl provides libssp_nonshared.a, so we don't need libssp either - _libc_configure="--disable-libssp --disable-libmpx --disable-libmudflap --disable-libsanitizer" - _symvers="--disable-symvers" - export libat_cv_have_ifunc=no - ;; - esac - - [ "$CBUILD" != "$CHOST" ] && _cross_configure="--disable-bootstrap" - [ "$CHOST" != "$CTARGET" ] && _cross_configure="--disable-bootstrap --with-sysroot=$CBUILDROOT" - - case "$BOOTSTRAP" in - nolibc) _bootstrap_configure="--with-newlib --disable-shared --enable-threads=no" ;; - *) _bootstrap_configure="--enable-shared --enable-threads --enable-tls" ;; - esac - - $_libgomp || _bootstrap_configure="$_bootstrap_configure --disable-libgomp" - $_libatomic || _bootstrap_configure="$_bootstrap_configure --disable-libatomic" - $_libitm || _bootstrap_configure="$_bootstrap_configure --disable-libitm" - $_libquadmath || _arch_configure="$_arch_configure --disable-libquadmath" - - msg "Building the following:" - echo "" - echo " CBUILD=$CBUILD" - echo " CHOST=$CHOST" - echo " CTARGET=$CTARGET" - echo " CTARGET_ARCH=$CTARGET_ARCH" - echo " CTARGET_LIBC=$CTARGET_LIBC" - echo " languages=$_languages" - echo " arch_configure=$_arch_configure" - echo " libc_configure=$_libc_configure" - echo " cross_configure=$_cross_configure" - echo " bootstrap_configure=$_bootstrap_configure" - echo " hash_style_configure=$_hash_style_configure" - echo "" - - export CFLAGS="$CFLAGS -O2" - - mkdir -p "$_builddir" - cd "$_builddir" - "$_gccdir"/configure --prefix=/usr \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --build=${CBUILD} \ - --host=${CHOST} \ - --target=${CTARGET} \ - --with-pkgversion="Alpine $pkgver" \ - --enable-checking=release \ - --disable-fixed-point \ - --disable-libstdcxx-pch \ - --disable-multilib \ - --disable-nls \ - --disable-werror \ - $_symvers \ - --enable-__cxa_atexit \ - --enable-default-pie \ - --enable-default-ssp \ - --enable-cloog-backend \ - --enable-languages=$_languages \ - $_arch_configure \ - $_libc_configure \ - $_cross_configure \ - $_bootstrap_configure \ - --with-system-zlib \ - $_hash_style_configure - make -} - -package() { - cd "$_builddir" - make -j1 DESTDIR="$pkgdir" install - - ln -s gcc "$pkgdir"/usr/bin/cc - - # we dont support gcj -static - # and saving 35MB is not bad. - find "$pkgdir" \( -name libgtkpeer.a \ - -o -name libgjsmalsa.a \ - -o -name libgij.a \) \ - -delete - - # strip debug info from some static libs - find "$pkgdir" \( -name libgfortran.a -o -name libobjc.a -o -name libgomp.a \ - -o -name libgphobos.a -o -name libgdruntime.a \ - -o -name libmudflap.a -o -name libmudflapth.a \ - -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a \ - -o -name libitm.a -o -name libgo.a -o -name libcaf\*.a \ - -o -name libatomic.a -o -name libasan.a -o -name libtsan.a \) \ - -a -type f \ - -exec ${STRIP_FOR_TARGET} -g {} + - - if $_libgomp; then - mv "$pkgdir"/usr/lib/libgomp.spec "$pkgdir"/$_gcclibdir - fi - if $_libitm; then - mv "$pkgdir"/usr/lib/libitm.spec "$pkgdir"/$_gcclibdir - fi - - # remove ffi - rm -f "$pkgdir"/usr/lib/libffi* "$pkgdir"/usr/share/man/man3/ffi* - find "$pkgdir" -name 'ffi*.h' -delete - - local gdblib=${_target:+$CTARGET/}lib - if [ -d "$pkgdir"/usr/$gdblib/ ]; then - for i in $(find "$pkgdir"/usr/$gdblib/ -type f -maxdepth 1 -name "*-gdb.py"); do - mkdir -p "$pkgdir"/usr/share/gdb/python/auto-load/usr/$gdblib - mv "$i" "$pkgdir"/usr/share/gdb/python/auto-load/usr/$gdblib/ - done - fi - - # move ada runtime libs - if $LANG_ADA; then - for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do - mv "$i" "$pkgdir"/usr/lib/ - ln -s ../../../../${i##*/} $i - done - for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do - mv "$i" "$pkgdir"/usr/lib/ - ln -s ../../../../${i##*/} $i - done - fi - - if [ "$CHOST" != "$CTARGET" ]; then - # cross-gcc: remove any files that would conflict with the - # native gcc package - rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share - # libcc1 does not depend on target, don't ship it - rm -rf "$pkgdir"/usr/lib/libcc1.so* - - # fixup gcc library symlinks to be linker scripts so - # linker finds the libs from relocated sysroot - for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do - if [ -h "$so" ]; then - local _real=$(basename "$(readlink "$so")") - rm -f "$so" - echo "GROUP ($_real)" > "$so" - fi - done - else - # add c89/c99 wrapper scripts - cat >"$pkgdir"/usr/bin/c89 <<'EOF' -#!/bin/sh -_flavor="-std=c89" -for opt; do - case "$opt" in - -ansi|-std=c89|-std=iso9899:1990) _flavor="";; - -std=*) echo "$(basename $0) called with non ANSI/ISO C option $opt" >&2 - exit 1;; - esac -done -exec gcc $_flavor ${1+"$@"} -EOF - cat >"$pkgdir"/usr/bin/c99 <<'EOF' -#!/bin/sh -_flavor="-std=c99" -for opt; do - case "$opt" in - -std=c99|-std=iso9899:1999) _flavor="";; - -std=*) echo "$(basename $0) called with non ISO C99 option $opt" >&2 - exit 1;; - esac -done -exec gcc $_flavor ${1+"$@"} -EOF - chmod 755 "$pkgdir"/usr/bin/c?9 - - # install lto plugin so regular binutils may use it - mkdir -p "$pkgdir"/usr/lib/bfd-plugins - ln -s /$_gcclibexec/liblto_plugin.so "$pkgdir/usr/lib/bfd-plugins/" - fi -} - -libatomic() { - pkgdesc="GCC Atomic library" - depends= - replaces="gcc" - - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/ -} - -libcxx() { - pkgdesc="GNU C++ standard runtime library" - depends= - - if [ "$CHOST" = "$CTARGET" ]; then - # verify that we are using clock_gettime rather than doing direct syscalls - # so we dont break 32 bit arches due to time64. - nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime - fi - - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/ -} - -gpp() { - pkgdesc="GNU C++ standard library and compiler" - depends="libstdc++=$_gccrel gcc=$_gccrel libc-dev" - mkdir -p "$subpkgdir/$_gcclibexec" \ - "$subpkgdir"/usr/bin \ - "$subpkgdir"/usr/${_target:+$CTARGET/}include \ - "$subpkgdir"/usr/${_target:+$CTARGET/}lib \ - - mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/" - - mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/*++* "$subpkgdir"/usr/${_target:+$CTARGET/}lib/ - mv "$pkgdir"/usr/${_target:+$CTARGET/}include/c++ "$subpkgdir"/usr/${_target:+$CTARGET/}include/ - mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/ -} - -libobjc() { - pkgdesc="GNU Objective-C runtime" - replaces="objc" - depends= - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/ -} - -objc() { - pkgdesc="GNU Objective-C" - replaces="gcc" - depends="libc-dev gcc=$_gccrel libobjc=$_gccrel" - - mkdir -p "$subpkgdir/$_gcclibexec" \ - "$subpkgdir"/$_gcclibdir/include \ - "$subpkgdir"/usr/lib - mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/" - mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/ - mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \ - "$subpkgdir"/usr/lib/ -} - -libgcc() { - pkgdesc="GNU C compiler runtime libraries" - depends= - - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/ -} - -libgomp() { - pkgdesc="GCC shared-memory parallel programming API library" - depends= - replaces="gcc" - - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/ -} - -libgphobos() { - pkgdesc="D programming language standard library for GCC" - depends= - - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/ - mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/ -} - -gdc() { - pkgdesc="GCC-based D language compiler" - depends="gcc=$_gccrel libgphobos=$_gccrel musl-dev" - depends="$depends libucontext-dev" - - mkdir -p "$subpkgdir/$_gcclibexec" \ - "$subpkgdir"/$_gcclibdir/include/d/ \ - "$subpkgdir"/usr/lib \ - "$subpkgdir"/usr/bin - # Copy: The installed '.d' files, the static lib, the binary itself - # The shared libs are part of 'libgphobos' so one can run program - # without installing the compiler - mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/" - mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/ - mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/ - mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/ - mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/ - mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/ - mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/ -} - - -libgo() { - pkgdesc="Go runtime library for GCC" - depends= - - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/ -} - -go() { - pkgdesc="Go support for GCC" - depends="gcc=$_gccrel libgo=$_gccrel !go" - - mkdir -p "$subpkgdir"/$_gcclibexec \ - "$subpkgdir"/usr/lib \ - "$subpkgdir"/usr/bin - mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/ - mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/ - mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin - mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin - mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/ - mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/ - mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/ - mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/ - mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/ - mv "$pkgdir"/usr/lib/libgo.a \ - "$pkgdir"/usr/lib/libgo.so \ - "$pkgdir"/usr/lib/libgobegin.a \ - "$pkgdir"/usr/lib/libgolibbegin.a \ - "$subpkgdir"/usr/lib/ -} - -libgfortran() { - pkgdesc="Fortran runtime library for GCC" - depends= - - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/ -} - -libquadmath() { - replaces="gcc" - pkgdesc="128-bit math library for GCC" - depends= - - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/ -} - -gfortran() { - pkgdesc="GNU Fortran Compiler" - depends="gcc=$_gccrel libgfortran=$_gccrel" - $_libquadmath && depends="$depends libquadmath=$_gccrel" - replaces="gcc" - - mkdir -p "$subpkgdir"/$_gcclibexec \ - "$subpkgdir"/$_gcclibdir \ - "$subpkgdir"/usr/lib \ - "$subpkgdir"/usr/bin - mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/ - mv "$pkgdir"/usr/lib/libgfortran.a \ - "$pkgdir"/usr/lib/libgfortran.so \ - "$subpkgdir"/usr/lib/ - if $_libquadmath; then - mv "$pkgdir"/usr/lib/libquadmath.a \ - "$pkgdir"/usr/lib/libquadmath.so \ - "$subpkgdir"/usr/lib/ - fi - mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/ - mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec - mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir -} - -libgnat() { - pkgdesc="GNU Ada runtime shared libraries" - depends= - - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/ -} - -libgnatstatic() { - pkgdesc="GNU Ada static libraries" - depends= - - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/ -} - -gnat() { - pkgdesc="Ada support for GCC" - depends="gcc=$_gccrel" - provides="$pkgname-gnat-bootstrap" - [ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel" - - mkdir -p "$subpkgdir"/$_gcclibexec \ - "$subpkgdir"/$_gcclibdir \ - "$subpkgdir"/usr/bin - mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/ - mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/ - mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/ -} - -sha512sums="b21f14f8316d1ed1cfb0251789af7d14091f211d94e46cedaaab645c5cbe43553757b2e1951375827e37278970d2d6cdc0707dbb485f59c581b9b6c38223b437 gcc-10.2.1_pre2.tar.xz -4aef7bda014e5e27025adb75acbbe1c8cde021655ba52fa4ffbb193878c5097771e775d2c0aeb33802858ba66e7cd16d1b12b10c20dcc5ab0a77f68bcd280995 0001-posix_memalign.patch -1cf2893927b4d92c173f639742f187882d45fa9f27b3e3131e587918bb37774670833ed284960bcf1ecc92f0ebedd9f180bbf8c86da1d32b5469e8e874252f27 0002-gcc-poison-system-directories.patch -f065f77c21bb86e4607ba311f227aeda46a59cb084a2fd6ec1903398f160d56f07e19943ddcf6d5dbf338e2aa66f0043c939479fab721150d6913e0c013ed823 0003-Turn-on-Wl-z-relro-z-now-by-default.patch -4d9b79ac9bf676ca349871ed380793acab76cafae67bb2d09cc5491e90ba3e21a36342e2a2efef775ee983b240675be290109d0d6d06ca3e438247272bb3ef10 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch -e4e460a65c4b40d5afb41ea2eddde67928e12e5ca22acab915e3b7456a737f57cb0c245b8947687063c39287aadae0a8f316adb420a129f99581e5577bb349b5 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch -8ed4e529714f778eff84782f8e0899429ab996520d0952922ec2100a8c98a8a693f43738afd0ef45340c4a6e99a115883196f6fd237e75bdc58f6a3221dd87ff 0006-Enable-Wformat-and-Wformat-security-by-default.patch -9a9bc91df1eb66fb40ea66bfcf169ea48adb332fa074f5fb621461879b03c8836d90586aa802a8b23ca4bc105401745361e52e803955464f04f4e21775dcd69d 0007-Enable-Wtrampolines-by-default.patch -727747e378102a8741879ee862c22768bed98f62ca1f9884316f69d439b21f5b30cd25481dedc41aceceac22b653cff04bfa261ae5fdf954892246c9c990b9d9 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch -babfd43f96124f8be00c8dadabae2ef7eb81c5f8362134980153eabfbb6864b59246ce7eba4b110d83d1aba28057a2f814772e7fa4c1cebc71182ab25929317e 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch -9bfa36a40302cbdbf4b8186e55a7c6235f54d42d3de34d310c2e1586054fcf4a882cd3a1ea24a5047ba410d8f9e51c91ccf53950ee1eac2a5df1c8bc3684c7a8 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch -cecc9a961f99934ed078f4aa32d208e6074f59571f186b52ee99e49b4dbf7fcaa58a492b0a50407b9a6060b2ba72f1297e22556ac5c6308fbb9463e1fe0ef2e4 0011-libiberty-copy-PIC-objects-during-build-process.patch -1b3438a66ff8a1e724b2973937bce8dc99e0294cf9e04d3f631524e8eb8413333a9c5ac8e9d956f5d3155a5065eaee3866ad2f89cf40294434db67bf85e52a52 0012-libitm-disable-FORTIFY.patch -3de9a7da0e86a104fddac12c11ba57eba80e44efbd66d7eb09fa4757973cfc8a7f07b2309893d9de6fae3f912e69923ba231abad9facaa18d0a521177c54977f 0013-libgcc_s.patch -d08adebd9d07ba1480e3af0faf30328d3a2621e1827147bbb7ab2a6277482a4844a5434d7ff48c6ad31f461685ba2aaa1504fb4d0fcaf4c4e9b7c580cfdbfb41 0014-nopie.patch -7ef7d5c77af6ad43b43111d3a989f18945f5097b8714516175a8f237515de63f0883ff788e411ab0925fbdae3aad40819059e13f60af6f68757382928fb46fde 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch -aab2cefd3abebef3e3cafd2fc53b7d4519d2e926563528484d41d8717a7b9ebf95d6e314b072bc890e40f8e03d02e1b578200122e0797219d65f9864b396c2c0 0016-dlang-update-zlib-binding.patch -d6831aa5f4d61fa83bbdda08b4373f8624e8c1a21fb38864e1753e766027777d422ae7131e78f9d0edb4f00062207b6c79ace61526202588fd5e82575b74c23f 0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch -8a668bb00185418d5b9d6cce048491195c1ccf437f344cec451ab0dbfe3d66040ac481666a26eb90e2b57d2c2adce5a7d270636e93f6387cb8779faafb470a6e 0018-ada-fix-shared-linking.patch -299dad2985f374472ccb1c49ba6c82fb16bc2a5c0c8ce370a22c26ffd80bfec8b8261eda58dd1b24db40f476c0a9219c904002b5665ce481668ca48cb7099282 0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch -54ef15a29cea01d28cf2d44bf6ac249ebe4b62022e06098322774693c900facecfdd65fd01eb9292df5258149ffa7d7f52c4d65674fdaf180cb51f9b2f9ab922 0020-add-fortify-headers-paths.patch -7786627a00b5ee0c3e215b67bf786226f1a1d628da15ce5a227f90721ee05e3a10b5ac99a544142094f9d7f571fd0ab4f6c0ecdefbfbaf69a8dd276b3e2d4ec6 0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch -9d8be16867097c0088d0e98fa0354de00879fbf6261ba4c793c82742d659456b39aab1492b4ea94bc5c95523b11d86fe8db3c8bf54f8173935a77a178f8375bc 0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch -4e6efe5d622d47b4881146ae92f09661b005d3f06125ea5c2c4c18e863a87f05c57679b537fd9aaabd9e7bfddeb00c2027f9d7267d29d9efbd78fb88bcfe01b6 0023-Pure-64-bit-MIPS.patch -4dfc19c5e98a1290c6575cae1c18290b09552fe8d77940745ad0da222ae0e991bfd085c945d73b4124db04cc4699f15791cee70fa32aff11c661b6ac7dad097f 0024-use-pure-64-bit-configuration-where-appropriate.patch -0aea39678c9e3a9ef42cbc927da1331d2110fa7a1ad72fbb1c21cbcf12d08a1376e9ddd04a18404ce126168e14dbc852be2cafed74d1009068a057531023d6cd 0025-always-build-libgcc_eh.a.patch -ecd4a2f70e58daa557434e5e799abb9d78bccfce9774cf4ebbae87ffa5c81201251f263ee3412a642617525e4d09b3019f906a2510d2264a92fa4472fd8e116f 0026-ada-libgnarl-compatibility-for-musl.patch -6fba73026a253d7244dec6a2f04165306b779181014ebfe9d991822c95c02c40b8e109dae9e3c60632eb4afa569d4c267840e179d68e02f89121c30d96b54c35 0027-ada-musl-support-fixes.patch -2a842fb2da1e18571fc423eea3a347cc356fed7d066bbfc7312be47d650a0b26448590ecc5aa6ad8220e5b8df038948d1975560411e97ada123138f3f920a462 0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch -f8b56f9efcde3783ed7aadf084beb8c2121411d844e37070e494d43913a41e6821af589c97085e5f3fb0c4dba920b980d09f17b3072392100aab5106e4268e4f 0029-gcc-go-Don-t-include-sys-user.h.patch -01695bf4dd42fd1ac5a76b1e69f6210b0df99270896cdce2e40008b1a5c2eb6954ee70669af5b5fc3bbca3f0813e30598fd36691138cfc8cd66f95deca1b6a4e 0030-gcc-go-Fix-ucontext_t-on-PPC64.patch -98be59b675641d186d342cc5c7ccc2c678b1194b69c9afae5947722fe33ba429b1ff2a8152af280ad60d159c59a0d788482f96c8b3a1a7779ae51728569f9c21 0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch -4bc4f6e6fb9ade805605746426da12c454f8903e708f8c43e734af45944383a20e4ab0ded4e1b58f8b2077f72c2c79cb24e0cdb0d2a5180b2374b963ad66355a 0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch -92bf463a0e3b8a1f29cb65ad2bf9bedd419de6967d24c474fc40577d2af02f1778550ce3614b3debf4f947aace600e0dadbbfa499b4fddf83c5b927a01805bf9 0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch -24d59cb368b0b178dc13f3c89c9a0aa50ab3538d1ded56012bd9a3eeabea28c349cb9a4aa0474d04679c855079ad423bbb7bfc7735e5f7e08ad49d85ca1e0671 0034-gcc-go-signal-34-is-special-on-musl-libc.patch -54fffe6dad16551b5e5bd942f54bbfd39ac4ee3d42b29078f731beaacdc1479c200c9dba432ac43cc851e1f3a56b55dcc41c4517ebbf26d44bd8534f16555e1d 0035-gcc-go-Prefer-_off_t-over-_off64_t.patch -2951f905aef9caf88e1245edfcb38a3d6185535989fc2ba5246bd9beb90d6881baa318f1a788002e8d8294925305bb435135c88a8a89d715a621c28420790f32 0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch -2deb6111f3140f68a2aef63657e221781f4b9381fedc57cc967ea593d21121c8a14cf2c7460d27decfda8904698b7de866bf8eb733155d74c2bcd139638a68dd 0037-gcc-go-link-to-libucontext.patch -f8281d2be085e1c9047baf0bf4a072451ebe29338d53322e847d33c6a883249bcc240d62d47572534333ad9ab507d80404a3c8d05d8036216d647138e4f88568 0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch -67589a4a4f987a702b2317823329a803007bb1d5d3f319c33ece9aa03dc8b27803122cc8fa17f0ccc1dfa3e5beb15ba8e6ab635b8f6224b65bf483f6956d6c8b 0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch -00fd11053ebfacc38c2bc95adc23bd01930373fc8ac8511976d4033950194cdd0ae17d87021ec8b3ab39afb9c5ed32dd71822bc525740c04301ae20c2e905a90 0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch" diff --git a/patches/gcc-alpine-10.2.1p2/get_patches.sh b/patches/gcc-alpine-10.2.1p2/get_patches.sh deleted file mode 100755 index f60e1fb..0000000 --- a/patches/gcc-alpine-10.2.1p2/get_patches.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -for p in 0001-posix_memalign.patch \ - 0002-gcc-poison-system-directories.patch \ - 0003-Turn-on-Wl-z-relro-z-now-by-default.patch \ - 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch \ - 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch \ - 0006-Enable-Wformat-and-Wformat-security-by-default.patch \ - 0007-Enable-Wtrampolines-by-default.patch \ - 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch \ - 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch \ - 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch \ - 0011-libiberty-copy-PIC-objects-during-build-process.patch \ - 0012-libitm-disable-FORTIFY.patch \ - 0013-libgcc_s.patch \ - 0014-nopie.patch \ - 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch \ - 0016-dlang-update-zlib-binding.patch \ - 0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch \ - 0018-ada-fix-shared-linking.patch \ - 0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch \ - 0020-add-fortify-headers-paths.patch \ - 0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch \ - 0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch \ - 0023-Pure-64-bit-MIPS.patch \ - 0024-use-pure-64-bit-configuration-where-appropriate.patch \ - 0025-always-build-libgcc_eh.a.patch \ - 0026-ada-libgnarl-compatibility-for-musl.patch \ - 0027-ada-musl-support-fixes.patch \ - 0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch \ - 0029-gcc-go-Don-t-include-sys-user.h.patch \ - 0030-gcc-go-Fix-ucontext_t-on-PPC64.patch \ - 0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch \ - 0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch \ - 0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch \ - 0034-gcc-go-signal-34-is-special-on-musl-libc.patch \ - 0035-gcc-go-Prefer-_off_t-over-_off64_t.patch \ - 0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch \ - 0037-gcc-go-link-to-libucontext.patch \ - 0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch \ - 0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch \ - 0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch -do - wget https://raw.githubusercontent.com/alpinelinux/aports/master/main/gcc/$p -done From a94be5367efaec68253afe3b0b50964e0105ac83 Mon Sep 17 00:00:00 2001 From: dslm4515 <27793627+dslm4515@users.noreply.github.com> Date: Fri, 25 Jun 2021 19:34:34 -0500 Subject: [PATCH 04/14] Forgot to clean out test files when testing GCC of cgnutools --- 1-cgnutools/5-GCC-final | 1 + 1 file changed, 1 insertion(+) diff --git a/1-cgnutools/5-GCC-final b/1-cgnutools/5-GCC-final index 822dbd9..a2b6048 100644 --- a/1-cgnutools/5-GCC-final +++ b/1-cgnutools/5-GCC-final @@ -67,3 +67,4 @@ ${CMLFS_TARGET}-gcc dummy.c readelf -l a.out | grep Requesting # Should output: # [Requesting program interpreter: /cgnutools/lib/ld-musl-x86_64.so.1] +rm -v dummy.c a.out From bf16ff26a8c73d11eeda13667da56feb5e46f993 Mon Sep 17 00:00:00 2001 From: dslm4515 <27793627+dslm4515@users.noreply.github.com> Date: Fri, 25 Jun 2021 20:52:51 -0500 Subject: [PATCH 05/14] Changed clang build from MinSizeRel to Release --- 1-cgnutools/8-clang | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/1-cgnutools/8-clang b/1-cgnutools/8-clang index 2ba96fa..a98e600 100644 --- a/1-cgnutools/8-clang +++ b/1-cgnutools/8-clang @@ -4,12 +4,31 @@ # * Build stage0 clang/clang++ with compiler-rt, lld, libunwind, libcxxabi, and libcxx # in LLVM source directory +# Truncate directory name for easier typing... +cd $CMLFS/sources && \ +mv llvm-11.0.0.src llvm && \ +export LLVMSRC=${CMLFS}/sources/llvm + cd ${LLVMSRC} # make sure compiler-rt, libcxx, libcxxabi, libunwind are unpacked in ${{LLVMSRC}/projects # and clang & lld in ${LLVMSRC}/tools. +cd projects && \ +tar xf ../../pkgs/compiler-rt-11.0.0.src.tar.xz && \ +mv compiler-rt-11.0.0.src compiler-rt && \ +tar xf ../../pkgs/libcxx-11.0.0.src.tar.xz && \ +mv libcxx-11.0.0.src libcxx && \ +tar xf ../../pkgs/libcxxabi-11.0.0.src.tar.xz && \ +mv libcxxabi-11.0.0.src libcxxabi && \ +tar xf ../../pkgs/libunwind-11.0.0.src.tar.xz && \ +mv libunwind-11.0.0.src libunwind && \ +cd ${LLVMSRC}/tools && \ +tar xf ../../pkgs/clang-11.0.0.src.tar.xz && \ +mv clang-11.0.0.src clang && \ +tar xf ../../pkgs/lld-11.0.0.src.tar.xz && \ +mv lld-11.0.0.src lld # Fix typo in libcxx -cd projects/libcxx +cd $LLMVSRC/projects/libcxx patch -Np1 -i ../../../patches/libcxx/strtoll_fix.patch cd ${LLVMSRC} @@ -21,7 +40,8 @@ patch -Np1 -i ../patches/llvm11-void/llvm-003-ppc-secureplt.patch patch -Np1 -i ../patches/llvm11-void/llvm-004-override-opt.patch patch -Np1 -i ../patches/llvm11-void/llvm-005-ppc-bigpic.patch patch -Np1 -i ../patches/llvm11-void/llvm-006-aarch64-mf_exec.patch -cd tools/clang + +cd ${LLVMSRC}/tools/clang patch -Np1 -i ../../../patches/llvm11-void/clang-001-fix-unwind-chain-inclusion.patch patch -Np1 -i ../../../patches/llvm11-void/clang-001-ppcle.patch patch -Np1 -i ../../../patches/llvm11-void/clang-002-add-musl-triples.patch @@ -41,7 +61,7 @@ cp -v ../files/config.guess-musl cmake/config.guess # Configure source cmake -B build \ - -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="/cgnutools" \ -DCMAKE_C_COMPILER="${CMLFS_TARGET}-gcc" \ -DCMAKE_CXX_COMPILER="${CMLFS_TARGET}-g++" \ From 92777bed9e80205bd555fee235738566999ef3d9 Mon Sep 17 00:00:00 2001 From: dslm4515 <27793627+dslm4515@users.noreply.github.com> Date: Sat, 26 Jun 2021 12:15:45 -0500 Subject: [PATCH 06/14] Moved cgnutools's clang test AFTER building musl libc for llvmtools --- 1-cgnutools/8-clang | 18 +----------------- 2-llvmtools/00-Musl | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/1-cgnutools/8-clang b/1-cgnutools/8-clang index a98e600..07728ea 100644 --- a/1-cgnutools/8-clang +++ b/1-cgnutools/8-clang @@ -142,24 +142,8 @@ unset SPECFILE # Set the PATH export PATH=/cgnutools/bin:/llvmtools/bin:/bin:/usr/bin -# Test the cgnutools toolchain: -echo "int main(){}" > dummy.c -${CMLFS_TARGET}-clang dummy.c -v -Wl,--verbose &> dummy.log -readelf -l a.out | grep ': /llvmtools' -# Shoud output: -# [Requesting program interpreter: /llvmtools/lib/ld-musl-x86_64.so.1] - -# Check if the correct start files are used -grep 'ld.lld:' dummy.log | grep crt[1in] -# Should output: -# ld.lld: /cgnutools/lib/gcc/x86_64-cmlfs-linux-musl/10.2.1/../../../Scrt1.o -# ld.lld: /cgnutools/lib/gcc/x86_64-cmlfs-linux-musl/10.2.1/../../../crti.o -# ld.lld: /cgnutools/lib/gcc/x86_64-cmlfs-linux-musl/10.2.1/../../../crtn.o - -# If all is well, remove output files; -rm -v a.out dummy.log - # Test GCC of cgnutools toolchain: +echo "int main(){}" > dummy.c ${CMLFS_TARGET}-gcc dummy.c -v -Wl,--verbose &> dummy.log readelf -l a.out | grep ': /llvmtools' # Shoud output: diff --git a/2-llvmtools/00-Musl b/2-llvmtools/00-Musl index 6f7f5d1..53cfb98 100644 --- a/2-llvmtools/00-Musl +++ b/2-llvmtools/00-Musl @@ -29,3 +29,20 @@ cat > /llvmtools/etc/ld-musl-x86_64.path << "EOF" /llvmtools/lib /llvmtools/gnu/lib EOF + +# Test clang of cgnutools toolchain: +echo "int main(){}" > dummy.c +${CMLFS_TARGET}-clang dummy.c -v -Wl,--verbose &> dummy.log +readelf -l a.out | grep ': /llvmtools' +# Shoud output: +# [Requesting program interpreter: /llvmtools/lib/ld-musl-x86_64.so.1] + +# Check if the correct start files are used +grep 'ld.lld:' dummy.log | grep crt[1in] +# Should output: +# ld.lld: /cgnutools/lib/gcc/x86_64-cmlfs-linux-musl/10.2.1/../../../Scrt1.o +# ld.lld: /cgnutools/lib/gcc/x86_64-cmlfs-linux-musl/10.2.1/../../../crti.o +# ld.lld: /cgnutools/lib/gcc/x86_64-cmlfs-linux-musl/10.2.1/../../../crtn.o + +# If all is well, remove output files; +rm -v a.out dummy.log From 79c345a6cafb412a947e0f10aca125bf327327fc Mon Sep 17 00:00:00 2001 From: dslm4515 <27793627+dslm4515@users.noreply.github.com> Date: Sat, 26 Jun 2021 13:44:23 -0500 Subject: [PATCH 07/14] Kernel headers won't build with LLVM=1 set. --- 2-llvmtools/01-kernel-headers | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/2-llvmtools/01-kernel-headers b/2-llvmtools/01-kernel-headers index 92049a6..f112f21 100644 --- a/2-llvmtools/01-kernel-headers +++ b/2-llvmtools/01-kernel-headers @@ -1,5 +1,8 @@ make mrproper -ARCH=${CMLFS_ARCH} LLVM=1 CC=clang CXX=clang++ make headers + +# kernel 5.12.x will not build headers with clang +#ARCH=${CMLFS_ARCH} LLVM=1 CC=clang CXX=clang++ make headers +ARCH=${CMLFS_ARCH} CC=clang CXX=clang++ make headers find usr/include \( -name .install -o -name ..install.cmd \) -delete cp -rv usr/include/* /llvmtools/include/ From 1c5509e4881178ed61ca20d5add2b7a4871df0b9 Mon Sep 17 00:00:00 2001 From: dslm4515 <27793627+dslm4515@users.noreply.github.com> Date: Sat, 26 Jun 2021 14:15:37 -0500 Subject: [PATCH 08/14] Changed build files from ninja to make --- 2-llvmtools/02-libunwind | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/2-llvmtools/02-libunwind b/2-llvmtools/02-libunwind index 66ec402..cf3e5a8 100644 --- a/2-llvmtools/02-libunwind +++ b/2-llvmtools/02-libunwind @@ -4,7 +4,7 @@ export CC=clang cd ${LLVMSRC}/projects/libunwind -cmake -B build -G Ninja \ +cmake -B build \ -DCMAKE_INSTALL_PREFIX=/llvmtools \ -DLIBUNWIND_ENABLE_SHARED=ON \ -DCMAKE_C_FLAGS="-fPIC" \ @@ -18,6 +18,6 @@ cmake -B build -G Ninja \ -DCMAKE_READELF="/cgnutools/bin/llvm-readelf" \ -DCMAKE_STRIP="/cgnutools/bin/llvm-strip" \ -DLIBUNWIND_USE_COMPILER_RT=ON -ninja -C build -ninja -C build install +make -C build +make -C build install rm -rf build From a601790e3de5126b4c010c270754e7ae0b73d68e Mon Sep 17 00:00:00 2001 From: dslm4515 <27793627+dslm4515@users.noreply.github.com> Date: Sat, 26 Jun 2021 14:16:11 -0500 Subject: [PATCH 09/14] Changed build files from ninja to make --- 2-llvmtools/03-libcxxabi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/2-llvmtools/03-libcxxabi b/2-llvmtools/03-libcxxabi index eac7438..22fd4bb 100644 --- a/2-llvmtools/03-libcxxabi +++ b/2-llvmtools/03-libcxxabi @@ -4,7 +4,7 @@ export CC=/cgnutools/bin/clang cd ${LLVMSRC}/projects/libcxxabi -cmake -B build -G Ninja \ +cmake -B build \ -DCMAKE_INSTALL_PREFIX=/llvmtools \ -DLIBCXXABI_ENABLE_STATIC=ON \ -DLIBCXXABI_USE_COMPILER_RT=ON \ @@ -12,7 +12,7 @@ cmake -B build -G Ninja \ -DLIBCXXABI_LIBUNWIND_PATH="/llvmtools/lib" \ -DLIBCXXABI_LIBCXX_INCLUDES="${LLVMSRC}/projects/libcxx/include" \ -DLLVM_PATH="${LLVMSRC}" -ninja -C build -ninja -C build install +make -C build +make -C build install cp -v include/*.h /llvmtools/include/ rm -rf build From 1f7f84e04a75d5e565464ac9b66211afc2499284 Mon Sep 17 00:00:00 2001 From: dslm4515 <27793627+dslm4515@users.noreply.github.com> Date: Sat, 26 Jun 2021 15:05:27 -0500 Subject: [PATCH 10/14] Fixed command to build kernel headers with clang, per @owl4ce --- 2-llvmtools/01-kernel-headers | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/2-llvmtools/01-kernel-headers b/2-llvmtools/01-kernel-headers index f112f21..8a5aef3 100644 --- a/2-llvmtools/01-kernel-headers +++ b/2-llvmtools/01-kernel-headers @@ -1,9 +1,10 @@ +# Clean the source make mrproper -# kernel 5.12.x will not build headers with clang -#ARCH=${CMLFS_ARCH} LLVM=1 CC=clang CXX=clang++ make headers -ARCH=${CMLFS_ARCH} CC=clang CXX=clang++ make headers +# Build the headers +make ARCH=${CMLFS_ARCH} LLVM=1 CC=clang CXX=clang++ HOSTCC=${CMLFS_TARGET}-clang headers +# Install the headers to llvmtools find usr/include \( -name .install -o -name ..install.cmd \) -delete cp -rv usr/include/* /llvmtools/include/ rm -v /llvmtools/include/Makefile From 00b6a0d4a7be55873fddf1d3dcb93b5e42915ab8 Mon Sep 17 00:00:00 2001 From: dslm4515 <27793627+dslm4515@users.noreply.github.com> Date: Sat, 26 Jun 2021 18:00:13 -0500 Subject: [PATCH 11/14] Fixed libcxx: Using -isystem instead of -I for CXX flags and build successful per @owl4ace --- 2-llvmtools/04-libcxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/2-llvmtools/04-libcxx b/2-llvmtools/04-libcxx index e6cc23a..5d22d43 100644 --- a/2-llvmtools/04-libcxx +++ b/2-llvmtools/04-libcxx @@ -2,11 +2,13 @@ export CXX=/cgnutools/bin/clang++ export CC=/cgnutools/bin/clang -cd {LLVMSRC}/projects/libcxx +cd ${LLVMSRC}/projects/libcxx -cmake -B build -G Ninja \ +cmake -B build \ -DCMAKE_INSTALL_PREFIX=/llvmtools \ -DLLVM_PATH="${LLVMSRC}" \ + -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_CXX_FLAGS="-isystem /llvmtools/include" \ -DLIBCXX_ENABLE_SHARED=ON \ -DLIBCXX_ENABLE_STATIC=ON \ -DLIBCXX_HAS_MUSL_LIBC=ON \ @@ -15,7 +17,9 @@ cmake -B build -G Ninja \ -DLIBCXX_CXX_ABI_INCLUDE_PATHS="/llvmtools/include" \ -DLIBCXXABI_USE_LLVM_UNWINDER=ON \ -DLIBCXX_CXX_ABI_LIBRARY_PATH=/llvmtools/lib \ - -DLIBCXX_INSTALL_HEADERS=ON -ninja -C build -ninja -C build install + -DLIBCXX_INSTALL_HEADERS=ON \ + -DLIBCXX_INCLUDE_BENCHMARKS=OFF -DLIBCXX_INCLUDE_DOCS=OFF \ + -DLIBCXX_INCLUDE_TESTS=OFF +make -C build +make -C build install rm -rf build From 169ee3cf292f775b503e378700bbf718e870304e Mon Sep 17 00:00:00 2001 From: dslm4515 <27793627+dslm4515@users.noreply.github.com> Date: Sat, 26 Jun 2021 18:04:05 -0500 Subject: [PATCH 12/14] Updated build for llvmtools' libexecinfo --- 2-llvmtools/05-libexecinfo | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/2-llvmtools/05-libexecinfo b/2-llvmtools/05-libexecinfo index 8c251df..e74bb9f 100644 --- a/2-llvmtools/05-libexecinfo +++ b/2-llvmtools/05-libexecinfo @@ -4,9 +4,7 @@ patch -Np1 -i ../patches/libexecinfo-alpine/10-execinfo.patch patch -Np1 -i ../patches/libexecinfo-alpine/20-define-gnu-source.patch patch -Np1 -i ../patches/libexecinfo-alpine/30-linux-makefile.patch -# Modify Makefile to use clang and llvm-ar - -CFLAGS=" -fno-omit-frame-pointer" make +CC=clang CXX=clang++ CFLAGS=" -fno-omit-frame-pointer" make install -D -m755 -v execinfo.h /llvmtools/include/execinfo.h && \ install -D -m755 -v stacktraverse.h /llvmtools/include/stacktraverse.h && \ From eb865bda04fd848719482f8a7a522f5adfbb08d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CA=9C=E1=B4=80=CA=80=CA=80=CA=8F?= Date: Mon, 28 Jun 2021 15:47:09 +0700 Subject: [PATCH 13/14] Use `find` to stripping debug symbols safely (LLVM), MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since `llvm-strip` will stop when using '*', because of first file or directory that reported as "The file was not recognized as a valid object file" Signed-off-by: ʜᴀʀʀʏ --- 2-llvmtools/36-Stripping_and_Ownership | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/2-llvmtools/36-Stripping_and_Ownership b/2-llvmtools/36-Stripping_and_Ownership index 5b5f555..cfecaac 100644 --- a/2-llvmtools/36-Stripping_and_Ownership +++ b/2-llvmtools/36-Stripping_and_Ownership @@ -6,14 +6,14 @@ # of unneeded debugging symbols. # Remove debug symbols with: -strip --strip-debug /llvmtools/lib/* -/usr/bin/strip --strip-unneeded /llvmtools/bin/* +find /llvmtools/lib/ -maxdepth 1 -type f -exec strip --strip-debug {} \; +find /llvmtools/bin/ -maxdepth 1 -type f -exec /cgnutools/bin/llvm-strip --strip-unneeded {} \; # Remove the documentation: rm -rf /llvmtools/{,share}/{info,man,doc} # Remove unneeded files: -find /llvmtools/{lib,libexec} -name \*.la -delete +find /llvmtools/{lib,libexec} -name \*.la -exec rm -rfv {} \; # Changing Ownership # Currently, the $MLFS/tools directory is owned by From f3598fcff5a1e3d915eb25879859b10da5255042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CA=9C=E1=B4=80=CA=80=CA=80=CA=8F?= Date: Wed, 30 Jun 2021 03:10:45 +0700 Subject: [PATCH 14/14] Install `tzselect` utility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ʜᴀʀʀʏ --- 3-chroot/011-timezone_utilities | 1 + 1 file changed, 1 insertion(+) diff --git a/3-chroot/011-timezone_utilities b/3-chroot/011-timezone_utilities index 262d327..13ccc20 100644 --- a/3-chroot/011-timezone_utilities +++ b/3-chroot/011-timezone_utilities @@ -21,6 +21,7 @@ make -C posixtz-0.5 posixtz ./zic -y ./yearistype -d /usr/share/zoneinfo/right -L leapseconds ${timezones} ./zic -y ./yearistype -d /usr/share/zoneinfo -p America/New_York install -m444 -t /usr/share/zoneinfo iso3166.tab zone1970.tab zone.tab +install -m755 tzselect /usr/bin install -m755 zic zdump /usr/sbin install -m644 zic.8 zdump.8 /usr/share/man/man8 #rm -fv /usr/share/zoneinfo/localtime