From 01d51c4acaec26b7cd81dfd15268cb5d77443833 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Thu, 13 Jun 2024 23:25:00 -0700 Subject: [PATCH 1/6] binutils: update to 2.42. --- srcpkgs/binutils/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template index a23501510376a7..2cd023b495accc 100644 --- a/srcpkgs/binutils/template +++ b/srcpkgs/binutils/template @@ -1,7 +1,7 @@ # Template file for 'binutils' pkgname=binutils -version=2.41 -revision=3 +version=2.42 +revision=1 bootstrap=yes hostmakedepends="pkgconf" makedepends="zlib-devel libzstd-devel" @@ -10,7 +10,7 @@ maintainer="Enno Boland " license="GPL-3.0-or-later" homepage="http://www.gnu.org/software/binutils/" distfiles="${GNU_SITE}/binutils/binutils-${version}.tar.xz" -checksum=ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450 +checksum=f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a800 build_options="all_targets" desc_option_all_targets="Enable all supported targets" From 2019336796fab68e3d8cc0ca134c08d8e336fbec Mon Sep 17 00:00:00 2001 From: oreo639 Date: Thu, 13 Jun 2024 23:30:25 -0700 Subject: [PATCH 2/6] gcc: update to 14.1.0. --- common/shlibs | 2 +- ...5980633c502f0486a2e40e96224f49134130.patch | 297 ------------------ ...ad833631486e337e541e692d9b4a1ca14edd.patch | 142 --------- ...9de35fb1b293a4fd586574b1b4b73ddf7880.patch | 60 ---- .../patches/fix-pretty-printer-warnings.patch | 125 -------- srcpkgs/gcc/template | 6 +- 6 files changed, 4 insertions(+), 628 deletions(-) delete mode 100644 srcpkgs/gcc/patches/15345980633c502f0486a2e40e96224f49134130.patch delete mode 100644 srcpkgs/gcc/patches/d7bead833631486e337e541e692d9b4a1ca14edd.patch delete mode 100644 srcpkgs/gcc/patches/f4029de35fb1b293a4fd586574b1b4b73ddf7880.patch delete mode 100644 srcpkgs/gcc/patches/fix-pretty-printer-warnings.patch diff --git a/common/shlibs b/common/shlibs index 80eca3e0a08dca..159c9a5014127a 100644 --- a/common/shlibs +++ b/common/shlibs @@ -63,7 +63,7 @@ libcc1plugin.so.0 gcc-6.2.1_1 libitm.so.1 libitm-4.7.3_1 liblto_plugin.so.0 gcc-4.7.3_1 libgcc_s.so.1 libgcc-4.4.0_1 -libgo.so.22 libgo-13.2.0_1 +libgo.so.23 libgo-14.1.0_1 libgccjit.so.0 libgccjit-10.2.1pre1_1 libperl.so.5.38 perl-5.38.0_1 libgmp.so.10 gmp-5.0.1_1 diff --git a/srcpkgs/gcc/patches/15345980633c502f0486a2e40e96224f49134130.patch b/srcpkgs/gcc/patches/15345980633c502f0486a2e40e96224f49134130.patch deleted file mode 100644 index d64fabeaad1ec9..00000000000000 --- a/srcpkgs/gcc/patches/15345980633c502f0486a2e40e96224f49134130.patch +++ /dev/null @@ -1,297 +0,0 @@ -From 15345980633c502f0486a2e40e96224f49134130 Mon Sep 17 00:00:00 2001 -From: Jakub Jelinek -Date: Tue, 19 Sep 2023 09:26:35 +0200 -Subject: [PATCH] libgomp: Handle NULL environ like pointer to NULL pointer - [PR111413] - -clearenv function just sets environ to NULL (after sometimes freeing it), -rather than setting it to a pointer to NULL, and our code was assuming -it is always non-NULL. - -Fixed thusly, the change seems to be large but actually is just -+ if (environ) - for (env = environ; *env != 0; env++) -plus reindentation. I've also noticed the block after this for loop -was badly indented (too much) and fixed that too. - -No testcase added, as it needs clearenv + dlopen. - -2023-09-19 Jakub Jelinek - - PR libgomp/111413 - * env.c (initialize_env): Don't dereference environ if it is NULL. - Reindent. ---- - libgomp/env.c | 251 +++++++++++++++++++++++++------------------------- - 1 file changed, 126 insertions(+), 125 deletions(-) - -diff --git a/libgomp/env.c b/libgomp/env.c -index f24484d7f7074..a21adb3fd4bdb 100644 ---- a/libgomp/env.c -+++ b/libgomp/env.c -@@ -2224,139 +2224,140 @@ initialize_env (void) - none = gomp_get_initial_icv_item (GOMP_DEVICE_NUM_FOR_NO_SUFFIX); - initialize_icvs (&none->icvs); - -- for (env = environ; *env != 0; env++) -- { -- if (!startswith (*env, "OMP_")) -- continue; -- -- /* Name of the environment variable without suffix "OMP_". */ -- char *name = *env + sizeof ("OMP_") - 1; -- for (omp_var = 0; omp_var < OMP_VAR_CNT; omp_var++) -- { -- if (startswith (name, envvars[omp_var].name)) -- { -- pos = envvars[omp_var].name_len; -- if (name[pos] == '=') -- { -- pos++; -- flag_var_addr -- = add_initial_icv_to_list (GOMP_DEVICE_NUM_FOR_NO_SUFFIX, -- envvars[omp_var].flag_vars[0], -- params); -- } -- else if (startswith (&name[pos], "_DEV=") -- && envvars[omp_var].flag & GOMP_ENV_SUFFIX_DEV) -- { -- pos += 5; -- flag_var_addr -- = add_initial_icv_to_list (GOMP_DEVICE_NUM_FOR_DEV, -- envvars[omp_var].flag_vars[0], -- params); -- } -- else if (startswith (&name[pos], "_ALL=") -- && envvars[omp_var].flag & GOMP_ENV_SUFFIX_ALL) -- { -- pos += 5; -- flag_var_addr -- = add_initial_icv_to_list (GOMP_DEVICE_NUM_FOR_ALL, -- envvars[omp_var].flag_vars[0], -- params); -- } -- else if (startswith (&name[pos], "_DEV_") -- && envvars[omp_var].flag & GOMP_ENV_SUFFIX_DEV_X) -- { -- pos += 5; -- if (!get_device_num (*env, &name[pos], &dev_num, -- &dev_num_len)) -- break; -- -- pos += dev_num_len + 1; -- flag_var_addr -- = add_initial_icv_to_list (dev_num, -- envvars[omp_var].flag_vars[0], -- params); -- } -- else -- { -- gomp_error ("Invalid environment variable in %s", *env); -- break; -- } -- env_val = &name[pos]; -+ if (environ) -+ for (env = environ; *env != 0; env++) -+ { -+ if (!startswith (*env, "OMP_")) -+ continue; - -- if (envvars[omp_var].parse_func (*env, env_val, params)) -- { -- for (i = 0; i < 3; ++i) -- if (envvars[omp_var].flag_vars[i]) -- gomp_set_icv_flag (flag_var_addr, -- envvars[omp_var].flag_vars[i]); -- else -+ /* Name of the environment variable without suffix "OMP_". */ -+ char *name = *env + sizeof ("OMP_") - 1; -+ for (omp_var = 0; omp_var < OMP_VAR_CNT; omp_var++) -+ { -+ if (startswith (name, envvars[omp_var].name)) -+ { -+ pos = envvars[omp_var].name_len; -+ if (name[pos] == '=') -+ { -+ pos++; -+ flag_var_addr -+ = add_initial_icv_to_list (GOMP_DEVICE_NUM_FOR_NO_SUFFIX, -+ envvars[omp_var].flag_vars[0], -+ params); -+ } -+ else if (startswith (&name[pos], "_DEV=") -+ && envvars[omp_var].flag & GOMP_ENV_SUFFIX_DEV) -+ { -+ pos += 5; -+ flag_var_addr -+ = add_initial_icv_to_list (GOMP_DEVICE_NUM_FOR_DEV, -+ envvars[omp_var].flag_vars[0], -+ params); -+ } -+ else if (startswith (&name[pos], "_ALL=") -+ && envvars[omp_var].flag & GOMP_ENV_SUFFIX_ALL) -+ { -+ pos += 5; -+ flag_var_addr -+ = add_initial_icv_to_list (GOMP_DEVICE_NUM_FOR_ALL, -+ envvars[omp_var].flag_vars[0], -+ params); -+ } -+ else if (startswith (&name[pos], "_DEV_") -+ && envvars[omp_var].flag & GOMP_ENV_SUFFIX_DEV_X) -+ { -+ pos += 5; -+ if (!get_device_num (*env, &name[pos], &dev_num, -+ &dev_num_len)) - break; -- } - -- break; -- } -- } -- } -+ pos += dev_num_len + 1; -+ flag_var_addr -+ = add_initial_icv_to_list (dev_num, -+ envvars[omp_var].flag_vars[0], -+ params); -+ } -+ else -+ { -+ gomp_error ("Invalid environment variable in %s", *env); -+ break; -+ } -+ env_val = &name[pos]; - -- all = gomp_get_initial_icv_item (GOMP_DEVICE_NUM_FOR_ALL); -- for (omp_var = 0; omp_var < OMP_HOST_VAR_CNT; omp_var++) -- { -- if (none != NULL -- && gomp_get_icv_flag (none->flags, host_envvars[omp_var].flag_var)) -- get_icv_member_addr (&none->icvs, -- host_envvars[omp_var].flag_var, params); -- else if (all != NULL -- && gomp_get_icv_flag (all->flags, -- host_envvars[omp_var].flag_var)) -- get_icv_member_addr (&all->icvs, host_envvars[omp_var].flag_var, -- params); -- else -- continue; -+ if (envvars[omp_var].parse_func (*env, env_val, params)) -+ { -+ for (i = 0; i < 3; ++i) -+ if (envvars[omp_var].flag_vars[i]) -+ gomp_set_icv_flag (flag_var_addr, -+ envvars[omp_var].flag_vars[i]); -+ else -+ break; -+ } - -- switch (host_envvars[omp_var].type_code) -- { -- case PARSE_INT: -- for (i = 0; i < 3; ++i) -- if (host_envvars[omp_var].dest[i] != NULL && params[i] != NULL) -- *(int *) (host_envvars[omp_var].dest[i]) = *(int *) params[i]; -- break; -- case PARSE_BOOL: -- for (i = 0; i < 3; ++i) -- if (host_envvars[omp_var].dest[i] != NULL && params[i] != NULL) -- *(bool *) (host_envvars[omp_var].dest[i]) = *(bool *) params[i]; -- break; -- case PARSE_UINT: -- for (i = 0; i < 3; ++i) -- if (host_envvars[omp_var].dest[i] != NULL && params[i] != NULL) -- *(unsigned int *) (host_envvars[omp_var].dest[i]) -- = *(unsigned int *) params[i]; -- break; -- case PARSE_ULONG: -- for (i = 0; i < 3; ++i) -- if (host_envvars[omp_var].dest[i] != NULL && params[i] != NULL) -- *(unsigned long *) (host_envvars[omp_var].dest[i]) -- = *(unsigned long *) params[i]; -- break; -- case PARSE_UCHAR: -- for (i = 0; i < 3; ++i) -- if (host_envvars[omp_var].dest[i] != NULL && params[i] != NULL) -- *(unsigned char *) (host_envvars[omp_var].dest[i]) -- = *(unsigned char *) params[i]; -- break; -- case PARSE_SCHEDULE: -- *(enum gomp_schedule_type *) (host_envvars[omp_var].dest[0]) -- = *(enum gomp_schedule_type *) params[0]; -- *(int *) (host_envvars[omp_var].dest[1]) = *(int *) params[1]; -- break; -- case PARSE_BIND: -- *(char *) (host_envvars[omp_var].dest[0]) = *(char *) params[0]; -- *(char **) (host_envvars[omp_var].dest[1]) = *(char **) params[1]; -- *(unsigned long *) (host_envvars[omp_var].dest[2]) -- = *(unsigned long *) params[2]; -- break; -+ break; -+ } - } - } - -+ all = gomp_get_initial_icv_item (GOMP_DEVICE_NUM_FOR_ALL); -+ for (omp_var = 0; omp_var < OMP_HOST_VAR_CNT; omp_var++) -+ { -+ if (none != NULL -+ && gomp_get_icv_flag (none->flags, host_envvars[omp_var].flag_var)) -+ get_icv_member_addr (&none->icvs, -+ host_envvars[omp_var].flag_var, params); -+ else if (all != NULL -+ && gomp_get_icv_flag (all->flags, -+ host_envvars[omp_var].flag_var)) -+ get_icv_member_addr (&all->icvs, host_envvars[omp_var].flag_var, -+ params); -+ else -+ continue; -+ -+ switch (host_envvars[omp_var].type_code) -+ { -+ case PARSE_INT: -+ for (i = 0; i < 3; ++i) -+ if (host_envvars[omp_var].dest[i] != NULL && params[i] != NULL) -+ *(int *) (host_envvars[omp_var].dest[i]) = *(int *) params[i]; -+ break; -+ case PARSE_BOOL: -+ for (i = 0; i < 3; ++i) -+ if (host_envvars[omp_var].dest[i] != NULL && params[i] != NULL) -+ *(bool *) (host_envvars[omp_var].dest[i]) = *(bool *) params[i]; -+ break; -+ case PARSE_UINT: -+ for (i = 0; i < 3; ++i) -+ if (host_envvars[omp_var].dest[i] != NULL && params[i] != NULL) -+ *(unsigned int *) (host_envvars[omp_var].dest[i]) -+ = *(unsigned int *) params[i]; -+ break; -+ case PARSE_ULONG: -+ for (i = 0; i < 3; ++i) -+ if (host_envvars[omp_var].dest[i] != NULL && params[i] != NULL) -+ *(unsigned long *) (host_envvars[omp_var].dest[i]) -+ = *(unsigned long *) params[i]; -+ break; -+ case PARSE_UCHAR: -+ for (i = 0; i < 3; ++i) -+ if (host_envvars[omp_var].dest[i] != NULL && params[i] != NULL) -+ *(unsigned char *) (host_envvars[omp_var].dest[i]) -+ = *(unsigned char *) params[i]; -+ break; -+ case PARSE_SCHEDULE: -+ *(enum gomp_schedule_type *) (host_envvars[omp_var].dest[0]) -+ = *(enum gomp_schedule_type *) params[0]; -+ *(int *) (host_envvars[omp_var].dest[1]) = *(int *) params[1]; -+ break; -+ case PARSE_BIND: -+ *(char *) (host_envvars[omp_var].dest[0]) = *(char *) params[0]; -+ *(char **) (host_envvars[omp_var].dest[1]) = *(char **) params[1]; -+ *(unsigned long *) (host_envvars[omp_var].dest[2]) -+ = *(unsigned long *) params[2]; -+ break; -+ } -+ } -+ - if (((none != NULL && gomp_get_icv_flag (none->flags, GOMP_ICV_BIND)) - || (all != NULL && gomp_get_icv_flag (all->flags, GOMP_ICV_BIND))) - && gomp_global_icv.bind_var == omp_proc_bind_false) diff --git a/srcpkgs/gcc/patches/d7bead833631486e337e541e692d9b4a1ca14edd.patch b/srcpkgs/gcc/patches/d7bead833631486e337e541e692d9b4a1ca14edd.patch deleted file mode 100644 index f9dfee06215537..00000000000000 --- a/srcpkgs/gcc/patches/d7bead833631486e337e541e692d9b4a1ca14edd.patch +++ /dev/null @@ -1,142 +0,0 @@ -From d7bead833631486e337e541e692d9b4a1ca14edd Mon Sep 17 00:00:00 2001 -From: Fangrui Song -Date: Fri, 28 Apr 2023 09:59:17 -0700 -Subject: [PATCH] [sanitizer] Remove crypt and crypt_r interceptors - -From Florian Weimer's D144073 - -> On GNU/Linux (glibc), the crypt and crypt_r functions are not part of the main shared object (libc.so.6), but libcrypt (with multiple possible sonames). The sanitizer libraries do not depend on libcrypt, so it can happen that during sanitizer library initialization, no real implementation will be found because the crypt, crypt_r functions are not present in the process image (yet). If its interceptors are called nevertheless, this results in a call through a null pointer when the sanitizer library attempts to forward the call to the real implementation. -> -> Many distributions have already switched to libxcrypt, a library that is separate from glibc and that can be build with sanitizers directly (avoiding the need for interceptors). This patch disables building the interceptor for glibc targets. - -Let's remove crypt and crypt_r interceptors (D68431) to fix issues with -newer glibc. - -For older glibc, msan will not know that an uninstrumented crypt_r call -initializes `data`, so there is a risk for false positives. However, with some -codebase survey, I think crypt_r uses are very few and the call sites typically -have a `memset(&data, 0, sizeof(data));` anyway. - -Fix https://github.com/google/sanitizers/issues/1365 -Related: https://bugzilla.redhat.com/show_bug.cgi?id=2169432 - -Reviewed By: #sanitizers, fweimer, thesamesam, vitalybuka - -Differential Revision: https://reviews.llvm.org/D149403 ---- - .../sanitizer_common_interceptors.inc | 37 ------------------- - .../sanitizer_platform_interceptors.h | 2 - - .../sanitizer_platform_limits_posix.cpp | 8 ---- - .../sanitizer_platform_limits_posix.h | 1 - - .../TestCases/Linux/crypt_r.cpp | 36 ------------------ - .../TestCases/Posix/crypt.cpp | 32 ---------------- - 6 files changed, 116 deletions(-) - delete mode 100644 compiler-rt/test/sanitizer_common/TestCases/Linux/crypt_r.cpp - delete mode 100644 compiler-rt/test/sanitizer_common/TestCases/Posix/crypt.cpp - -diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc -index b30c91f06cfeb0..490a8b12d8b17d 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc -+++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc -@@ -10086,41 +10086,6 @@ INTERCEPTOR(SSIZE_T, getrandom, void *buf, SIZE_T buflen, unsigned int flags) { - #define INIT_GETRANDOM - #endif - --#if SANITIZER_INTERCEPT_CRYPT --INTERCEPTOR(char *, crypt, char *key, char *salt) { -- void *ctx; -- COMMON_INTERCEPTOR_ENTER(ctx, crypt, key, salt); -- COMMON_INTERCEPTOR_READ_RANGE(ctx, key, internal_strlen(key) + 1); -- COMMON_INTERCEPTOR_READ_RANGE(ctx, salt, internal_strlen(salt) + 1); -- char *res = REAL(crypt)(key, salt); -- if (res != nullptr) -- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, internal_strlen(res) + 1); -- return res; --} --#define INIT_CRYPT COMMON_INTERCEPT_FUNCTION(crypt); --#else --#define INIT_CRYPT --#endif -- --#if SANITIZER_INTERCEPT_CRYPT_R --INTERCEPTOR(char *, crypt_r, char *key, char *salt, void *data) { -- void *ctx; -- COMMON_INTERCEPTOR_ENTER(ctx, crypt_r, key, salt, data); -- COMMON_INTERCEPTOR_READ_RANGE(ctx, key, internal_strlen(key) + 1); -- COMMON_INTERCEPTOR_READ_RANGE(ctx, salt, internal_strlen(salt) + 1); -- char *res = REAL(crypt_r)(key, salt, data); -- if (res != nullptr) { -- COMMON_INTERCEPTOR_WRITE_RANGE(ctx, data, -- __sanitizer::struct_crypt_data_sz); -- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, internal_strlen(res) + 1); -- } -- return res; --} --#define INIT_CRYPT_R COMMON_INTERCEPT_FUNCTION(crypt_r); --#else --#define INIT_CRYPT_R --#endif -- - #if SANITIZER_INTERCEPT_GETENTROPY - INTERCEPTOR(int, getentropy, void *buf, SIZE_T buflen) { - void *ctx; -@@ -10698,8 +10663,6 @@ static void InitializeCommonInterceptors() { - INIT_GETUSERSHELL; - INIT_SL_INIT; - INIT_GETRANDOM; -- INIT_CRYPT; -- INIT_CRYPT_R; - INIT_GETENTROPY; - INIT_QSORT; - INIT_QSORT_R; -diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h -index eb39fabfd59839..c82ab5c2105621 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h -@@ -569,8 +569,6 @@ - #define SANITIZER_INTERCEPT_FDEVNAME SI_FREEBSD - #define SANITIZER_INTERCEPT_GETUSERSHELL (SI_POSIX && !SI_ANDROID) - #define SANITIZER_INTERCEPT_SL_INIT (SI_FREEBSD || SI_NETBSD) --#define SANITIZER_INTERCEPT_CRYPT (SI_POSIX && !SI_ANDROID) --#define SANITIZER_INTERCEPT_CRYPT_R (SI_LINUX && !SI_ANDROID) - - #define SANITIZER_INTERCEPT_GETRANDOM \ - ((SI_LINUX && __GLIBC_PREREQ(2, 25)) || SI_FREEBSD) -diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp -index a04eed7aa5a6e3..6d61d276d77e35 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp -@@ -177,10 +177,6 @@ typedef struct user_fpregs elf_fpregset_t; - # include "sanitizer_platform_interceptors.h" - # include "sanitizer_platform_limits_posix.h" - --#if SANITIZER_INTERCEPT_CRYPT_R --#include --#endif -- - namespace __sanitizer { - unsigned struct_utsname_sz = sizeof(struct utsname); - unsigned struct_stat_sz = sizeof(struct stat); -@@ -300,10 +296,6 @@ namespace __sanitizer { - unsigned struct_statvfs64_sz = sizeof(struct statvfs64); - #endif // SANITIZER_GLIBC - --#if SANITIZER_INTERCEPT_CRYPT_R -- unsigned struct_crypt_data_sz = sizeof(struct crypt_data); --#endif -- - #if SANITIZER_LINUX && !SANITIZER_ANDROID - unsigned struct_timex_sz = sizeof(struct timex); - unsigned struct_msqid_ds_sz = sizeof(struct msqid_ds); -diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h -index e6f298c26e1fb6..58244c9944a03a 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -@@ -309,7 +309,6 @@ extern unsigned struct_msqid_ds_sz; - extern unsigned struct_mq_attr_sz; - extern unsigned struct_timex_sz; - extern unsigned struct_statvfs_sz; --extern unsigned struct_crypt_data_sz; - #endif // SANITIZER_LINUX && !SANITIZER_ANDROID - - struct __sanitizer_iovec { diff --git a/srcpkgs/gcc/patches/f4029de35fb1b293a4fd586574b1b4b73ddf7880.patch b/srcpkgs/gcc/patches/f4029de35fb1b293a4fd586574b1b4b73ddf7880.patch deleted file mode 100644 index 7338b3dd1ede37..00000000000000 --- a/srcpkgs/gcc/patches/f4029de35fb1b293a4fd586574b1b4b73ddf7880.patch +++ /dev/null @@ -1,60 +0,0 @@ -From f4029de35fb1b293a4fd586574b1b4b73ddf7880 Mon Sep 17 00:00:00 2001 -From: Prathamesh Kulkarni -Date: Wed, 26 Jul 2023 22:36:26 +0530 -Subject: [PATCH] [aarch64/match.pd] Fix ICE observed in PR110280. - -gcc/ChangeLog: - PR tree-optimization/110280 - * match.pd (vec_perm_expr(v, v, mask) -> v): Explicitly build vector - using build_vector_from_val with the element of input operand, and - mask's type if operand and mask's types don't match. - -gcc/testsuite/ChangeLog: - PR tree-optimization/110280 - * gcc.target/aarch64/sve/pr110280.c: New test. - -(cherry picked from commit 85d8e0d8d5342ec8b4e6a54e22741c30b33c6f04) ---- - gcc/match.pd | 9 ++++++++- - gcc/testsuite/gcc.target/aarch64/sve/pr110280.c | 12 ++++++++++++ - 2 files changed, 20 insertions(+), 1 deletion(-) - create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/pr110280.c - -diff --git a/gcc/match.pd b/gcc/match.pd -index 9118244825054..c3bb4fbc0a7a2 100644 ---- a/gcc/match.pd -+++ b/gcc/match.pd -@@ -8292,7 +8292,14 @@ and, - - (simplify - (vec_perm vec_same_elem_p@0 @0 @1) -- @0) -+ (if (types_match (type, TREE_TYPE (@0))) -+ @0 -+ (with -+ { -+ tree elem = uniform_vector_p (@0); -+ } -+ (if (elem) -+ { build_vector_from_val (type, elem); })))) - - /* Push VEC_PERM earlier if that may help FMA perception (PR101895). */ - (simplify -diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c -new file mode 100644 -index 0000000000000..d3279f383629f ---- /dev/null -+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c -@@ -0,0 +1,12 @@ -+/* { dg-do compile } */ -+/* { dg-options "-O3 -fdump-tree-optimized" } */ -+ -+#include "arm_sve.h" -+ -+svuint32_t l() -+{ -+ _Alignas(16) const unsigned int lanes[4] = {0, 0, 0, 0}; -+ return svld1rq_u32(svptrue_b8(), lanes); -+} -+ -+/* { dg-final { scan-tree-dump-not "VEC_PERM_EXPR" "optimized" } } */ diff --git a/srcpkgs/gcc/patches/fix-pretty-printer-warnings.patch b/srcpkgs/gcc/patches/fix-pretty-printer-warnings.patch deleted file mode 100644 index 4eeb69b69b1bbd..00000000000000 --- a/srcpkgs/gcc/patches/fix-pretty-printer-warnings.patch +++ /dev/null @@ -1,125 +0,0 @@ ---- a/libstdc++-v3/python/libstdcxx/v6/printers.py -+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py -@@ -1198,7 +1198,7 @@ - - def __init__ (self, typename, val): - self.typename = strip_versioned_namespace(typename) -- self.typename = re.sub('^std::experimental::fundamentals_v\d::', 'std::experimental::', self.typename, 1) -+ self.typename = re.sub(r'^std::experimental::fundamentals_v\d::', 'std::experimental::', self.typename, 1) - self.val = val - self.contained_type = None - contained_value = None -@@ -1299,7 +1299,7 @@ - mgrtypes = [] - for s in strings: - try: -- x = re.sub("std::string(?!\w)", s, m.group(1)) -+ x = re.sub(r"std::string(?!\w)", s, m.group(1)) - # The following lookup might raise gdb.error if the - # manager function was never instantiated for 's' in the - # program, because there will be no such type. -@@ -1246,7 +1246,7 @@ - def __init__ (self, typename, val): - valtype = self._recognize (val.type.template_argument(0)) - typename = strip_versioned_namespace(typename) -- self.typename = re.sub('^std::(experimental::|)(fundamentals_v\d::|)(.*)', r'std::\1\3<%s>' % valtype, typename, 1) -+ self.typename = re.sub(r'^std::(experimental::|)(fundamentals_v\d::|)(.*)', r'std::\1\3<%s>' % valtype, typename, 1) - payload = val['_M_payload'] - if self.typename.startswith('std::experimental'): - engaged = val['_M_engaged'] -diff '--color=auto' -Naur a/libstdc++-v3/python/libstdcxx/v6/xmethods.py b/libstdc++-v3/python/libstdcxx/v6/xmethods.py ---- a/libstdc++-v3/python/libstdcxx/v6/xmethods.py 2022-08-19 08:09:55.524700157 +0000 -+++ b/libstdc++-v3/python/libstdcxx/v6/xmethods.py 2023-12-09 21:06:42.544909771 +0000 -@@ -148,7 +148,7 @@ - self.methods = [self._method_dict[m] for m in self._method_dict] - - def match(self, class_type, method_name): -- if not re.match('^std::(__\d+::)?array<.*>$', class_type.tag): -+ if not re.match(r'^std::(__\d+::)?array<.*>$', class_type.tag): - return None - method = self._method_dict.get(method_name) - if method is None or not method.enabled: -@@ -265,7 +265,7 @@ - self.methods = [self._method_dict[m] for m in self._method_dict] - - def match(self, class_type, method_name): -- if not re.match('^std::(__\d+::)?deque<.*>$', class_type.tag): -+ if not re.match(r'^std::(__\d+::)?deque<.*>$', class_type.tag): - return None - method = self._method_dict.get(method_name) - if method is None or not method.enabled: -@@ -309,7 +309,7 @@ - self.methods = [self._method_dict[m] for m in self._method_dict] - - def match(self, class_type, method_name): -- if not re.match('^std::(__\d+::)?forward_list<.*>$', class_type.tag): -+ if not re.match(r'^std::(__\d+::)?forward_list<.*>$', class_type.tag): - return None - method = self._method_dict.get(method_name) - if method is None or not method.enabled: -@@ -390,7 +390,7 @@ - self.methods = [self._method_dict[m] for m in self._method_dict] - - def match(self, class_type, method_name): -- if not re.match('^std::(__\d+::)?(__cxx11::)?list<.*>$', class_type.tag): -+ if not re.match(r'^std::(__\d+::)?(__cxx11::)?list<.*>$', class_type.tag): - return None - method = self._method_dict.get(method_name) - if method is None or not method.enabled: -@@ -505,7 +505,7 @@ - self.methods = [self._method_dict[m] for m in self._method_dict] - - def match(self, class_type, method_name): -- if not re.match('^std::(__\d+::)?vector<.*>$', class_type.tag): -+ if not re.match(r'^std::(__\d+::)?vector<.*>$', class_type.tag): - return None - method = self._method_dict.get(method_name) - if method is None or not method.enabled: -@@ -554,7 +554,7 @@ - self.methods = [self._method_dict[m] for m in self._method_dict] - - def match(self, class_type, method_name): -- if not re.match('^std::(__\d+::)?%s<.*>$' % self._name, class_type.tag): -+ if not re.match(r'^std::(__\d+::)?%s<.*>$' % self._name, class_type.tag): - return None - method = self._method_dict.get(method_name) - if method is None or not method.enabled: -@@ -587,9 +587,9 @@ - def __call__(self, obj): - impl_type = obj.dereference().type.fields()[0].type.tag - # Check for new implementations first: -- if re.match('^std::(__\d+::)?__uniq_ptr_(data|impl)<.*>$', impl_type): -+ if re.match(r'^std::(__\d+::)?__uniq_ptr_(data|impl)<.*>$', impl_type): - tuple_member = obj['_M_t']['_M_t'] -- elif re.match('^std::(__\d+::)?tuple<.*>$', impl_type): -+ elif re.match(r'^std::(__\d+::)?tuple<.*>$', impl_type): - tuple_member = obj['_M_t'] - else: - return None -@@ -651,7 +651,7 @@ - self.methods = [self._method_dict[m] for m in self._method_dict] - - def match(self, class_type, method_name): -- if not re.match('^std::(__\d+::)?unique_ptr<.*>$', class_type.tag): -+ if not re.match(r'^std::(__\d+::)?unique_ptr<.*>$', class_type.tag): - return None - method = self._method_dict.get(method_name) - if method is None or not method.enabled: -@@ -720,7 +720,7 @@ - - def __call__(self, obj, index): - # Check bounds if _elem_type is an array of known bound -- m = re.match('.*\[(\d+)]$', str(self._elem_type)) -+ m = re.match(r'.*\[(\d+)]$', str(self._elem_type)) - if m and index >= int(m.group(1)): - raise IndexError('shared_ptr<%s> index "%d" should not be >= %d.' % - (self._elem_type, int(index), int(m.group(1)))) -@@ -769,7 +769,7 @@ - self.methods = [self._method_dict[m] for m in self._method_dict] - - def match(self, class_type, method_name): -- if not re.match('^std::(__\d+::)?shared_ptr<.*>$', class_type.tag): -+ if not re.match(r'^std::(__\d+::)?shared_ptr<.*>$', class_type.tag): - return None - method = self._method_dict.get(method_name) - if method is None or not method.enabled: diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template index 0792954c232887..cf8edb36c3b30f 100644 --- a/srcpkgs/gcc/template +++ b/srcpkgs/gcc/template @@ -3,8 +3,8 @@ # which use the version number. pkgname=gcc -version=13.2.0 -revision=2 +version=14.1.0 +revision=1 _minorver="${version%.*}" _majorver="${_minorver%.*}" _gmp_version=6.3.0 @@ -23,7 +23,7 @@ distfiles=" ${GNU_SITE}/mpfr/mpfr-${_mpfr_version}.tar.xz ${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz ${SOURCEFORGE_SITE}/libisl/isl-${_isl_version}.tar.bz2" -checksum="e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da +checksum="e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840 a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898 277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2 ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8 From 4c5e72b0eaa982d090b9c8f5b7fa7377d5d043e1 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Fri, 14 Jun 2024 13:49:02 -0700 Subject: [PATCH 3/6] libtool: rebuild for gcc14 --- srcpkgs/libtool/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/libtool/template b/srcpkgs/libtool/template index ff545abd3f0da5..76b263cff53293 100644 --- a/srcpkgs/libtool/template +++ b/srcpkgs/libtool/template @@ -1,7 +1,7 @@ # Template file for 'libtool' pkgname=libtool version=2.4.7 -revision=6 +revision=7 build_style=gnu-configure hostmakedepends="texinfo perl automake help2man xz gnulib tar" depends="tar" From c5d2997a486b5f559de14eee55bdf208096b3d0f Mon Sep 17 00:00:00 2001 From: oreo639 Date: Fri, 14 Jun 2024 13:49:18 -0700 Subject: [PATCH 4/6] mk-configure: rebuild for gcc14 --- srcpkgs/mk-configure/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/mk-configure/template b/srcpkgs/mk-configure/template index b8320aa5129f98..1a46e170042d85 100644 --- a/srcpkgs/mk-configure/template +++ b/srcpkgs/mk-configure/template @@ -1,7 +1,7 @@ # Template file for 'mk-configure' pkgname=mk-configure version=0.39.3 -revision=1 +revision=2 build_style=gnu-makefile make_cmd=bmake make_install_args="MANDIR=/usr/share/man" From 27a171ff061beaad9241e6ab6137e217935397e3 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Fri, 14 Jun 2024 13:37:33 -0700 Subject: [PATCH 5/6] gcc-multilib: update to 14.1.0. --- srcpkgs/gcc-multilib/patches/fix-libiberty_pic.patch | 2 +- srcpkgs/gcc-multilib/template | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/srcpkgs/gcc-multilib/patches/fix-libiberty_pic.patch b/srcpkgs/gcc-multilib/patches/fix-libiberty_pic.patch index f43dd62f15d8d3..ad7173e5caaad9 100644 --- a/srcpkgs/gcc-multilib/patches/fix-libiberty_pic.patch +++ b/srcpkgs/gcc-multilib/patches/fix-libiberty_pic.patch @@ -8,5 +8,5 @@ - $(HDEFINES) @ac_libiberty_warn_cflags@ -D_GNU_SOURCE \ +COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) $(CPPFLAGS) -fPIC -I. -I$(INCDIR) \ + $(HDEFINES) @ac_libiberty_warn_cflags@ -D_DEFAULT_SOURCE \ - @CET_HOST_FLAGS@ + @CET_HOST_FLAGS@ @HWCAP_CFLAGS@ diff --git a/srcpkgs/gcc-multilib/template b/srcpkgs/gcc-multilib/template index 6af5541e1db5cd..b05b1c3c2d643b 100644 --- a/srcpkgs/gcc-multilib/template +++ b/srcpkgs/gcc-multilib/template @@ -3,7 +3,7 @@ archs="x86_64" _triplet="x86_64-unknown-linux-gnu" pkgname=gcc-multilib -version=13.2.0 +version=14.1.0 revision=1 _majorver="${version%.*}" short_desc="GNU Compiler Collection (multilib files)" @@ -11,7 +11,7 @@ maintainer="Orphaned " homepage="http://gcc.gnu.org" license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later" distfiles="${GNU_SITE}/gcc/gcc-${version}/gcc-${version}.tar.xz" -checksum=e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da +checksum=e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840 hostmakedepends="perl flex tar zip unzip" makedepends="zlib-devel libmpc-devel isl-devel libfl-devel @@ -69,6 +69,7 @@ do_configure() { do_build() { make ${makejobs} } + do_install() { local _pc_triplet=x86_64-pc-linux-gnu # Install to a tempdir and then only copy relevant files. From 1eb434d7ce33843bc4a614c7be72ca5bfeb08523 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Fri, 14 Jun 2024 13:42:23 -0700 Subject: [PATCH 6/6] libgccjit: update to 14.1.0. --- srcpkgs/libgccjit/template | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template index e130b534614960..4ec631f4e5e1ad 100644 --- a/srcpkgs/libgccjit/template +++ b/srcpkgs/libgccjit/template @@ -3,12 +3,12 @@ # which use the version number. pkgname=libgccjit -version=13.2.0 +version=14.1.0 revision=1 _gmp_version=6.3.0 -_mpfr_version=4.2.0 +_mpfr_version=4.2.1 _mpc_version=1.3.1 -_isl_version=0.24 +_isl_version=0.26 create_wrksrc=yes short_desc="Just-In-Time Compilation library for GCC" maintainer="Lane Biocini " @@ -21,11 +21,11 @@ distfiles=" ${GNU_SITE}/mpfr/mpfr-${_mpfr_version}.tar.xz ${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz ${SOURCEFORGE_SITE}/libisl/isl-${_isl_version}.tar.bz2" -checksum="e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da +checksum="e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840 a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898 - 06a378df13501248c1b2db5aa977a2c8126ae849a9d9b7be2546fb4a9c26d993 + 277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2 ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8 - fcf78dd9656c10eb8cf9fbd5f59a0b6b01386205fe1934b3b287a0a1898145c0" + 5eac8664e9d67be6bd0bee5085d6840b8baf738c06814df47eaf4166d9776436" nopie=yes lib32disabled=yes makedepends="zlib-devel"