From b2428f73e51856069901ff0792b625624db65db0 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Mon, 7 Aug 2023 03:19:31 -0700 Subject: [PATCH 1/6] binutils: update to 2.41. --- .../fix-libcollector-without-java.patch | 53 ------------------- srcpkgs/binutils/template | 6 +-- 2 files changed, 3 insertions(+), 56 deletions(-) delete mode 100644 srcpkgs/binutils/patches/fix-libcollector-without-java.patch diff --git a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch b/srcpkgs/binutils/patches/fix-libcollector-without-java.patch deleted file mode 100644 index 54384875f358f..0000000000000 --- a/srcpkgs/binutils/patches/fix-libcollector-without-java.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 49ddd814ac1071af7c4f45d5f8398b91862f2c7f Mon Sep 17 00:00:00 2001 -From: Vladimir Mezentsev -Date: Wed, 17 Aug 2022 19:55:23 -0700 -Subject: [PATCH] gprofng: fix bug 29479 Collection fails when built without - java support - -gprofng/ChangeLog -2022-08-17 Vladimir Mezentsev - - PR gprofng/29479 - * libcollector/collector.c: Add #if defined(GPROFNG_JAVA_PROFILING) for - java specific code. - * libcollector/unwind.c: Likewise. ---- - gprofng/libcollector/collector.c | 2 ++ - gprofng/libcollector/unwind.c | 2 ++ - 2 files changed, 4 insertions(+) - -diff --git a/gprofng/libcollector/collector.c b/gprofng/libcollector/collector.c -index 93c9d3330de5..ceff2c1caccb 100644 ---- a/gprofng/libcollector/collector.c -+++ b/gprofng/libcollector/collector.c -@@ -913,8 +913,10 @@ __collector_open_experiment (const char *exp, const char *params, sp_origin_t or - __collector_ext_unwind_key_init (1, NULL); - - /* start java attach if suitable */ -+#if defined(GPROFNG_JAVA_PROFILING) - if (exp_origin == SP_ORIGIN_DBX_ATTACH) - __collector_jprofile_start_attach (); -+#endif - start_sec_time = CALL_UTIL (time)(NULL); - __collector_start_time = collector_interface.getHiResTime (); - TprintfT (DBG_LT0, "\t__collector_open_experiment; resetting start_time\n"); -diff --git a/gprofng/libcollector/unwind.c b/gprofng/libcollector/unwind.c -index 119243788020..f8e11823c81e 100644 ---- a/gprofng/libcollector/unwind.c -+++ b/gprofng/libcollector/unwind.c -@@ -557,6 +557,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg) - int size = max_frame_size; - - #define MIN(a,b) ((a)<(b)?(a):(b)) -+#if defined(GPROFNG_JAVA_PROFILING) - /* get Java info */ - if (__collector_java_mode && __collector_java_asyncgetcalltrace_loaded && context && !pseudo_context) - { -@@ -569,6 +570,7 @@ __collector_get_frame_info (hrtime_t ts, int mode, void *arg) - size -= sz; - } - } -+#endif - - /* get native stack */ - if (context) diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template index 36b71c2b5e92c..cda87c11ab63e 100644 --- a/srcpkgs/binutils/template +++ b/srcpkgs/binutils/template @@ -1,7 +1,7 @@ # Template file for 'binutils' pkgname=binutils -version=2.39 -revision=3 +version=2.41 +revision=1 bootstrap=yes hostmakedepends="pkgconf" makedepends="zlib-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=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00 +checksum=ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450 build_options="all_targets" desc_option_all_targets="Enable all supported targets" From 2bfa4b9ae2fa44356cdab78ff57a98eeae111daf Mon Sep 17 00:00:00 2001 From: oreo639 Date: Mon, 7 Aug 2023 15:41:41 -0700 Subject: [PATCH 2/6] gcc: update to 13.2.0. --- common/build-style/python-module.sh | 96 +++++ .../environment/build-style/python-module.sh | 2 + common/shlibs | 7 +- srcpkgs/gcc/files/gccgo-musl.patch | 340 ++++++++++-------- srcpkgs/gcc/files/libssp-musl.patch | 28 -- ...-go-fix-build-error-with-SYS_SECCOMP.patch | 41 --- .../patches/consistent-library-paths.patch | 25 +- ...9de35fb1b293a4fd586574b1b4b73ddf7880.patch | 60 ++++ srcpkgs/gcc/patches/libatomic-autolink.patch | 56 ++- srcpkgs/gcc/template | 30 +- 10 files changed, 408 insertions(+), 277 deletions(-) create mode 100644 common/build-style/python-module.sh create mode 100644 common/environment/build-style/python-module.sh delete mode 100644 srcpkgs/gcc/patches/0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch create mode 100644 srcpkgs/gcc/patches/f4029de35fb1b293a4fd586574b1b4b73ddf7880.patch diff --git a/common/build-style/python-module.sh b/common/build-style/python-module.sh new file mode 100644 index 0000000000000..b80801a672472 --- /dev/null +++ b/common/build-style/python-module.sh @@ -0,0 +1,96 @@ +# +# This helper is for templates installing python modules. +# + +do_build() { + : ${python_versions:="2.7 $py3_ver"} + local pyver= tmp_cflags="$CFLAGS" tmp_ldflags="$LDFLAGS" + + for pyver in $python_versions; do + if [ -n "$CROSS_BUILD" ]; then + CFLAGS="$tmp_cflags" + LDFLAGS="$tmp_ldflags" + ADDENV= + + PYPREFIX="$XBPS_CROSS_BASE" + CFLAGS+=" -I${XBPS_CROSS_BASE}/include/python${pyver} -I${XBPS_CROSS_BASE}/usr/include" + LDFLAGS+=" -L${XBPS_CROSS_BASE}/lib/python${pyver} -L${XBPS_CROSS_BASE}/usr/lib" + CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS" + LDSHARED="${CC} -shared $LDFLAGS" + case $pyver in + 3.*) + for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do + f=${f##*/} + _PYTHON_SYSCONFIGDATA_NAME=${f%.py} + done + ADDENV+=" PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}" + ADDENV+=" _PYTHON_SYSCONFIGDATA_NAME="$_PYTHON_SYSCONFIGDATA_NAME"" + esac + env CC="$CC" LDSHARED="$LDSHARED" $ADDENV \ + PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" python${pyver} setup.py \ + build --build-base=build-${pyver} ${make_build_args} + else + python${pyver} setup.py build --build-base=build-${pyver} ${make_build_args} + fi + done +} + +do_check() { + : ${python_versions:="2.7 $py3_ver"} + + for pyver in $python_versions; do + ln -s build-${pyver} build + if [ -z "$make_check_target" ]; then + if ! python${pyver} setup.py --help test >/dev/null 2>&1; then + msg_warn "No command 'test' defined by setup.py for python${pyver}.\n" + rm build + return 0 + fi + fi + + ${make_check_pre} python${pyver} setup.py ${make_check_target:-test} ${make_check_args} + rm build + done +} + +do_install() { + : ${python_versions:="2.7 $py3_ver"} + local pyver= + + for pyver in $python_versions; do + if [ -n "$CROSS_BUILD" ]; then + ADDENV= + PYPREFIX="$XBPS_CROSS_BASE" + CFLAGS+=" -I${XBPS_CROSS_BASE}/include/python${pyver} -I${XBPS_CROSS_BASE}/usr/include" + LDFLAGS+=" -L${XBPS_CROSS_BASE}/lib/python${pyver} -L${XBPS_CROSS_BASE}/usr/lib" + CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS" + LDSHARED="${CC} -shared $LDFLAGS" + case $pyver in + 3.*) + for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do + f=${f##*/} + _PYTHON_SYSCONFIGDATA_NAME=${f%.py} + done + ADDENV+=" PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}" + ADDENV+=" _PYTHON_SYSCONFIGDATA_NAME="$_PYTHON_SYSCONFIGDATA_NAME"" + esac + env CC="$CC" LDSHARED="$LDSHARED" $ADDENV \ + PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" python${pyver} setup.py \ + build --build-base=build-${pyver} \ + install --prefix=/usr --root=${DESTDIR} ${make_install_args} + else + python${pyver} setup.py build --build-base=build-${pyver} \ + install --prefix=/usr --root=${DESTDIR} ${make_install_args} + fi + + # Rename unversioned scripts to avoid name conflicts. + if [ -d ${DESTDIR}/usr/bin ]; then + find ${DESTDIR}/usr/bin -type f ! -name "*[[:digit:]]" | while IFS= read -r f _; do + mv "${f}" "${f}${pyver%.*}" + echo "[python-module] Unversioned script renamed to '${f#$DESTDIR}${pyver%.*}'" + done + fi + done +} diff --git a/common/environment/build-style/python-module.sh b/common/environment/build-style/python-module.sh new file mode 100644 index 0000000000000..d6b6502e44fd2 --- /dev/null +++ b/common/environment/build-style/python-module.sh @@ -0,0 +1,2 @@ +lib32disabled=yes +makedepends+=" python python3" diff --git a/common/shlibs b/common/shlibs index 6463e020bb473..9efb30f8064bc 100644 --- a/common/shlibs +++ b/common/shlibs @@ -61,7 +61,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.21 libgo-12.2.0_1 +libgo.so.22 libgo-13.2.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 @@ -853,8 +853,8 @@ libgdkmm-2.4.so.1 gtkmm2-2.24.0_1 libgtkmm-2.4.so.1 gtkmm2-2.24.0_1 libquadmath.so.0 libquadmath-4.4.0_1 libgfortran.so.5 libgfortran-8.2.0_1 -libgnarl-12.so libada-12.2.0_1 -libgnat-12.so libada-12.2.0_1 +libgnarl-13.so libada-13.2.0_1 +libgnat-13.so libada-13.2.0_1 libsharpyuv.so.0 libsharpyuv-1.3.0_1 libwebp.so.7 libwebp-0.6.0_1 libwebpmux.so.3 libwebp-0.6.0_1 @@ -1686,6 +1686,7 @@ libubsan.so.1 libsanitizer-8.2.0_1 libtsan.so.2 libsanitizer-12.2.0_1 libasan.so.8 libsanitizer-12.2.0_1 liblsan.so.0 libsanitizer-6.3.0_1 +libhwasan.so.0 libsanitizer-13.2.0_1 libvtv.so.0 libvtv-6.3.0_1 libatomic.so.1 libatomic-4.9.0_1 libpcsclite.so.1 libpcsclite-1.8.11_1 diff --git a/srcpkgs/gcc/files/gccgo-musl.patch b/srcpkgs/gcc/files/gccgo-musl.patch index 12ec68dd8aa30..b2ccebbed7893 100644 --- a/srcpkgs/gcc/files/gccgo-musl.patch +++ b/srcpkgs/gcc/files/gccgo-musl.patch @@ -1,173 +1,199 @@ This is not among the normal patches as these changes are musl specific and there is no way to easily conditionalize it in source for some of the changes. -Added by q66: runtime.h now uses libucontext_ prefixed APIs to allow build -with freestanding versions of libucontext - Souurce: Adélie Linux, q66 URL: https://code.foxkit.us/adelie/packages/tree/master/system/gcc ---- a/Makefile.in -+++ b/Makefile.in -@@ -46325,7 +46325,7 @@ configure-target-libgo: - esac; \ - module_srcdir=libgo; \ - rm -f no-such-file || : ; \ -- CONFIG_SITE=no-such-file $(SHELL) \ -+ CONFIG_SITE=no-such-file LIBS="-lucontext $$LIBS" $(SHELL) \ - $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ ---- a/libgo/mksysinfo.sh -+++ b/libgo/mksysinfo.sh -@@ -379,11 +379,7 @@ fi - # Some basic types. - echo 'type Size_t _size_t' >> ${OUT} - echo "type Ssize_t _ssize_t" >> ${OUT} --if grep '^const _HAVE_OFF64_T = ' gen-sysinfo.go > /dev/null 2>&1; then -- echo "type Offset_t _off64_t" >> ${OUT} --else -- echo "type Offset_t _off_t" >> ${OUT} --fi -+echo "type Offset_t _off_t" >> ${OUT} - echo "type Mode_t _mode_t" >> ${OUT} - echo "type Pid_t _pid_t" >> ${OUT} - echo "type Uid_t _uid_t" >> ${OUT} ---- a/libgo/go/runtime/mem_gccgo.go -+++ b/libgo/go/runtime/mem_gccgo.go -@@ -16,7 +16,7 @@ import ( - //go:linkname sysFree runtime.sysFree - - //extern mmap --func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) unsafe.Pointer -+func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) unsafe.Pointer - - //extern munmap - func munmap(addr unsafe.Pointer, length uintptr) int32 -@@ -38,7 +38,7 @@ func init() { - } - } +From 4bfcb35bc43d3e3b7510620362d7c28d9e4c17ca Mon Sep 17 00:00:00 2001 +From: psykose +Date: Mon, 10 Jul 2023 23:23:29 +0000 +Subject: [PATCH 34/35] libgo: fix lfs64 use + +--- + .../go/internal/syscall/unix/at_largefile.go | 2 +- + libgo/go/os/dir_largefile.go | 2 +- + libgo/go/syscall/libcall_glibc.go | 2 +- + libgo/go/syscall/libcall_linux.go | 4 +-- + libgo/go/syscall/libcall_posix_largefile.go | 26 +++++++++---------- + libgo/runtime/go-varargs.c | 2 +- + libgo/sysinfo.c | 9 +++---- + 7 files changed, 22 insertions(+), 25 deletions(-) + +diff --git a/libgo/go/internal/syscall/unix/at_largefile.go b/libgo/go/internal/syscall/unix/at_largefile.go +index 82e0dcfd074..16151ecad1b 100644 +--- a/libgo/go/internal/syscall/unix/at_largefile.go ++++ b/libgo/go/internal/syscall/unix/at_largefile.go +@@ -10,5 +10,5 @@ import ( + "syscall" + ) --func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (unsafe.Pointer, int) { -+func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) (unsafe.Pointer, int) { - p := sysMmap(addr, n, prot, flags, fd, off) - if uintptr(p) == _MAP_FAILED { - return nil, errno() ---- 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. +-//extern fstatat64 ++//extern fstatat + func fstatat(int32, *byte, *syscall.Stat_t, int32) int32 +diff --git a/libgo/go/os/dir_largefile.go b/libgo/go/os/dir_largefile.go +index 1fc5ee0771f..0c6dffe1a75 100644 +--- a/libgo/go/os/dir_largefile.go ++++ b/libgo/go/os/dir_largefile.go +@@ -11,5 +11,5 @@ package os - // +build !hurd --// +build !linux + import "syscall" - package syscall +-//extern readdir64 ++//extern readdir + func libc_readdir(*syscall.DIR) *syscall.Dirent +diff --git a/libgo/go/syscall/libcall_glibc.go b/libgo/go/syscall/libcall_glibc.go +index 5c1ec483c75..5a1245ed44b 100644 +--- a/libgo/go/syscall/libcall_glibc.go ++++ b/libgo/go/syscall/libcall_glibc.go +@@ -114,7 +114,7 @@ func Pipe2(p []int, flags int) (err error) { + } ---- a/libgo/go/syscall/errstr_glibc.go -+++ /dev/null -@@ -1,33 +0,0 @@ --// errstr_glibc.go -- GNU/Linux and GNU/Hurd specific error strings. -- --// Copyright 2010 The Go Authors. All rights reserved. --// Use of this source code is governed by a BSD-style --// license that can be found in the LICENSE file. -- --// We use this rather than errstr.go because on GNU/Linux sterror_r --// returns a pointer to the error message, and may not use buf at all. -- --// +build hurd linux -- --package syscall -- --import "unsafe" -- --//sysnb strerror_r(errnum int, b []byte) (errstr *byte) --//strerror_r(errnum _C_int, b *byte, len Size_t) *byte -- --func Errstr(errnum int) string { -- a := make([]byte, 128) -- p := strerror_r(errnum, a) -- b := (*[1000]byte)(unsafe.Pointer(p)) -- i := 0 -- for b[i] != 0 { -- i++ -- } -- // Lowercase first letter: Bad -> bad, but STREAM -> STREAM. -- if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' { -- c := b[0] + 'a' - 'A' -- return string(c) + string(b[1:i]) -- } -- return string(b[:i]) --} + //sys sendfile(outfd int, infd int, offset *Offset_t, count int) (written int, err error) +-//sendfile64(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t ++//sendfile(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t + + func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + if race.Enabled { +diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go +index 03ca7261b59..ad21fd0b3ac 100644 --- a/libgo/go/syscall/libcall_linux.go +++ b/libgo/go/syscall/libcall_linux.go -@@ -206,19 +206,19 @@ func Gettid() (tid int) { - //sys Setxattr(path string, attr string, data []byte, flags int) (err error) - //setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int - --//sys splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags int) (n int64, err error) --//splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t, flags _C_uint) Ssize_t -+//sys splice(rfd int, roff *_off_t, wfd int, woff *_off_t, len int, flags int) (n int64, err error) -+//splice(rfd _C_int, roff *_off_t, wfd _C_int, woff *_off_t, len Size_t, flags _C_uint) Ssize_t - func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { -- var lroff _loff_t -- var plroff *_loff_t -+ var lroff _off_t -+ var plroff *_off_t - if roff != nil { -- lroff = _loff_t(*roff) -+ lroff = _off_t(*roff) - plroff = &lroff - } -- var lwoff _loff_t -- var plwoff *_loff_t -+ var lwoff _off_t -+ var plwoff *_off_t - if woff != nil { -- lwoff = _loff_t(*woff) -+ lwoff = _off_t(*woff) - plwoff = &lwoff - } - n, err = splice(rfd, plroff, wfd, plwoff, len, flags) ---- a/libgo/runtime/runtime.h -+++ b/libgo/runtime/runtime.h -@@ -500,10 +500,13 @@ int __go_setcontext(__go_context_t*); - void __go_makecontext(__go_context_t*, void (*)(), void*, size_t); - #else - #define __go_context_t ucontext_t --#define __go_getcontext(c) getcontext(c) --#define __go_setcontext(c) setcontext(c) -+int libucontext_getcontext(__go_context_t *); -+void libucontext_makecontext(__go_context_t *, void (*)(), int, ...); -+int libucontext_setcontext(const __go_context_t *); -+#define __go_getcontext(c) libucontext_getcontext(c) -+#define __go_setcontext(c) libucontext_setcontext(c) - #define __go_makecontext(c, fn, sp, size) \ -- ((c)->uc_stack.ss_sp = sp, (c)->uc_stack.ss_size = size, makecontext(c, fn, 0)) -+ ((c)->uc_stack.ss_sp = sp, (c)->uc_stack.ss_size = size, libucontext_makecontext(c, fn, 0)) - #endif +@@ -158,7 +158,7 @@ func Reboot(cmd int) (err error) { + //adjtimex(buf *Timex) _C_int + + //sys Fstatfs(fd int, buf *Statfs_t) (err error) +-//fstatfs64(fd _C_int, buf *Statfs_t) _C_int ++//fstatfs(fd _C_int, buf *Statfs_t) _C_int + + func Gettid() (tid int) { + r1, _, _ := Syscall(SYS_GETTID, 0, 0, 0) +@@ -245,7 +245,7 @@ func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n i + } + + //sys Statfs(path string, buf *Statfs_t) (err error) +-//statfs64(path *byte, buf *Statfs_t) _C_int ++//statfs(path *byte, buf *Statfs_t) _C_int + + //sysnb Sysinfo(info *Sysinfo_t) (err error) + //sysinfo(info *Sysinfo_t) _C_int +diff --git a/libgo/go/syscall/libcall_posix_largefile.go b/libgo/go/syscall/libcall_posix_largefile.go +index f90055bb29a..334212f0af1 100644 +--- a/libgo/go/syscall/libcall_posix_largefile.go ++++ b/libgo/go/syscall/libcall_posix_largefile.go +@@ -10,40 +10,40 @@ + package syscall + + //sys Creat(path string, mode uint32) (fd int, err error) +-//creat64(path *byte, mode Mode_t) _C_int ++//creat(path *byte, mode Mode_t) _C_int + + //sys Fstat(fd int, stat *Stat_t) (err error) +-//fstat64(fd _C_int, stat *Stat_t) _C_int ++//fstat(fd _C_int, stat *Stat_t) _C_int + + //sys Ftruncate(fd int, length int64) (err error) +-//ftruncate64(fd _C_int, length Offset_t) _C_int ++//ftruncate(fd _C_int, length Offset_t) _C_int + + //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) +-//getrlimit64(resource _C_int, rlim *Rlimit) _C_int ++//getrlimit(resource _C_int, rlim *Rlimit) _C_int + + //sys Lstat(path string, stat *Stat_t) (err error) +-//lstat64(path *byte, stat *Stat_t) _C_int ++//lstat(path *byte, stat *Stat_t) _C_int + + //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) +-//mmap64(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte ++//mmap(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte - // Symbols defined by the linker. + //sys Open(path string, mode int, perm uint32) (fd int, err error) +-//__go_open64(path *byte, mode _C_int, perm Mode_t) _C_int ++//__go_open(path *byte, mode _C_int, perm Mode_t) _C_int + + //sys Pread(fd int, p []byte, offset int64) (n int, err error) +-//pread64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t ++//pread(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t + + //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +-//pwrite64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t ++//pwrite(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t + + //sys Seek(fd int, offset int64, whence int) (off int64, err error) +-//lseek64(fd _C_int, offset Offset_t, whence _C_int) Offset_t ++//lseek(fd _C_int, offset Offset_t, whence _C_int) Offset_t + + //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) +-//setrlimit64(resource int, rlim *Rlimit) _C_int ++//setrlimit(resource int, rlim *Rlimit) _C_int + + //sys Stat(path string, stat *Stat_t) (err error) +-//stat64(path *byte, stat *Stat_t) _C_int ++//stat(path *byte, stat *Stat_t) _C_int + + //sys Truncate(path string, length int64) (err error) +-//truncate64(path *byte, length Offset_t) _C_int ++//truncate(path *byte, length Offset_t) _C_int +diff --git a/libgo/runtime/go-varargs.c b/libgo/runtime/go-varargs.c +index f84860891e6..7efc9615985 100644 +--- a/libgo/runtime/go-varargs.c ++++ b/libgo/runtime/go-varargs.c +@@ -84,7 +84,7 @@ __go_ioctl_ptr (int d, int request, void *arg) + int + __go_open64 (char *path, int mode, mode_t perm) + { +- return open64 (path, mode, perm); ++ return open (path, mode, perm); + } + + #endif +diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c +index 180f5c31d74..1d717d55c0e 100644 --- a/libgo/sysinfo.c +++ b/libgo/sysinfo.c -@@ -73,9 +73,6 @@ - #include - #include - #include --#if defined(HAVE_SYS_USER_H) --#include --#endif - #if defined(HAVE_SYS_UTSNAME_H) - #include +@@ -366,7 +366,7 @@ typedef loff_t libgo_loff_t_type; + #endif + + #if defined(HAVE_OFF64_T) +-typedef off64_t libgo_off_t_type; ++typedef off_t libgo_off_t_type; + #else + typedef off_t libgo_off_t_type; #endif ---- a/libgo/go/runtime/os_linux.go -+++ b/libgo/go/runtime/os_linux.go -@@ -365,7 +365,7 @@ func setThreadCPUProfiler(hz int32) { - var sevp _sigevent - sevp.sigev_notify = _SIGEV_THREAD_ID - sevp.sigev_signo = _SIGPROF -- *((*int32)(unsafe.Pointer(&sevp._sigev_un))) = int32(mp.procid) -+ *((*int32)(unsafe.Pointer(&sevp.__sev_fields))) = int32(mp.procid) - ret := timer_create(_CLOCK_THREAD_CPUTIME_ID, &sevp, &timerid) - if ret != 0 { - // If we cannot create a timer for this M, leave profileTimerValid false +@@ -398,13 +398,11 @@ typedef off_t libgo_off_t_type; + + // From dirent.h + SREF(dirent); +-SREF(dirent64); + OTREF(DIR); + EREF(DT_UNKNOWN); + + // From fcntl.h + SREF(flock); +-SREF(flock64); + + // From ffi headers + SREF(_ffi_type); +@@ -485,11 +483,10 @@ EREF(SS_ONSTACK); + EREF(SEGV_MAPERR); + + // From stat.h +-SREF(stat64); ++SREF(stat); + + // From statfs.h + SREF(statfs); +-SREF(statfs64); + + // From sysinfo.h + SREF(sysinfo); +@@ -519,7 +516,7 @@ EREF(PTRACE_PEEKTEXT); + + // From sys/resource.h + SREF(rusage); +-SREF(rlimit64); ++SREF(rlimit); + EREF(RLIMIT_NOFILE); + EREF(PRIO_USER); + EREF(RUSAGE_SELF); + diff --git a/srcpkgs/gcc/files/libssp-musl.patch b/srcpkgs/gcc/files/libssp-musl.patch index 99f248401a1cc..8da164bf8276b 100644 --- a/srcpkgs/gcc/files/libssp-musl.patch +++ b/srcpkgs/gcc/files/libssp-musl.patch @@ -1,7 +1,5 @@ First part taken from Alpine. -Second part added to prevent gccgo from thinking it can -fsplit-stack on musl. - --- a/gcc/gcc.cc +++ b/gcc/gcc.cc @@ -984,10 +984,15 @@ proper position among the other output f @@ -42,29 +40,3 @@ Second part added to prevent gccgo from thinking it can -fsplit-stack on musl. The lower bound for a buffer to be considered for stack smashing protection. -param=stack-clash-protection-guard-size= ---- a/gcc/config/i386/gnu-user-common.h -+++ b/gcc/config/i386/gnu-user-common.h -@@ -64,9 +64,3 @@ along with GCC; see the file COPYING3. If not see - - /* Static stack checking is supported by means of probes. */ - #define STACK_CHECK_STATIC_BUILTIN 1 -- --/* We only build the -fsplit-stack support in libgcc if the -- assembler has full support for the CFI directives. */ --#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE --#define TARGET_CAN_SPLIT_STACK --#endif ---- a/gcc/config/i386/gnu.h -+++ b/gcc/config/i386/gnu.h -@@ -40,11 +40,6 @@ along with GCC. If not, see . - /* i386 glibc provides __stack_chk_guard in %gs:0x14. */ - #define TARGET_THREAD_SSP_OFFSET 0x14 - --/* We only build the -fsplit-stack support in libgcc if the -- assembler has full support for the CFI directives. */ --#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE --#define TARGET_CAN_SPLIT_STACK --#endif - /* We steal the last transactional memory word. */ - #define TARGET_THREAD_SPLIT_STACK_OFFSET 0x30 - #endif diff --git a/srcpkgs/gcc/patches/0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch b/srcpkgs/gcc/patches/0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch deleted file mode 100644 index db38df3b010ab..0000000000000 --- a/srcpkgs/gcc/patches/0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 548720bca6bff21ebc9aba22249d9ce45bbd90c7 Mon Sep 17 00:00:00 2001 -From: Ian Lance Taylor -Date: Wed, 29 Jun 2022 15:32:04 -0700 -Subject: [PATCH] libgo: handle stat st_atim32 field and SYS_SECCOMP -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Patches for musl support, from Sören Tempel. - -Fixes https://gcc.gnu.org/PR105225 - -Change-Id: If396877d4a4c7d27962226d7a6e3bb91b1344413 -Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/415294 -Reviewed-by: Than McIntosh -Reviewed-by: Ian Lance Taylor ---- - libgo/mksysinfo.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh -index 5aa30915..ea1fa17d 100755 ---- a/libgo/mksysinfo.sh -+++ b/libgo/mksysinfo.sh -@@ -127,6 +127,7 @@ fi - - # The syscall numbers. We force the names to upper case. - grep '^const _SYS_' gen-sysinfo.go | \ -+ grep -v '^const _SYS_SECCOMP = ' | \ - sed -e 's/const _\(SYS_[^= ]*\).*$/\1/' | \ - while read sys; do - sup=`echo $sys | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` -@@ -506,7 +507,7 @@ fi - - # For historical reasons Go uses the suffix "timespec" instead of "tim" for - # stat_t's time fields on NetBSD. --st_times='-e s/st_atim/Atim/ -e s/st_mtim/Mtim/ -e s/st_ctim/Ctim/' -+st_times='-e s/st_atim/Atim/g -e s/st_mtim/Mtim/g -e s/st_ctim/Ctim/g' - if test "${GOOS}" = "netbsd"; then - st_times='-e s/st_atim/Atimespec/ -e s/st_mtim/Mtimespec/ -e s/st_ctim/Ctimespec/' - fi diff --git a/srcpkgs/gcc/patches/consistent-library-paths.patch b/srcpkgs/gcc/patches/consistent-library-paths.patch index 333dc53a4eca3..d421fbd9607d5 100644 --- a/srcpkgs/gcc/patches/consistent-library-paths.patch +++ b/srcpkgs/gcc/patches/consistent-library-paths.patch @@ -28,13 +28,34 @@ When adding a new platform, fix this up too. MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) --- a/gcc/config/mips/t-linux64 +++ b/gcc/config/mips/t-linux64 -@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64 +@@ -20,26 +20,7 @@ MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi + MULTILIB_DIRNAMES = n32 32 64 MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el) MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) - MULTILIB_OSDIRNAMES = \ +-ifeq (yes,$(enable_multiarch)) +- ifneq (,$(findstring gnuabi64,$(target))) +- MULTILIB_OSDIRNAMES = \ +- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ +- ../libo32$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ +- ../lib$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) +- else ifneq (,$(findstring gnuabin32,$(target))) +- MULTILIB_OSDIRNAMES = \ +- ../lib$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ +- ../libo32$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ +- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) +- else +- MULTILIB_OSDIRNAMES = \ +- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ +- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ +- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) +- endif +-else +- MULTILIB_OSDIRNAMES = \ - ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ - ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ - ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) +-endif ++MULTILIB_OSDIRNAMES = \ + ../lib32 \ + ../lib \ + ../lib64 diff --git a/srcpkgs/gcc/patches/f4029de35fb1b293a4fd586574b1b4b73ddf7880.patch b/srcpkgs/gcc/patches/f4029de35fb1b293a4fd586574b1b4b73ddf7880.patch new file mode 100644 index 0000000000000..7338b3dd1ede3 --- /dev/null +++ b/srcpkgs/gcc/patches/f4029de35fb1b293a4fd586574b1b4b73ddf7880.patch @@ -0,0 +1,60 @@ +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/libatomic-autolink.patch b/srcpkgs/gcc/patches/libatomic-autolink.patch index 20cdc42308dc5..e703b02cd786b 100644 --- a/srcpkgs/gcc/patches/libatomic-autolink.patch +++ b/srcpkgs/gcc/patches/libatomic-autolink.patch @@ -2,10 +2,10 @@ Add --enable-autolink-libatomic, to make gcc link -latomic by default. Taken from Alpine: https://git.alpinelinux.org/aports/tree/main/gcc/0035-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch -From 573a66e4146c9a65d895af9081a4d3d49cfc9e7a Mon Sep 17 00:00:00 2001 +From 7b50823d8a4131e5a55d2499a0f5a52b3d91eed2 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 +Date: Wed, 9 Dec 2020 07:42:06 +0000 +Subject: [PATCH 27/35] configure: Add --enable-autolink-libatomic, use in LINK_GCC_C_SEQUENCE_SPEC [PR81358] This fixes issues with RISC-V. @@ -13,19 +13,19 @@ This fixes issues with RISC-V. Makefile.in | 1 + gcc/config.in | 6 ++++++ gcc/config/gnu-user.h | 12 +++++++++++- - gcc/configure | 32 ++++++++++++++++++++++++++++++-- - gcc/configure.ac | 22 +++++++++++++++++++++- + gcc/configure | 31 ++++++++++++++++++++++++++++++- + gcc/configure.ac | 21 +++++++++++++++++++++ gcc/doc/install.texi | 8 ++++++++ gcc/doc/tm.texi | 8 +++++++- gcc/doc/tm.texi.in | 8 +++++++- gcc/gcc.cc | 12 +++++++++++- - 9 files changed, 102 insertions(+), 7 deletions(-) + 9 files changed, 102 insertions(+), 5 deletions(-) diff --git a/Makefile.in b/Makefile.in -index b564ddbf792..a95c7407d16 100644 +index 6ff2b3f9925..394b105b271 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -232,6 +232,7 @@ HOST_EXPORTS = \ +@@ -235,6 +235,7 @@ HOST_EXPORTS = \ RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \ READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ @@ -34,7 +34,7 @@ index b564ddbf792..a95c7407d16 100644 GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \ GMPINC="$(HOST_GMPINC)"; export GMPINC; \ diff --git a/gcc/config.in b/gcc/config.in -index f0fbf123aa8..af84efc4f9e 100644 +index 0679fbbf4c6..ee81139b385 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -118,6 +118,12 @@ @@ -51,7 +51,7 @@ index f0fbf123aa8..af84efc4f9e 100644 format instead of DPD */ #ifndef USED_FOR_TARGET diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h -index 8433e56c3e1..0347f10da8b 100644 +index b26b17f2f2a..3f64ea46180 100644 --- a/gcc/config/gnu-user.h +++ b/gcc/config/gnu-user.h @@ -109,8 +109,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see @@ -75,10 +75,10 @@ index 8433e56c3e1..0347f10da8b 100644 #undef LINK_GCC_C_SEQUENCE_SPEC diff --git a/gcc/configure b/gcc/configure -index 2f6b3265a6c..6dc65bf4ccb 100755 +index e59cbee1767..787c35d4e25 100755 --- a/gcc/configure +++ b/gcc/configure -@@ -981,6 +981,7 @@ with_changes_root_url +@@ -984,6 +984,7 @@ with_changes_root_url enable_languages with_multilib_list with_multilib_generator @@ -86,7 +86,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755 with_zstd with_zstd_include with_zstd_lib -@@ -1710,6 +1711,9 @@ Optional Features: +@@ -1713,6 +1714,9 @@ Optional Features: --disable-shared don't provide a shared libgcc --disable-gcov don't provide libgcov and related host tools --enable-languages=LIST specify which front-ends to build @@ -96,7 +96,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755 --disable-rpath do not hardcode runtime library paths --enable-sjlj-exceptions arrange to use setjmp/longjmp exception handling -@@ -8324,7 +8328,6 @@ else +@@ -8329,7 +8333,6 @@ else fi @@ -104,7 +104,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755 # Check whether --with-multilib-generator was given. if test "${with_multilib_generator+set}" = set; then : withval=$with_multilib_generator; : -@@ -8332,6 +8335,32 @@ else +@@ -8337,6 +8340,32 @@ else with_multilib_generator=default fi @@ -137,16 +137,11 @@ index 2f6b3265a6c..6dc65bf4ccb 100755 # ------------------------- # Checks for other programs -@@ -34296,4 +34325,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} - fi - -- diff --git a/gcc/configure.ac b/gcc/configure.ac -index e683d3a7a5f..07c81c78336 100644 +index 57268319de1..56bcaa87620 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac -@@ -1205,6 +1205,27 @@ AC_ARG_WITH(multilib-generator, +@@ -1199,6 +1199,27 @@ AC_ARG_WITH(multilib-generator, :, with_multilib_generator=default) @@ -174,16 +169,11 @@ index e683d3a7a5f..07c81c78336 100644 # ------------------------- # Checks for other programs # ------------------------- -@@ -7839,4 +7860,3 @@ done - ], - [subdirs='$subdirs']) - AC_OUTPUT -- diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi -index 48408d842db..c90be0ee750 100644 +index b30d3691fe6..ccc8e5dbb00 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi -@@ -2295,6 +2295,14 @@ files, but these changed header paths may conflict with some compilation +@@ -2377,6 +2377,14 @@ files, but these changed header paths may conflict with some compilation environments. Enabled by default, and may be disabled using @option{--disable-canonical-system-headers}. @@ -199,7 +189,7 @@ index 48408d842db..c90be0ee750 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 c5006afc00d..56b62c69ae8 100644 +index a660e33739b..6183c407a2b 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. @@ -218,7 +208,7 @@ index c5006afc00d..56b62c69ae8 100644 @defmac POST_LINK_SPEC diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in -index f869ddd5e5b..57c93f24ac3 100644 +index f7ab5d48a63..281540aba68 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. @@ -237,10 +227,10 @@ index f869ddd5e5b..57c93f24ac3 100644 @defmac POST_LINK_SPEC diff --git a/gcc/gcc.cc b/gcc/gcc.cc -index 735b2b1bba1..f10f3c91aa7 100644 +index 59390fd39d6..dae1dd4cf79 100644 --- a/gcc/gcc.cc +++ b/gcc/gcc.cc -@@ -987,13 +987,23 @@ proper position among the other output files. */ +@@ -974,13 +974,23 @@ proper position among the other output files. */ # define ASM_DEBUG_OPTION_SPEC "" #endif diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template index 34a3fa62d31b5..8083027f511bf 100644 --- a/srcpkgs/gcc/template +++ b/srcpkgs/gcc/template @@ -3,14 +3,14 @@ # which use the version number. pkgname=gcc -version=12.2.0 -revision=3 +version=13.2.0 +revision=1 _minorver="${version%.*}" _majorver="${_minorver%.*}" -_gmp_version=6.2.1 -_mpfr_version=4.1.0 -_mpc_version=1.2.1 -_isl_version=0.24 +_gmp_version=6.3.0 +_mpfr_version=4.2.1 +_mpc_version=1.3.1 +_isl_version=0.26 create_wrksrc=yes short_desc="GNU Compiler Collection" maintainer="Enno Boland " @@ -19,15 +19,15 @@ license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later" # *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz distfiles=" ${GNU_SITE}/gcc/gcc-${version}/gcc-${version}.tar.xz - https://gmplib.org/download/gmp/gmp-${_gmp_version}.tar.xz + ${GNU_SITE}/download/gmp/gmp-${_gmp_version}.tar.xz ${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="e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff - fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2 - 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f - 17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459 - fcf78dd9656c10eb8cf9fbd5f59a0b6b01386205fe1934b3b287a0a1898145c0" +checksum="e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da + a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898 + 277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2 + ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8 + 5eac8664e9d67be6bd0bee5085d6840b8baf738c06814df47eaf4166d9776436" nopie=yes lib32disabled=yes @@ -187,8 +187,12 @@ pre_configure() { # Do not run fixincludes sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in + # Do not enable C++17, gcc compiles with -std=c++11 + sed -i 's/HAVE_CXX17=1/HAVE_CXX17=0/' isl/configure + if [ "$XBPS_TARGET_LIBC" = musl ]; then for p in ${FILESDIR}/*-musl.patch; do + msg_normal "patching: $p\n" patch -p1 -i $p done fi @@ -675,7 +679,7 @@ libsanitizer-devel_package() { pkg_install() { vmove "usr/lib/lib*san*.so" vmove "usr/lib/lib*san*.a" - vmove usr/lib/libasan_preinit.o + vmove usr/lib/lib*san_preinit.o vmove usr/lib/libsanitizer.spec } } From feb56aa2888eba3b37d4a40bbcbc9acf594c252c Mon Sep 17 00:00:00 2001 From: oreo639 Date: Mon, 7 Aug 2023 15:43:14 -0700 Subject: [PATCH 3/6] libtool: rebuild for gcc 13 --- srcpkgs/libtool/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/libtool/template b/srcpkgs/libtool/template index 4eea61b17c49b..b112680fe864a 100644 --- a/srcpkgs/libtool/template +++ b/srcpkgs/libtool/template @@ -1,7 +1,7 @@ # Template file for 'libtool' pkgname=libtool version=2.4.7 -revision=4 +revision=5 build_style=gnu-configure hostmakedepends="texinfo perl automake help2man xz gnulib tar" depends="tar sed grep" From a3035d42a15d9c965deb395f87bd1b113664959b Mon Sep 17 00:00:00 2001 From: oreo639 Date: Mon, 7 Aug 2023 15:44:09 -0700 Subject: [PATCH 4/6] mk-configure: rebuild for gcc 13 --- 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 fdcac6ca74b8c..a267afce83e46 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.38.2 -revision=1 +revision=2 build_style=gnu-makefile make_cmd=bmake make_install_args="MANDIR=/usr/share/man" From d804a79932a60f5e7ceea69d24009779277ba6ad Mon Sep 17 00:00:00 2001 From: oreo639 Date: Mon, 7 Aug 2023 17:31:30 -0700 Subject: [PATCH 5/6] libgccjit: update to 13.2.0. --- srcpkgs/libgccjit/template | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template index fde1affd54b7c..e130b53461496 100644 --- a/srcpkgs/libgccjit/template +++ b/srcpkgs/libgccjit/template @@ -3,11 +3,11 @@ # which use the version number. pkgname=libgccjit -version=12.2.0 +version=13.2.0 revision=1 -_gmp_version=6.2.1 -_mpfr_version=4.1.0 -_mpc_version=1.2.1 +_gmp_version=6.3.0 +_mpfr_version=4.2.0 +_mpc_version=1.3.1 _isl_version=0.24 create_wrksrc=yes short_desc="Just-In-Time Compilation library for GCC" @@ -21,10 +21,10 @@ 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="e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff - fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2 - 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f - 17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459 +checksum="e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da + a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898 + 06a378df13501248c1b2db5aa977a2c8126ae849a9d9b7be2546fb4a9c26d993 + ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8 fcf78dd9656c10eb8cf9fbd5f59a0b6b01386205fe1934b3b287a0a1898145c0" nopie=yes lib32disabled=yes From dc434dfb6f6ffbb305ae2beff0501e8e2e7e01bf Mon Sep 17 00:00:00 2001 From: oreo639 Date: Mon, 7 Aug 2023 17:41:42 -0700 Subject: [PATCH 6/6] gcc-multilib: update to 13.2.0. --- srcpkgs/gcc-multilib/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/gcc-multilib/template b/srcpkgs/gcc-multilib/template index 4ae0dadb7c6d9..80750e17c742d 100644 --- a/srcpkgs/gcc-multilib/template +++ b/srcpkgs/gcc-multilib/template @@ -3,15 +3,15 @@ archs="x86_64" _triplet="x86_64-unknown-linux-gnu" pkgname=gcc-multilib -version=12.2.0 -revision=2 +version=13.2.0 +revision=1 _majorver="${version%.*}" short_desc="GNU Compiler Collection (multilib files)" 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=e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff +checksum=e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da hostmakedepends="perl flex tar zip unzip" makedepends="zlib-devel libmpc-devel isl15-devel libfl-devel