From 76490c09a2d2c48862077a583cc94da3e12e294f Mon Sep 17 00:00:00 2001 From: Max Ivan Date: Sat, 23 Nov 2024 18:43:33 +0300 Subject: [PATCH] cgct/cgt: bump to 14.2.1 (#310) --- cgct/cgt/PKGBUILD | 24 +++++++----- cgct/cgt/config.sub.patch | 4 +- cgct/cgt/configure.patch | 4 +- cgct/cgt/gcc-configure.patch | 4 +- cgct/cgt/set_dynamic_path.patch | 68 ++++++++++++++++----------------- 5 files changed, 54 insertions(+), 50 deletions(-) diff --git a/cgct/cgt/PKGBUILD b/cgct/cgt/PKGBUILD index ae88cc985..c1bb5f71a 100644 --- a/cgct/cgt/PKGBUILD +++ b/cgct/cgt/PKGBUILD @@ -1,22 +1,23 @@ pkgname=cgt -pkgver=14.2.0 +pkgver=14.2.1 pkgrel=0 pkgdesc='Cross GCCs for Termux (only for Linux)' arch=(x86_64) url='https://gcc.gnu.org/' license=(GPL LGPL FDL) -source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz +_commit=694613a7f9adfa9c87e733adc63839c8801f2b5c +source=(git+https://sourceware.org/git/gcc.git#commit=${_commit} gcc-configure.patch config.sub.patch configure.patch set_dynamic_path.patch cgct-app-prefix.cc cgct-app-prefix.h) -sha256sums=('a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9' - 'f4962b9ab48271994fefbd7c654fd2d60356a39abecc3510cfe45d1be7f50483' - '805fa7799fe23f2e4b1d5f9d10fadf46a45f446c6462f32f3b7633b8941003f3' - 'ba65de3512c3d02030c5e3bcd70b69a7922eec6bdc24763bf4a6045447dc1d84' - 'e402f2bc3288158e8edbef27b511015d87f37ba70ddbd84c2b925fe075822f95' +sha256sums=('085eba5de615f6f74729f96e8c301808159b72382ad331ebec9c79c2bd08e20d' + 'b0d2153d28248189ad1f000194c9b12aa7cea04c09c9f36a2e78b2c25b771392' + 'a688899b982608089ee76a97e18c019f596ccb5cad055916a6ad6d387568b3dc' + '8ad880e14a32a3b5f3ab8039df89b22479c4a92bfbe6b3f758409264ddef5479' + 'aa87377b2a73e303c45d9a86496b94193799083324a442572768bd1b704a71e8' '732e15a76056348911f60825c377c0378f6dad57b29eb86fcc7447cf8172f171' '9fb91df134d096bf493844812617b5aed9ce5d6ccd564f8a3a11c8d9812be744') depends=('cbt') @@ -26,13 +27,14 @@ targets=(aarch64-linux-gnu arm-linux-gnueabihf x86_64-linux-gnu i686-linux-gnu) options=(libtool staticlibs !emptydirs) prepare() { + [ ! -d gcc ] && ln -s gcc-${pkgver} gcc for i in *.patch; do patch -Np1 -i ${srcdir}/$i done - cp ./cgct-app-prefix.{cc,h} ./gcc-${pkgver}/gcc/ + cp ./cgct-app-prefix.{cc,h} ./gcc/gcc/ - cd gcc-${pkgver} + cd gcc sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64 sed -i '/lp64=/s/lib64/lib/' gcc/config/aarch64/t-aarch64-linux @@ -42,6 +44,8 @@ prepare() { '${prefix}/${target_alias}'; do sed -i "s|${i}|${i%%/*}|" $(grep -s -r -l "${i}") done + echo "${pkgver}" > gcc/BASE-VER + echo "${_commit}" > gcc/DEV-PHASE } build() { @@ -70,7 +74,7 @@ build() { "i686") CONFIGFLAG="--with-arch=i686";; esac - "$srcdir"/gcc-${pkgver}/configure \ + "$srcdir"/gcc/configure \ --host=cgct \ --build=${CHOST} \ --target=${target} \ diff --git a/cgct/cgt/config.sub.patch b/cgct/cgt/config.sub.patch index 4c6ff4745..590e5e804 100644 --- a/cgct/cgt/config.sub.patch +++ b/cgct/cgt/config.sub.patch @@ -1,5 +1,5 @@ ---- src/gcc-14.2.0/config.sub 2024-04-17 12:59:33.770464867 +0300 -+++ src/gcc-14.2.0/config.sub.patch 2024-04-17 13:10:53.190464608 +0300 +--- src/gcc/config.sub 2024-04-17 12:59:33.770464867 +0300 ++++ src/gcc/config.sub.patch 2024-04-17 13:10:53.190464608 +0300 @@ -647,6 +647,10 @@ basic_machine=ymp-cray basic_os=unicos diff --git a/cgct/cgt/configure.patch b/cgct/cgt/configure.patch index 202877d0b..994381e02 100644 --- a/cgct/cgt/configure.patch +++ b/cgct/cgt/configure.patch @@ -1,5 +1,5 @@ ---- src/gcc-14.2.0/configure 2023-07-27 11:13:03.000000000 +0300 -+++ src/gcc-14.2.0/configure.patch 2024-04-17 19:47:43.249004152 +0300 +--- src/gcc/configure 2023-07-27 11:13:03.000000000 +0300 ++++ src/gcc/configure.patch 2024-04-17 19:47:43.249004152 +0300 @@ -17498,7 +17498,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ar" >&5 diff --git a/cgct/cgt/gcc-configure.patch b/cgct/cgt/gcc-configure.patch index 5edb7d5f1..81b0ced87 100644 --- a/cgct/cgt/gcc-configure.patch +++ b/cgct/cgt/gcc-configure.patch @@ -1,5 +1,5 @@ ---- src/gcc-14.2.0/gcc/configure 2024-05-20 09:02:31.592159861 +0300 -+++ src/gcc-14.2.0/gcc/configure.patch 2024-05-20 09:04:22.992159819 +0300 +--- src/gcc/gcc/configure 2024-05-20 09:02:31.592159861 +0300 ++++ src/gcc/gcc/configure.patch 2024-05-20 09:04:22.992159819 +0300 @@ -3784,9 +3784,6 @@ gcc_gxx_include_dir='${libsubdir}/include/c++' else diff --git a/cgct/cgt/set_dynamic_path.patch b/cgct/cgt/set_dynamic_path.patch index 8820a742f..77882703b 100644 --- a/cgct/cgt/set_dynamic_path.patch +++ b/cgct/cgt/set_dynamic_path.patch @@ -1,5 +1,5 @@ ---- src/gcc-14.2.0/gcc/Makefile.in -+++ src/gcc-14.2.0/gcc/Makefile.in +--- src/gcc/gcc/Makefile.in ++++ src/gcc/gcc/Makefile.in @@ -559,13 +559,9 @@ FNMATCH_H = $(srcdir)/../include/fnmatch.h LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h @@ -72,8 +72,8 @@ $(mkinstalldirs) $${include_dir}; \ chmod a+rx $${include_dir} || true; \ $(SHELL) $(srcdir)/../move-if-change \ ---- src/gcc-14.2.0/gcc/collect2.cc -+++ src/gcc-14.2.0/gcc/collect2.cc +--- src/gcc/gcc/collect2.cc ++++ src/gcc/gcc/collect2.cc @@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see #include "file-find.h" #include "simple-object.h" @@ -130,8 +130,8 @@ NULL }; ---- src/gcc-14.2.0/gcc/config/aarch64/aarch64-linux.h -+++ src/gcc-14.2.0/gcc/config/aarch64/aarch64-linux.h +--- src/gcc/gcc/config/aarch64/aarch64-linux.h ++++ src/gcc/gcc/config/aarch64/aarch64-linux.h @@ -21,7 +21,9 @@ #ifndef GCC_AARCH64_LINUX_H #define GCC_AARCH64_LINUX_H @@ -168,8 +168,8 @@ #define GNU_USER_TARGET_MATHFILE_SPEC \ "%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}}" ---- src/gcc-14.2.0/gcc/config/arm/linux-eabi.h -+++ src/gcc-14.2.0/gcc/config/arm/linux-eabi.h +--- src/gcc/gcc/config/arm/linux-eabi.h ++++ src/gcc/gcc/config/arm/linux-eabi.h @@ -18,6 +18,8 @@ along with GCC; see the file COPYING3. If not see . */ @@ -223,8 +223,8 @@ /* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we do not use -lfloat. */ ---- src/gcc-14.2.0/gcc/config/arm/linux-elf.h -+++ src/gcc-14.2.0/gcc/config/arm/linux-elf.h +--- src/gcc/gcc/config/arm/linux-elf.h ++++ src/gcc/gcc/config/arm/linux-elf.h @@ -62,16 +62,16 @@ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" @@ -246,8 +246,8 @@ #undef LINK_SPEC #define LINK_SPEC LINUX_TARGET_LINK_SPEC ---- src/gcc-14.2.0/gcc/config/i386/gnu-user64.h -+++ src/gcc-14.2.0/gcc/config/i386/gnu-user64.h +--- src/gcc/gcc/config/i386/gnu-user64.h ++++ src/gcc/gcc/config/i386/gnu-user64.h @@ -52,19 +52,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see %{" SPEC_X32 ":--x32} \ %{msse2avx:%{!mavx:-msse2avx}}" @@ -276,8 +276,8 @@ #undef LINK_SPEC #define LINK_SPEC GNU_USER_TARGET_LINK_SPEC ---- src/gcc-14.2.0/gcc/config/i386/linux-common.h -+++ src/gcc-14.2.0/gcc/config/i386/linux-common.h +--- src/gcc/gcc/config/i386/linux-common.h ++++ src/gcc/gcc/config/i386/linux-common.h @@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see #undef LINK_SPEC #define LINK_SPEC \ @@ -287,8 +287,8 @@ #undef LIB_SPEC #define LIB_SPEC \ ---- src/gcc-14.2.0/gcc/config/i386/linux.h -+++ src/gcc-14.2.0/gcc/config/i386/linux.h +--- src/gcc/gcc/config/i386/linux.h ++++ src/gcc/gcc/config/i386/linux.h @@ -19,8 +19,11 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ @@ -302,8 +302,8 @@ #undef MUSL_DYNAMIC_LINKER #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" ---- src/gcc-14.2.0/gcc/config/i386/linux64.h -+++ src/gcc-14.2.0/gcc/config/i386/linux64.h +--- src/gcc/gcc/config/i386/linux64.h ++++ src/gcc/gcc/config/i386/linux64.h @@ -23,13 +23,15 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ @@ -323,8 +323,8 @@ #undef MUSL_DYNAMIC_LINKER32 #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" ---- src/gcc-14.2.0/gcc/config/linux-android.h -+++ src/gcc-14.2.0/gcc/config/linux-android.h +--- src/gcc/gcc/config/linux-android.h ++++ src/gcc/gcc/config/linux-android.h @@ -35,7 +35,7 @@ "%{" NOANDROID "|tno-android-cc:" LINUX_SPEC ";:" ANDROID_SPEC "}" @@ -334,8 +334,8 @@ #define ANDROID_LINK_SPEC \ "%{shared: -Bsymbolic}" ---- src/gcc-14.2.0/gcc/config/linux.h -+++ src/gcc-14.2.0/gcc/config/linux.h +--- src/gcc/gcc/config/linux.h ++++ src/gcc/gcc/config/linux.h @@ -27,6 +27,8 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ @@ -385,8 +385,8 @@ # undef INCLUDE_DEFAULTS_MUSL_CROSS # define INCLUDE_DEFAULTS_MUSL_CROSS #endif ---- src/gcc-14.2.0/gcc/cppdefault.cc -+++ src/gcc-14.2.0/gcc/cppdefault.cc +--- src/gcc/gcc/cppdefault.cc ++++ src/gcc/gcc/cppdefault.cc @@ -23,15 +23,13 @@ #include "coretypes.h" #include "tm.h" @@ -425,17 +425,17 @@ #endif { 0, 0, 0, 0, 0, 0 } }; ---- src/gcc-14.2.0/gcc/gcc.cc -+++ src/gcc-14.2.0/gcc/gcc.cc -@@ -47,6 +47,7 @@ compilation is specified by a string called a "spec". */ - #include "opts-jobserver.h" +--- src/gcc/gcc/gcc.cc 2024-11-22 23:52:07.605751246 +0300 ++++ src/gcc/gcc/gcc.cc.patch 2024-11-23 00:09:51.505136358 +0300 +@@ -51,6 +51,7 @@ compilation is specified by a string cal #include "common/common-target.h" #include "gcc-urlifier.h" + #include "opts-diagnostic.h" +#include "cgct-app-prefix.h" #ifndef MATH_LIBRARY #define MATH_LIBRARY "m" -@@ -1603,11 +1604,10 @@ static const char *gcc_libexec_prefix; +@@ -1607,11 +1608,10 @@ static const char *gcc_libexec_prefix; /* Default prefixes to attach to command names. */ @@ -451,7 +451,7 @@ #endif #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */ -@@ -1644,10 +1644,10 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; +@@ -1648,10 +1648,10 @@ static const char *const standard_startf static const char *md_exec_prefix = MD_EXEC_PREFIX; static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; @@ -466,7 +466,7 @@ /* A relative path to be used in finding the location of tools relative to the driver. */ -@@ -4849,6 +4849,8 @@ process_command (unsigned int decoded_options_count, +@@ -4876,6 +4876,8 @@ process_command (unsigned int decoded_op that are lists of directory names with colons. */ temp = env.get ("COMPILER_PATH"); @@ -475,7 +475,7 @@ if (temp) { const char *startp, *endp; -@@ -8554,7 +8556,7 @@ driver::set_up_specs () const +@@ -8569,7 +8571,7 @@ driver::set_up_specs () const } /* We should eventually get rid of all these and stick to startfile_prefix_spec exclusively. */ @@ -484,7 +484,7 @@ { if (*md_startfile_prefix) add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix, -@@ -8575,7 +8577,7 @@ driver::set_up_specs () const +@@ -8590,7 +8592,7 @@ driver::set_up_specs () const add_sysrooted_prefix (&startfile_prefixes, standard_startfile_prefix, "BINUTILS", PREFIX_PRIORITY_LAST, 0, 1); @@ -493,7 +493,7 @@ { add_prefix (&startfile_prefixes, concat (gcc_exec_prefix -@@ -8587,13 +8589,15 @@ driver::set_up_specs () const +@@ -8602,13 +8604,15 @@ driver::set_up_specs () const /* Sysrooted prefixes are relocated because target_system_root is also relocated by gcc_exec_prefix. */