diff options
author | psykose <alice@ayaya.dev> | 2023-07-10 23:23:43 +0000 |
---|---|---|
committer | psykose <alice@ayaya.dev> | 2023-07-11 01:23:44 +0200 |
commit | c5b47d590f87a6ccddd432dfbf0eb51a407713c9 (patch) | |
tree | 7a60e03f16e71b6eb785b72b2c11967e4930ae60 | |
parent | 058b2f7671bba1ef9dbb271931504f55e0a75643 (diff) | |
download | aports-c5b47d590f87a6ccddd432dfbf0eb51a407713c9.zip |
main/gcc: fix go lfs64 use entirely
-rw-r--r-- | main/gcc/0034-libgo-fix-lfs64-use.patch | 195 | ||||
-rw-r--r-- | main/gcc/0034-libgo-forcefully-use-off_t.patch | 25 | ||||
-rw-r--r-- | main/gcc/APKBUILD | 4 |
3 files changed, 197 insertions, 27 deletions
diff --git a/main/gcc/0034-libgo-fix-lfs64-use.patch b/main/gcc/0034-libgo-fix-lfs64-use.patch new file mode 100644 index 00000000000..6a1819d6072 --- /dev/null +++ b/main/gcc/0034-libgo-fix-lfs64-use.patch @@ -0,0 +1,195 @@ +From 8f33ba8500c9d013718a90230d145e16c279df8b Mon Sep 17 00:00:00 2001 +From: psykose <alice@ayaya.dev> +Date: Mon, 10 Jul 2023 23:23:29 +0000 +Subject: [PATCH 34/34] 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" + ) + +-//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 + + import "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) { + } + + //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 +@@ -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 + + //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 +@@ -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 +@@ -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); +-- +2.41.0 + diff --git a/main/gcc/0034-libgo-forcefully-use-off_t.patch b/main/gcc/0034-libgo-forcefully-use-off_t.patch deleted file mode 100644 index c0f8c1665d2..00000000000 --- a/main/gcc/0034-libgo-forcefully-use-off_t.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7fe47c64925ffe66232e3ccf99f0ad185c55bba1 Mon Sep 17 00:00:00 2001 -From: psykose <alice@ayaya.dev> -Date: Mon, 10 Jul 2023 22:10:19 +0000 -Subject: [PATCH 34/34] libgo: forcefully use off_t - ---- - libgo/sysinfo.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c -index 180f5c31d74..660fd3ddcd3 100644 ---- a/libgo/sysinfo.c -+++ b/libgo/sysinfo.c -@@ -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 --- -2.41.0 - diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD index 689c2841059..3fc82e643a6 100644 --- a/main/gcc/APKBUILD +++ b/main/gcc/APKBUILD @@ -246,7 +246,7 @@ source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${ 0031-druntime-link-against-libucontext-on-all-platforms.patch 0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch 0033-libphobos-do-not-use-LFS64-symbols.patch - 0034-libgo-forcefully-use-off_t.patch + 0034-libgo-fix-lfs64-use.patch " # we build out-of-tree @@ -797,5 +797,5 @@ e026f1e20b78328b55b92a5fdf8f9d1d761176d2eea90556d7be8e2bae72d0dc52fd482d1eac8ab6 80b41cf68a7e56bef50c05073cc79b9eafbd37535f6360deac16dfe5498ac041aaf91c3cc1bc6e323d574cd1da65aab22df32a03e39f606bff41a103063aafef 0031-druntime-link-against-libucontext-on-all-platforms.patch b4917017c45d170c6878c7744c1ecababef4346903ee1f684d5a59d65255a5576d16d40137f7dbfe46144907c6389035966813e9024c9a4f499e963ed533947a 0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch 836b58bafae068398d0daab438b4d24d608aab25b9afc0c538d2bf9f86701ae40e6327c3d04513eea0d2f365a5fff2e47acd8cc2d2f4e111c31e6a03caf0861f 0033-libphobos-do-not-use-LFS64-symbols.patch -094a7cecde831ede0ffa99cd23a3ea4572293a72fc21e83639b804c501aad000d14db64b26385613e9a0cc7bedd88b3476cea70eed31fc2eaaddbe1580158fa2 0034-libgo-forcefully-use-off_t.patch +42457ee7970c0cf32fb4ecedb8f9c02c85c2fcd063ca19456b35f76df7449a76a1de3a9cf8304deddf4706b91bf39aa42ee0599792318ab49130b6525f5197ac 0034-libgo-fix-lfs64-use.patch " |