From 0b977787374349328a21af0deade30d534cf3978 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 18 May 2022 23:40:38 +0100 Subject: fixed gcc loader/linker errors --- repo/devel/gcc/gcc.xibuild | 89 +++++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 40 deletions(-) (limited to 'repo/devel/gcc/gcc.xibuild') diff --git a/repo/devel/gcc/gcc.xibuild b/repo/devel/gcc/gcc.xibuild index e0176cb..a5e294d 100644 --- a/repo/devel/gcc/gcc.xibuild +++ b/repo/devel/gcc/gcc.xibuild @@ -1,7 +1,7 @@ #!/bin/sh MAKEDEPS="grep make dejagnu flex" -DEPS="zstd musl binutils mpc mpfr gmp" +DEPS="zstd musl binutils mpc mpfr gmp libstdc++ libgcc" PKG_VER=11.2.0 @@ -13,45 +13,43 @@ PATCH_SRC="https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/gc ADDITIONAL=" https://libisl.sourceforge.io/isl-$ISL_VER.tar.xz - $PATCH_SRC/0001-posix_memalign.patch - $PATCH_SRC/0003-Turn-on-Wl-z-relro-z-now-by-default.patch - $PATCH_SRC/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch - $PATCH_SRC/0006-Enable-Wformat-and-Wformat-security-by-default.patch - $PATCH_SRC/0007-Enable-Wtrampolines-by-default.patch - $PATCH_SRC/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch - $PATCH_SRC/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch - $PATCH_SRC/0012-libitm-disable-FORTIFY.patch - $PATCH_SRC/0013-libgcc_s.patch - $PATCH_SRC/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch - $PATCH_SRC/0016-dlang-update-zlib-binding.patch - $PATCH_SRC/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch - $PATCH_SRC/0018-ada-fix-shared-linking.patch - $PATCH_SRC/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch - $PATCH_SRC/0020-add-fortify-headers-paths.patch - $PATCH_SRC/0023-Pure-64-bit-MIPS.patch - $PATCH_SRC/0024-use-pure-64-bit-configuration-where-appropriate.patch - $PATCH_SRC/0025-always-build-libgcc_eh.a.patch - $PATCH_SRC/0027-ada-musl-support-fixes.patch - $PATCH_SRC/0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch - $PATCH_SRC/0029-gcc-go-Don-t-include-sys-user.h.patch - $PATCH_SRC/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch - $PATCH_SRC/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch - $PATCH_SRC/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch - $PATCH_SRC/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch - $PATCH_SRC/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch - $PATCH_SRC/0037-gcc-go-link-to-libucontext.patch - $PATCH_SRC/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch - $PATCH_SRC/0041-Use-generic-errstr.go-implementation-on-musl.patch - $PATCH_SRC/0042-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch - $PATCH_SRC/0043-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch - $PATCH_SRC/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch - - - https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/files/musl/getconf.1 - https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/files/musl/getconf.c - https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/files/musl/getent.1 - https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/files/musl/getent.c - https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/files/musl/iconv.c + 0001-posix_memalign.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 + 0006-Enable-Wformat-and-Wformat-security-by-default.patch + 0007-Enable-Wtrampolines-by-default.patch + 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch + 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch + 0012-libitm-disable-FORTIFY.patch + 0013-libgcc_s.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 + 0023-Pure-64-bit-MIPS.patch + 0024-use-pure-64-bit-configuration-where-appropriate.patch + 0025-always-build-libgcc_eh.a.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 + 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 + 0041-Use-generic-errstr.go-implementation-on-musl.patch + 0042-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch + 0043-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch + 0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch + getconf.1 + getconf.c + getent.1 + getent.c + iconv.c " DESC="The GNU Compiler Collection - C and C++ frontends" @@ -162,6 +160,17 @@ check () { package () { + + # create specsfile + export SPECFILE=$PKG_DEST`dirname $(gcc -print-libgcc-file-name)`/specs +gcc -dumpspecs | sed -e 's@/tools@@g' \ + -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \ + -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > tempspecfile + mv -f tempspecfile $SPECFILE && + unset SPECFILE MLFS_TARGET + + + install -dm755 $PKG_DEST/usr/bin install -dm755 $PKG_DEST/usr/share/man install -dm755 $PKG_DEST/usr/lib/bfd-plugins -- cgit v1.2.1