From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] gcc: update to 9.2.0 and enable gcc-go on musl + go and objc/objc++ on cross targets
Date: Sun, 08 Sep 2019 03:20:40 +0200 [thread overview]
Message-ID: <20190908012040.yAojGVZ-0ey1FNo1Ggusf_xtU2_pc7qIu2v8zIv5Ais@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-14289@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]
There is an updated pull request by q66 against master on the void-packages repository
https://github.com/void-ppc/void-packages gcc92
https://github.com/void-linux/void-packages/pull/14289
gcc: update to 9.2.0 and enable gcc-go on musl + go and objc/objc++ on cross targets
This updates `gcc` to 9.2.0 and while doing that, enables `gcc-go` on `musl`. It also enables `go`, `objc` and `objc++` support in crosstoolchains, allowing us to also enable them for cross targets.
Crosstoolchains updates:
- [x] aarch64
- [x] aarch64-musl
- [ ] armv5tel
- [ ] armv5tel-musl
- [ ] armv6l
- [ ] armv6l-musl
- [ ] armv7l
- [ ] armv7l-musl
- [ ] i686
- [ ] i686-musl
- [ ] mips-musl
- [ ] mipshf-musl
- [ ] mipsel-musl
- [ ] mipselhf-musl
- [ ] ppc64le
- [ ] ppc64le-musl
- [ ] ppc64
- [ ] ppc64-musl
- [ ] ppc
- [ ] ppc-musl
- [ ] x86_64-musl
Testing:
- [x] ppc64le
- [x] ppc64le-musl
- [x] ppc64
- [ ] ppc64-musl
- [ ] ppc
- [ ] ppc-musl
- [ ] x86_64
- [ ] x86_64-musl
- [x] aarch64 (build)
- [x] aarch64-musl (build)
- [ ] armv7l (build)
A patch file from https://github.com/void-linux/void-packages/pull/14289.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gcc92-14289.patch --]
[-- Type: text/x-diff, Size: 106427 bytes --]
From 13446a506f0a2462a5698bede7b1da6c33f41259 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 7 Sep 2019 19:13:12 +0200
Subject: [PATCH 01/16] gcc: update to 9.2.0 and enable gcc-go on musl
---
srcpkgs/gcc/files/gccgo-musl.patch | 200 +++++++++
srcpkgs/gcc/patches/bug90756.patch | 23 -
srcpkgs/gcc/patches/darn.patch | 504 ++++++++++++++++++++++
srcpkgs/gcc/patches/libffi_gnulinux.patch | 11 +
srcpkgs/gcc/patches/non-nullness.patch | 88 ----
srcpkgs/gcc/template | 39 +-
6 files changed, 733 insertions(+), 132 deletions(-)
create mode 100644 srcpkgs/gcc/files/gccgo-musl.patch
delete mode 100644 srcpkgs/gcc/patches/bug90756.patch
create mode 100644 srcpkgs/gcc/patches/darn.patch
create mode 100644 srcpkgs/gcc/patches/libffi_gnulinux.patch
delete mode 100644 srcpkgs/gcc/patches/non-nullness.patch
diff --git a/srcpkgs/gcc/files/gccgo-musl.patch b/srcpkgs/gcc/files/gccgo-musl.patch
new file mode 100644
index 00000000000..cc3ed7d17ae
--- /dev/null
+++ b/srcpkgs/gcc/files/gccgo-musl.patch
@@ -0,0 +1,200 @@
+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.
+
+Souurce: Adélie Linux, q66
+URL: https://code.foxkit.us/adelie/packages/tree/master/system/gcc
+
+--- Makefile.in
++++ 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} \
+--- libgo/mksysinfo.sh
++++ 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}
+--- libgo/go/runtime/mem_gccgo.go
++++ 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() {
+ }
+ }
+
+-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()
+--- libgo/go/runtime/signal_gccgo.go
++++ libgo/go/runtime/signal_gccgo.go
+@@ -111,7 +111,7 @@ func getsig(i uint32) uintptr {
+ if sigaction(i, nil, &sa) < 0 {
+ // On GNU/Linux glibc rejects attempts to call
+ // sigaction with signal 32 (SIGCANCEL) or 33 (SIGSETXID).
+- if GOOS == "linux" && (i == 32 || i == 33) {
++ if GOOS == "linux" && (i == 32 || i == 33 || i == 34) {
+ return _SIG_DFL
+ }
+ throw("sigaction read failure")
+--- libgo/go/syscall/errstr.go
++++ libgo/go/syscall/errstr.go
+@@ -5,7 +5,6 @@
+ // license that can be found in the LICENSE file.
+
+ // +build !hurd
+-// +build !linux
+
+ package syscall
+
+--- 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])
+-}
+--- libgo/go/syscall/libcall_linux.go
++++ 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)
+--- libgo/mksigtab.sh
++++ libgo/mksigtab.sh
+@@ -82,7 +82,7 @@ checksig _SIGPWR '{_SigNotify, "SIGPWR: power failure restart"}'
+ checksig _SIGEMT '{_SigThrow, "SIGEMT: emulate instruction executed"}'
+ checksig _SIGINFO '{_SigNotify, "SIGINFO: status request from keyboard"}'
+ checksig _SIGTHR '{_SigNotify, "SIGTHR: reserved"}'
+-checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}'
++#checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}'
+ checksig _SIGWAITING '{_SigNotify, "SIGWAITING: reserved signal no longer used by"}'
+ checksig _SIGLWP '{_SigNotify, "SIGLWP: reserved signal no longer used by"}'
+ checksig _SIGFREEZE '{_SigNotify, "SIGFREEZE: special signal used by CPR"}'
+@@ -95,10 +95,12 @@ checksig _SIGLOST ' {_SigNotify, "SIGLOST: resource lost (Sun); server died (G
+
+ # Special handling of signals 32 and 33 on GNU/Linux systems,
+ # because they are special to glibc.
++# Signal 34 is additionally special to Linux systems with musl.
+ if test "${GOOS}" = "linux"; then
+- SIGLIST=$SIGLIST"_32__33_"
++ SIGLIST=$SIGLIST"_32__33__34_"
+ echo ' 32: {_SigSetStack + _SigUnblock, "signal 32"}, /* SIGCANCEL; see issue 6997 */'
+ echo ' 33: {_SigSetStack + _SigUnblock, "signal 33"}, /* SIGSETXID; see issues 3871, 9400, 12498 */'
++ echo ' 34: {_SigSetStack + _SigUnblock, "signal 34"}, /* see issue 30062 */'
+ fi
+
+ if test "${GOOS}" = "aix"; then
+--- libgo/runtime/go-signal.c
++++ libgo/runtime/go-signal.c
+@@ -222,7 +222,11 @@ getSiginfo(siginfo_t *info, void *context __attribute__((unused)))
+ #endif
+ #ifdef __PPC__
+ #ifdef __linux__
+- ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip;
++ #ifdef __PPC64__
++ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32];
++ #else
++ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gregs[32];
++ #endif
+ #endif
+ #ifdef _AIX
+ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.jmp_context.iar;
+@@ -343,7 +343,7 @@ dumpregs(siginfo_t *info __attribute__((unused)), void *context __attribute__((u
+ #endif
+ #endif
+
+-#if defined(__PPC__) && defined(__LITTLE_ENDIAN__)
++#if defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__GLIBC__)
+ #ifdef __linux__
+ {
+ mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext;
+--- libgo/sysinfo.c
++++ libgo/sysinfo.c
+@@ -73,9 +73,6 @@
+ #include <sys/times.h>
+ #include <sys/wait.h>
+ #include <sys/un.h>
+-#if defined(HAVE_SYS_USER_H)
+-#include <sys/user.h>
+-#endif
+ #if defined(HAVE_SYS_UTSNAME_H)
+ #include <sys/utsname.h>
+ #endif
diff --git a/srcpkgs/gcc/patches/bug90756.patch b/srcpkgs/gcc/patches/bug90756.patch
deleted file mode 100644
index cf78dad9cce..00000000000
--- a/srcpkgs/gcc/patches/bug90756.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Bug 90756 - [7/8/9 Regression] g++ ICE in convert_move, at expr.c:218 on i686 and s390x
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90756
-
---- gcc/explow.c 2019/07/04 02:39:58 273035
-+++ gcc/explow.c 2019/07/04 04:49:22 273036
-@@ -892,16 +892,7 @@
-
- tree type = TREE_TYPE (name);
- int unsignedp = TYPE_UNSIGNED (type);
-- machine_mode mode = TYPE_MODE (type);
--
-- /* Bypass TYPE_MODE when it maps vector modes to BLKmode. */
-- if (mode == BLKmode)
-- {
-- gcc_assert (VECTOR_TYPE_P (type));
-- mode = type->type_common.mode;
-- }
--
-- machine_mode pmode = promote_mode (type, mode, &unsignedp);
-+ machine_mode pmode = promote_mode (type, TYPE_MODE (type), &unsignedp);
- if (punsignedp)
- *punsignedp = unsignedp;
-
diff --git a/srcpkgs/gcc/patches/darn.patch b/srcpkgs/gcc/patches/darn.patch
new file mode 100644
index 00000000000..97f7de3f438
--- /dev/null
+++ b/srcpkgs/gcc/patches/darn.patch
@@ -0,0 +1,504 @@
+Upstream: yes
+Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91481
+
+https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=275170
+https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=275181
+
+Fixes a security issue with the hardware random number generator
+when compiling for POWER9. Since Void compiles for POWER8 by
+default, it's not affected, but people building custom binaries
+might be.
+
+--- gcc/config/rs6000/altivec.md
++++ gcc/config/rs6000/altivec.md
+@@ -80,9 +80,6 @@
+ UNSPEC_VUPKHPX
+ UNSPEC_VUPKLPX
+ UNSPEC_CONVERT_4F32_8I16
+- UNSPEC_DARN
+- UNSPEC_DARN_32
+- UNSPEC_DARN_RAW
+ UNSPEC_DST
+ UNSPEC_DSTT
+ UNSPEC_DSTST
+@@ -161,9 +158,6 @@
+ UNSPEC_BCDADD
+ UNSPEC_BCDSUB
+ UNSPEC_BCD_OVERFLOW
+- UNSPEC_CMPRB
+- UNSPEC_CMPRB2
+- UNSPEC_CMPEQB
+ UNSPEC_VRLMI
+ UNSPEC_VRLNM
+ ])
+@@ -4101,223 +4095,6 @@
+ "bcd<bcd_add_sub>. %0,%1,%2,%3"
+ [(set_attr "type" "vecsimple")])
+
+-(define_insn "darn_32"
+- [(set (match_operand:SI 0 "register_operand" "=r")
+- (unspec:SI [(const_int 0)] UNSPEC_DARN_32))]
+- "TARGET_P9_MISC"
+- "darn %0,0"
+- [(set_attr "type" "integer")])
+-
+-(define_insn "darn_raw"
+- [(set (match_operand:DI 0 "register_operand" "=r")
+- (unspec:DI [(const_int 0)] UNSPEC_DARN_RAW))]
+- "TARGET_P9_MISC && TARGET_64BIT"
+- "darn %0,2"
+- [(set_attr "type" "integer")])
+-
+-(define_insn "darn"
+- [(set (match_operand:DI 0 "register_operand" "=r")
+- (unspec:DI [(const_int 0)] UNSPEC_DARN))]
+- "TARGET_P9_MISC && TARGET_64BIT"
+- "darn %0,1"
+- [(set_attr "type" "integer")])
+-
+-;; Test byte within range.
+-;;
+-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
+-;; represents a byte whose value is ignored in this context and
+-;; vv, the least significant byte, holds the byte value that is to
+-;; be tested for membership within the range specified by operand 2.
+-;; The bytes of operand 2 are organized as xx:xx:hi:lo.
+-;;
+-;; Return in target register operand 0 a value of 1 if lo <= vv and
+-;; vv <= hi. Otherwise, set register operand 0 to 0.
+-;;
+-;; Though the instructions to which this expansion maps operate on
+-;; 64-bit registers, the current implementation only operates on
+-;; SI-mode operands as the high-order bits provide no information
+-;; that is not already available in the low-order bits. To avoid the
+-;; costs of data widening operations, future enhancements might allow
+-;; DI mode for operand 0 and/or might allow operand 1 to be QI mode.
+-(define_expand "cmprb"
+- [(set (match_dup 3)
+- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
+- (match_operand:SI 2 "gpc_reg_operand" "r")]
+- UNSPEC_CMPRB))
+- (set (match_operand:SI 0 "gpc_reg_operand" "=r")
+- (if_then_else:SI (lt (match_dup 3)
+- (const_int 0))
+- (const_int -1)
+- (if_then_else (gt (match_dup 3)
+- (const_int 0))
+- (const_int 1)
+- (const_int 0))))]
+- "TARGET_P9_MISC"
+-{
+- operands[3] = gen_reg_rtx (CCmode);
+-})
+-
+-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
+-;; represents a byte whose value is ignored in this context and
+-;; vv, the least significant byte, holds the byte value that is to
+-;; be tested for membership within the range specified by operand 2.
+-;; The bytes of operand 2 are organized as xx:xx:hi:lo.
+-;;
+-;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if
+-;; lo <= vv and vv <= hi. Otherwise, set the GT bit to 0. The other
+-;; 3 bits of the target CR register are all set to 0.
+-(define_insn "*cmprb_internal"
+- [(set (match_operand:CC 0 "cc_reg_operand" "=y")
+- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
+- (match_operand:SI 2 "gpc_reg_operand" "r")]
+- UNSPEC_CMPRB))]
+- "TARGET_P9_MISC"
+- "cmprb %0,0,%1,%2"
+- [(set_attr "type" "logical")])
+-
+-;; Set operand 0 register to -1 if the LT bit (0x8) of condition
+-;; register operand 1 is on. Otherwise, set operand 0 register to 1
+-;; if the GT bit (0x4) of condition register operand 1 is on.
+-;; Otherwise, set operand 0 to 0. Note that the result stored into
+-;; register operand 0 is non-zero iff either the LT or GT bits are on
+-;; within condition register operand 1.
+-(define_insn "setb_signed"
+- [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
+- (if_then_else:SI (lt (match_operand:CC 1 "cc_reg_operand" "y")
+- (const_int 0))
+- (const_int -1)
+- (if_then_else (gt (match_dup 1)
+- (const_int 0))
+- (const_int 1)
+- (const_int 0))))]
+- "TARGET_P9_MISC"
+- "setb %0,%1"
+- [(set_attr "type" "logical")])
+-
+-(define_insn "setb_unsigned"
+- [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
+- (if_then_else:SI (ltu (match_operand:CCUNS 1 "cc_reg_operand" "y")
+- (const_int 0))
+- (const_int -1)
+- (if_then_else (gtu (match_dup 1)
+- (const_int 0))
+- (const_int 1)
+- (const_int 0))))]
+- "TARGET_P9_MISC"
+- "setb %0,%1"
+- [(set_attr "type" "logical")])
+-
+-;; Test byte within two ranges.
+-;;
+-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
+-;; represents a byte whose value is ignored in this context and
+-;; vv, the least significant byte, holds the byte value that is to
+-;; be tested for membership within the range specified by operand 2.
+-;; The bytes of operand 2 are organized as hi_1:lo_1:hi_2:lo_2.
+-;;
+-;; Return in target register operand 0 a value of 1 if (lo_1 <= vv and
+-;; vv <= hi_1) or if (lo_2 <= vv and vv <= hi_2). Otherwise, set register
+-;; operand 0 to 0.
+-;;
+-;; Though the instructions to which this expansion maps operate on
+-;; 64-bit registers, the current implementation only operates on
+-;; SI-mode operands as the high-order bits provide no information
+-;; that is not already available in the low-order bits. To avoid the
+-;; costs of data widening operations, future enhancements might allow
+-;; DI mode for operand 0 and/or might allow operand 1 to be QI mode.
+-(define_expand "cmprb2"
+- [(set (match_dup 3)
+- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
+- (match_operand:SI 2 "gpc_reg_operand" "r")]
+- UNSPEC_CMPRB2))
+- (set (match_operand:SI 0 "gpc_reg_operand" "=r")
+- (if_then_else:SI (lt (match_dup 3)
+- (const_int 0))
+- (const_int -1)
+- (if_then_else (gt (match_dup 3)
+- (const_int 0))
+- (const_int 1)
+- (const_int 0))))]
+- "TARGET_P9_MISC"
+-{
+- operands[3] = gen_reg_rtx (CCmode);
+-})
+-
+-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
+-;; represents a byte whose value is ignored in this context and
+-;; vv, the least significant byte, holds the byte value that is to
+-;; be tested for membership within the ranges specified by operand 2.
+-;; The bytes of operand 2 are organized as hi_1:lo_1:hi_2:lo_2.
+-;;
+-;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if
+-;; (lo_1 <= vv and vv <= hi_1) or if (lo_2 <= vv and vv <= hi_2).
+-;; Otherwise, set the GT bit to 0. The other 3 bits of the target
+-;; CR register are all set to 0.
+-(define_insn "*cmprb2_internal"
+- [(set (match_operand:CC 0 "cc_reg_operand" "=y")
+- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
+- (match_operand:SI 2 "gpc_reg_operand" "r")]
+- UNSPEC_CMPRB2))]
+- "TARGET_P9_MISC"
+- "cmprb %0,1,%1,%2"
+- [(set_attr "type" "logical")])
+-
+-;; Test byte membership within set of 8 bytes.
+-;;
+-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
+-;; represents a byte whose value is ignored in this context and
+-;; vv, the least significant byte, holds the byte value that is to
+-;; be tested for membership within the set specified by operand 2.
+-;; The bytes of operand 2 are organized as e0:e1:e2:e3:e4:e5:e6:e7.
+-;;
+-;; Return in target register operand 0 a value of 1 if vv equals one
+-;; of the values e0, e1, e2, e3, e4, e5, e6, or e7. Otherwise, set
+-;; register operand 0 to 0. Note that the 8 byte values held within
+-;; operand 2 need not be unique.
+-;;
+-;; Though the instructions to which this expansion maps operate on
+-;; 64-bit registers, the current implementation requires that operands
+-;; 0 and 1 have mode SI as the high-order bits provide no information
+-;; that is not already available in the low-order bits. To avoid the
+-;; costs of data widening operations, future enhancements might allow
+-;; DI mode for operand 0 and/or might allow operand 1 to be QI mode.
+-(define_expand "cmpeqb"
+- [(set (match_dup 3)
+- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
+- (match_operand:DI 2 "gpc_reg_operand" "r")]
+- UNSPEC_CMPEQB))
+- (set (match_operand:SI 0 "gpc_reg_operand" "=r")
+- (if_then_else:SI (lt (match_dup 3)
+- (const_int 0))
+- (const_int -1)
+- (if_then_else (gt (match_dup 3)
+- (const_int 0))
+- (const_int 1)
+- (const_int 0))))]
+- "TARGET_P9_MISC && TARGET_64BIT"
+-{
+- operands[3] = gen_reg_rtx (CCmode);
+-})
+-
+-;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
+-;; represents a byte whose value is ignored in this context and
+-;; vv, the least significant byte, holds the byte value that is to
+-;; be tested for membership within the set specified by operand 2.
+-;; The bytes of operand 2 are organized as e0:e1:e2:e3:e4:e5:e6:e7.
+-;;
+-;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if vv
+-;; equals one of the values e0, e1, e2, e3, e4, e5, e6, or e7. Otherwise,
+-;; set the GT bit to zero. The other 3 bits of the target CR register
+-;; are all set to 0.
+-(define_insn "*cmpeqb_internal"
+- [(set (match_operand:CC 0 "cc_reg_operand" "=y")
+- (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
+- (match_operand:DI 2 "gpc_reg_operand" "r")]
+- UNSPEC_CMPEQB))]
+- "TARGET_P9_MISC && TARGET_64BIT"
+- "cmpeqb %0,%1,%2"
+- [(set_attr "type" "logical")])
+-
+ (define_expand "bcd<bcd_add_sub>_<code>"
+ [(parallel [(set (reg:CCFP CR6_REGNO)
+ (compare:CCFP
+--- gcc/config/rs6000/rs6000.md
++++ gcc/config/rs6000/rs6000.md
+@@ -137,6 +137,9 @@
+ UNSPEC_LSQ
+ UNSPEC_FUSION_GPR
+ UNSPEC_STACK_CHECK
++ UNSPEC_CMPRB
++ UNSPEC_CMPRB2
++ UNSPEC_CMPEQB
+ UNSPEC_ADD_ROUND_TO_ODD
+ UNSPEC_SUB_ROUND_TO_ODD
+ UNSPEC_MUL_ROUND_TO_ODD
+@@ -164,6 +167,9 @@
+ UNSPECV_EH_RR ; eh_reg_restore
+ UNSPECV_ISYNC ; isync instruction
+ UNSPECV_MFTB ; move from time base
++ UNSPECV_DARN ; darn 1 (deliver a random number)
++ UNSPECV_DARN_32 ; darn 2
++ UNSPECV_DARN_RAW ; darn 0
+ UNSPECV_NLGR ; non-local goto receiver
+ UNSPECV_MFFS ; Move from FPSCR
+ UNSPECV_MFFSL ; Move from FPSCR light instruction version
+@@ -13853,6 +13859,224 @@
+ [(set_attr "type" "vecmove")
+ (set_attr "size" "128")])
+
++;; Miscellaneous ISA 3.0 (power9) instructions
++
++(define_insn "darn_32"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPECV_DARN_32))]
++ "TARGET_P9_MISC"
++ "darn %0,0"
++ [(set_attr "type" "integer")])
++
++(define_insn "darn_raw"
++ [(set (match_operand:DI 0 "register_operand" "=r")
++ (unspec_volatile:DI [(const_int 0)] UNSPECV_DARN_RAW))]
++ "TARGET_P9_MISC && TARGET_64BIT"
++ "darn %0,2"
++ [(set_attr "type" "integer")])
++
++(define_insn "darn"
++ [(set (match_operand:DI 0 "register_operand" "=r")
++ (unspec_volatile:DI [(const_int 0)] UNSPECV_DARN))]
++ "TARGET_P9_MISC && TARGET_64BIT"
++ "darn %0,1"
++ [(set_attr "type" "integer")])
++
++;; Test byte within range.
++;;
++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
++;; represents a byte whose value is ignored in this context and
++;; vv, the least significant byte, holds the byte value that is to
++;; be tested for membership within the range specified by operand 2.
++;; The bytes of operand 2 are organized as xx:xx:hi:lo.
++;;
++;; Return in target register operand 0 a value of 1 if lo <= vv and
++;; vv <= hi. Otherwise, set register operand 0 to 0.
++;;
++;; Though the instructions to which this expansion maps operate on
++;; 64-bit registers, the current implementation only operates on
++;; SI-mode operands as the high-order bits provide no information
++;; that is not already available in the low-order bits. To avoid the
++;; costs of data widening operations, future enhancements might allow
++;; DI mode for operand 0 and/or might allow operand 1 to be QI mode.
++(define_expand "cmprb"
++ [(set (match_dup 3)
++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
++ (match_operand:SI 2 "gpc_reg_operand" "r")]
++ UNSPEC_CMPRB))
++ (set (match_operand:SI 0 "gpc_reg_operand" "=r")
++ (if_then_else:SI (lt (match_dup 3)
++ (const_int 0))
++ (const_int -1)
++ (if_then_else (gt (match_dup 3)
++ (const_int 0))
++ (const_int 1)
++ (const_int 0))))]
++ "TARGET_P9_MISC"
++{
++ operands[3] = gen_reg_rtx (CCmode);
++})
++
++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
++;; represents a byte whose value is ignored in this context and
++;; vv, the least significant byte, holds the byte value that is to
++;; be tested for membership within the range specified by operand 2.
++;; The bytes of operand 2 are organized as xx:xx:hi:lo.
++;;
++;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if
++;; lo <= vv and vv <= hi. Otherwise, set the GT bit to 0. The other
++;; 3 bits of the target CR register are all set to 0.
++(define_insn "*cmprb_internal"
++ [(set (match_operand:CC 0 "cc_reg_operand" "=y")
++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
++ (match_operand:SI 2 "gpc_reg_operand" "r")]
++ UNSPEC_CMPRB))]
++ "TARGET_P9_MISC"
++ "cmprb %0,0,%1,%2"
++ [(set_attr "type" "logical")])
++
++;; Set operand 0 register to -1 if the LT bit (0x8) of condition
++;; register operand 1 is on. Otherwise, set operand 0 register to 1
++;; if the GT bit (0x4) of condition register operand 1 is on.
++;; Otherwise, set operand 0 to 0. Note that the result stored into
++;; register operand 0 is non-zero iff either the LT or GT bits are on
++;; within condition register operand 1.
++(define_insn "setb_signed"
++ [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
++ (if_then_else:SI (lt (match_operand:CC 1 "cc_reg_operand" "y")
++ (const_int 0))
++ (const_int -1)
++ (if_then_else (gt (match_dup 1)
++ (const_int 0))
++ (const_int 1)
++ (const_int 0))))]
++ "TARGET_P9_MISC"
++ "setb %0,%1"
++ [(set_attr "type" "logical")])
++
++(define_insn "setb_unsigned"
++ [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
++ (if_then_else:SI (ltu (match_operand:CCUNS 1 "cc_reg_operand" "y")
++ (const_int 0))
++ (const_int -1)
++ (if_then_else (gtu (match_dup 1)
++ (const_int 0))
++ (const_int 1)
++ (const_int 0))))]
++ "TARGET_P9_MISC"
++ "setb %0,%1"
++ [(set_attr "type" "logical")])
++
++;; Test byte within two ranges.
++;;
++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
++;; represents a byte whose value is ignored in this context and
++;; vv, the least significant byte, holds the byte value that is to
++;; be tested for membership within the range specified by operand 2.
++;; The bytes of operand 2 are organized as hi_1:lo_1:hi_2:lo_2.
++;;
++;; Return in target register operand 0 a value of 1 if (lo_1 <= vv and
++;; vv <= hi_1) or if (lo_2 <= vv and vv <= hi_2). Otherwise, set register
++;; operand 0 to 0.
++;;
++;; Though the instructions to which this expansion maps operate on
++;; 64-bit registers, the current implementation only operates on
++;; SI-mode operands as the high-order bits provide no information
++;; that is not already available in the low-order bits. To avoid the
++;; costs of data widening operations, future enhancements might allow
++;; DI mode for operand 0 and/or might allow operand 1 to be QI mode.
++(define_expand "cmprb2"
++ [(set (match_dup 3)
++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
++ (match_operand:SI 2 "gpc_reg_operand" "r")]
++ UNSPEC_CMPRB2))
++ (set (match_operand:SI 0 "gpc_reg_operand" "=r")
++ (if_then_else:SI (lt (match_dup 3)
++ (const_int 0))
++ (const_int -1)
++ (if_then_else (gt (match_dup 3)
++ (const_int 0))
++ (const_int 1)
++ (const_int 0))))]
++ "TARGET_P9_MISC"
++{
++ operands[3] = gen_reg_rtx (CCmode);
++})
++
++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
++;; represents a byte whose value is ignored in this context and
++;; vv, the least significant byte, holds the byte value that is to
++;; be tested for membership within the ranges specified by operand 2.
++;; The bytes of operand 2 are organized as hi_1:lo_1:hi_2:lo_2.
++;;
++;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if
++;; (lo_1 <= vv and vv <= hi_1) or if (lo_2 <= vv and vv <= hi_2).
++;; Otherwise, set the GT bit to 0. The other 3 bits of the target
++;; CR register are all set to 0.
++(define_insn "*cmprb2_internal"
++ [(set (match_operand:CC 0 "cc_reg_operand" "=y")
++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
++ (match_operand:SI 2 "gpc_reg_operand" "r")]
++ UNSPEC_CMPRB2))]
++ "TARGET_P9_MISC"
++ "cmprb %0,1,%1,%2"
++ [(set_attr "type" "logical")])
++
++;; Test byte membership within set of 8 bytes.
++;;
++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
++;; represents a byte whose value is ignored in this context and
++;; vv, the least significant byte, holds the byte value that is to
++;; be tested for membership within the set specified by operand 2.
++;; The bytes of operand 2 are organized as e0:e1:e2:e3:e4:e5:e6:e7.
++;;
++;; Return in target register operand 0 a value of 1 if vv equals one
++;; of the values e0, e1, e2, e3, e4, e5, e6, or e7. Otherwise, set
++;; register operand 0 to 0. Note that the 8 byte values held within
++;; operand 2 need not be unique.
++;;
++;; Though the instructions to which this expansion maps operate on
++;; 64-bit registers, the current implementation requires that operands
++;; 0 and 1 have mode SI as the high-order bits provide no information
++;; that is not already available in the low-order bits. To avoid the
++;; costs of data widening operations, future enhancements might allow
++;; DI mode for operand 0 and/or might allow operand 1 to be QI mode.
++(define_expand "cmpeqb"
++ [(set (match_dup 3)
++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
++ (match_operand:DI 2 "gpc_reg_operand" "r")]
++ UNSPEC_CMPEQB))
++ (set (match_operand:SI 0 "gpc_reg_operand" "=r")
++ (if_then_else:SI (lt (match_dup 3)
++ (const_int 0))
++ (const_int -1)
++ (if_then_else (gt (match_dup 3)
++ (const_int 0))
++ (const_int 1)
++ (const_int 0))))]
++ "TARGET_P9_MISC && TARGET_64BIT"
++{
++ operands[3] = gen_reg_rtx (CCmode);
++})
++
++;; The bytes of operand 1 are organized as xx:xx:xx:vv, where xx
++;; represents a byte whose value is ignored in this context and
++;; vv, the least significant byte, holds the byte value that is to
++;; be tested for membership within the set specified by operand 2.
++;; The bytes of operand 2 are organized as e0:e1:e2:e3:e4:e5:e6:e7.
++;;
++;; Set bit 1 (the GT bit, 0x4) of CR register operand 0 to 1 if vv
++;; equals one of the values e0, e1, e2, e3, e4, e5, e6, or e7. Otherwise,
++;; set the GT bit to zero. The other 3 bits of the target CR register
++;; are all set to 0.
++(define_insn "*cmpeqb_internal"
++ [(set (match_operand:CC 0 "cc_reg_operand" "=y")
++ (unspec:CC [(match_operand:SI 1 "gpc_reg_operand" "r")
++ (match_operand:DI 2 "gpc_reg_operand" "r")]
++ UNSPEC_CMPEQB))]
++ "TARGET_P9_MISC && TARGET_64BIT"
++ "cmpeqb %0,%1,%2"
++ [(set_attr "type" "logical")])
+
+ (define_insn "*nabs<mode>2_hw"
+ [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v")
diff --git a/srcpkgs/gcc/patches/libffi_gnulinux.patch b/srcpkgs/gcc/patches/libffi_gnulinux.patch
new file mode 100644
index 00000000000..413b4aef5af
--- /dev/null
+++ b/srcpkgs/gcc/patches/libffi_gnulinux.patch
@@ -0,0 +1,11 @@
+--- libffi/src/closures.c.orig
++++ libffi/src/closures.c
+@@ -34,7 +34,7 @@
+ #include <ffi_common.h>
+
+ #if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE
+-# if __gnu_linux__ && !defined(__ANDROID__)
++# if __linux__ && !defined(__ANDROID__)
+ /* This macro indicates it may be forbidden to map anonymous memory
+ with both write and execute permission. Code compiled when this
+ option is defined will attempt to map such pages once, but if it
diff --git a/srcpkgs/gcc/patches/non-nullness.patch b/srcpkgs/gcc/patches/non-nullness.patch
deleted file mode 100644
index 7e0e4425ce4..00000000000
--- a/srcpkgs/gcc/patches/non-nullness.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-Source: 2019-06-21 Jeff Law <law@redhat.com>
-Upstream: yes
-Reason: PR tree-optimization/90949
-* tree-ssa-copy.c (fini_copy_prop): Use reset_flow_sensitive_info.
-* tree-ssanames.c (reset_flow_sensitive_info): Reset non-null state.
-
---- gcc/tree-ssa-copy.c 2019-01-01 13:31:55.000000000 +0100
-+++ gcc/tree-ssa-copy.c 2019-06-26 18:50:01.030395471 +0200
-@@ -545,13 +545,12 @@
- duplicate_ssa_name_ptr_info (copy_of[i].value,
- SSA_NAME_PTR_INFO (var));
- /* Points-to information is cfg insensitive,
-- but alignment info might be cfg sensitive, if it
-- e.g. is derived from VRP derived non-zero bits.
-- So, do not copy alignment info if the two SSA_NAMEs
-- aren't defined in the same basic block. */
-+ but [E]VRP might record context sensitive alignment
-+ info, non-nullness, etc. So reset context sensitive
-+ info if the two SSA_NAMEs aren't defined in the same
-+ basic block. */
- if (var_bb != copy_of_bb)
-- mark_ptr_info_alignment_unknown
-- (SSA_NAME_PTR_INFO (copy_of[i].value));
-+ reset_flow_sensitive_info (copy_of[i].value);
- }
- else if (!POINTER_TYPE_P (TREE_TYPE (var))
- && SSA_NAME_RANGE_INFO (var)
---- gcc/tree-ssanames.c 2019-03-18 14:59:11.000000000 +0100
-+++ gcc/tree-ssanames.c 2019-06-26 18:50:11.282394906 +0200
-@@ -820,7 +820,12 @@
- {
- /* points-to info is not flow-sensitive. */
- if (SSA_NAME_PTR_INFO (name))
-- mark_ptr_info_alignment_unknown (SSA_NAME_PTR_INFO (name));
-+ {
-+ /* [E]VRP can derive context sensitive alignment info and
-+ non-nullness properties. We must reset both. */
-+ mark_ptr_info_alignment_unknown (SSA_NAME_PTR_INFO (name));
-+ SSA_NAME_PTR_INFO (name)->pt.null = 1;
-+ }
- }
- else
- SSA_NAME_RANGE_INFO (name) = NULL;
---- /dev/null
-+++ gcc/testsuite/gcc.c-torture/pr90949.c 2019-06-26 18:53:16.870384679 +0200
-@@ -0,0 +1,42 @@
-+void __attribute__ ((noipa, noinline)) my_puts (const char *str) { }
-+
-+void __attribute__ ((noipa, noinline)) my_free (void *p) { }
-+
-+
-+struct Node
-+{
-+ struct Node *child;
-+};
-+
-+struct Node space[2] = { };
-+
-+struct Node * __attribute__ ((noipa, noinline)) my_malloc (int bytes)
-+{
-+ return &space[0];
-+}
-+
-+void
-+walk (struct Node *module, int cleanup)
-+{
-+ if (module == 0)
-+ {
-+ return;
-+ }
-+ if (!cleanup)
-+ {
-+ my_puts ("No cleanup");
-+ }
-+ walk (module->child, cleanup);
-+ if (cleanup)
-+ {
-+ my_free (module);
-+ }
-+}
-+
-+int
-+main ()
-+{
-+ struct Node *node = my_malloc (sizeof (struct Node));
-+ node->child = 0;
-+ walk (node, 1);
-+}
diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template
index bab33d798ae..069b66a11f2 100644
--- a/srcpkgs/gcc/template
+++ b/srcpkgs/gcc/template
@@ -1,14 +1,14 @@
# Template file for 'gcc'
_majorver=9
-_minorver=${_majorver}.1
+_minorver=${_majorver}.2
_gmp_version=6.1.2
-_mpfr_version=4.0.1
+_mpfr_version=4.0.2
_mpc_version=1.1.0
-_isl_version=0.19
+_isl_version=0.21
pkgname=gcc
version=${_minorver}.0
-revision=3
+revision=1
short_desc="GNU Compiler Collection"
maintainer="Enno Boland <gottox@voidlinux.org>"
homepage="http://gcc.gnu.org"
@@ -20,17 +20,18 @@ distfiles="
https://www.mpfr.org/mpfr-${_mpfr_version}/mpfr-${_mpfr_version}.tar.xz
${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz
http://isl.gforge.inria.fr/isl-${_isl_version}.tar.bz2"
-checksum="79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+checksum="ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912
- 67874a60826303ee2fb6affc6dc0ddd3e749e9bfcb4c8655e3953d0458a6e16e
+ 1d3be708604eae0e42d578ba93b390c2a145f17743a744d8f3f8c2ad5855a38a
6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e
- d59726f34f7852a081fbd3defd1ab2136f174110fc2e0c8d10bb122173fa9ed8"
+ d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859"
nopie=yes
lib32disabled=yes
bootstrap=yes
replaces="gcc-gcj<7.2.0 gcc-gcj-jdk-compat<7.2.0 libmpx>=0 libmpx-devel>=0"
alternatives="cc:cc:/usr/bin/gcc"
+nocross=yes
if [ "$CHROOT_READY" ]; then
hostmakedepends="perl flex"
@@ -69,12 +70,11 @@ if [ "$CHROOT_READY" ]; then
subpackages+=" gcc-fortran libgfortran-devel libgfortran"
if [ -z "$CROSS_BUILD" ]; then
subpackages+=" gcc-objc gcc-objc++ libobjc-devel libobjc"
- case "$XBPS_TARGET_MACHINE" in
- *-musl) # Go won't link for musl libc
- ;;
- *) subpackages+=" gcc-go gcc-go-tools libgo-devel libgo"
- ;;
- esac
+ subpackages+=" gcc-go gcc-go-tools libgo-devel libgo"
+ # we need this for gcc-go on musl
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ makedepends+=" libucontext-devel"
+ fi
fi
fi
@@ -162,7 +162,10 @@ pre_configure() {
# _FORTIFY_SOURCE needs an optimization level.
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure
case "$XBPS_TARGET_MACHINE" in
- *-musl) patch -p1 -i ${FILESDIR}/libgnarl-musl.patch ;;
+ *-musl)
+ patch -p1 -i ${FILESDIR}/libgnarl-musl.patch
+ patch -p0 -i ${FILESDIR}/gccgo-musl.patch
+ ;;
esac
}
do_configure() {
@@ -225,13 +228,7 @@ do_configure() {
export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib"
_args+=" --build=${_triplet}"
else
- _langs="c,c++,objc,obj-c++,fortran,lto"
- case "$XBPS_TARGET_MACHINE" in
- *-musl) # Linking libgo.so is broken for musl libc
- ;;
- *) _langs+=",go"
- ;;
- esac
+ _langs="c,c++,objc,obj-c++,go,fortran,lto"
_args+=" --build=${_triplet}"
_args+=" --enable-fast-character"
fi
From bcf0fb67064263e3c85d70ddf453d7414e03c18f Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 7 Sep 2019 22:14:40 +0200
Subject: [PATCH 02/16] cross-aarch64-linux-gnu: update for gcc-9.2.0 +
go/objc(++)
---
.../files/non-nullness.patch | 1 -
srcpkgs/cross-aarch64-linux-gnu/template | 21 +++++++++++--------
2 files changed, 12 insertions(+), 10 deletions(-)
delete mode 120000 srcpkgs/cross-aarch64-linux-gnu/files/non-nullness.patch
diff --git a/srcpkgs/cross-aarch64-linux-gnu/files/non-nullness.patch b/srcpkgs/cross-aarch64-linux-gnu/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-aarch64-linux-gnu/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-aarch64-linux-gnu/template b/srcpkgs/cross-aarch64-linux-gnu/template
index e4f1544040e..cecc02ec7b8 100644
--- a/srcpkgs/cross-aarch64-linux-gnu/template
+++ b/srcpkgs/cross-aarch64-linux-gnu/template
@@ -1,8 +1,8 @@
# Template build file for 'cross-aarch64-linux-gnu'
#
_binutils_version=2.32
-_gcc_version=9.1.0
-_glibc_version=2.29
+_gcc_version=9.2.0
+_glibc_version=2.30
_linux_version=4.19
_triplet=aarch64-linux-gnu
@@ -10,7 +10,7 @@ _archflags="-march=armv8-a"
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
-version=0.31
+version=0.32
revision=1
short_desc="GNU Cross toolchain for the ${_triplet} LE target (binutils/gcc/glibc)"
maintainer="Leah Neukirchen <leah@vuxu.org>"
@@ -22,15 +22,15 @@ distfiles="
${GNU_SITE}/glibc/glibc-${_glibc_version}.tar.xz
${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz"
checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
- f3eeb8d57e25ca9fc13c2af3dae97754f9f643bc69229546828e3a240e2af04b
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
+ e2c4114e569afbe7edbc29131a43be833850ab9a459d81beb2588016d2bbb8af
0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
lib32disabled=yes
nocross=yes
nopie=yes
create_wrksrc=yes
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc gcc-go flex perl python3"
makedepends="isl15-devel libmpc-devel zlib-devel"
depends="${pkgname}-libc-${version}_${revision}"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
@@ -94,7 +94,6 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
msg_normal "Building cross gcc bootstrap\n"
@@ -234,7 +233,7 @@ _gcc_build() {
_args+=" --libdir=/usr/lib"
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,go,fortran,lto"
_args+=" --with-gnu-as"
_args+=" --with-gnu-ld"
_args+=" --disable-multilib"
@@ -250,7 +249,6 @@ _gcc_build() {
_args+=" --enable-default-pie"
_args+=" --enable-default-ssp"
_args+=" --disable-libquadmath"
- _args+=" --disable-libatomic"
_args+=" --disable-libssp"
_args+=" --disable-libmudflap"
_args+=" --disable-libsanitizer"
@@ -334,6 +332,11 @@ do_install() {
ln -svf libgnat-${_majorver}.so libgnat.so
rm -vf ${DESTDIR}/${_adalib}/libgna{rl,t}.so
+ # We need to build libatomic in target gcc as gccgo needs it to
+ # build... but it's not needed at runtime, so remove it from the
+ # destdir so it doesn't conflict with the libatomic package
+ rm -f ${DESTDIR}/${_sysroot}/usr/lib/libatomic.*
+
# Remove unnecessary stuff
rm -f ${DESTDIR}/usr/lib*/libiberty.a
rm -rf ${DESTDIR}/usr/share
From d5afad259bbf0b296d512e8e7167bc1b00ee8572 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 00:03:19 +0200
Subject: [PATCH 03/16] cross-aarch64-linux-musl: update for gcc-9.2.0 +
go/objc(++)
---
.../files/gccgo-musl.patch | 1 +
.../files/non-nullness.patch | 1 -
srcpkgs/cross-aarch64-linux-musl/template | 43 +++++++++++++++----
3 files changed, 35 insertions(+), 10 deletions(-)
create mode 120000 srcpkgs/cross-aarch64-linux-musl/files/gccgo-musl.patch
delete mode 120000 srcpkgs/cross-aarch64-linux-musl/files/non-nullness.patch
diff --git a/srcpkgs/cross-aarch64-linux-musl/files/gccgo-musl.patch b/srcpkgs/cross-aarch64-linux-musl/files/gccgo-musl.patch
new file mode 120000
index 00000000000..a093af85773
--- /dev/null
+++ b/srcpkgs/cross-aarch64-linux-musl/files/gccgo-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/gccgo-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-aarch64-linux-musl/files/non-nullness.patch b/srcpkgs/cross-aarch64-linux-musl/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-aarch64-linux-musl/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index a40e53f532e..7fc76c3d726 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -1,17 +1,18 @@
# Template build file for 'cross-aarch64-linux-musl'
#
_binutils_version=2.32
-_gcc_version=9.1.0
+_gcc_version=9.2.0
_musl_version=1.1.23
_linux_version=4.19
+_libucontext_version=0.9.0
_triplet=aarch64-linux-musl
_archflags="-march=armv8-a"
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
-version=0.31
-revision=3
+version=0.32
+revision=1
short_desc="Cross toolchain for ARM64 LE target (musl)"
maintainer="Orphaned <orphan@voidlinux.org>"
homepage="https://www.voidlinux.org/"
@@ -20,11 +21,13 @@ distfiles="
${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
${GNU_SITE}/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.xz
http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz"
+ ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz
+ https://distfiles.adelielinux.org/source/libucontext/libucontext-${_libucontext_version}.tar.xz"
checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
- 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
+ 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
+ 0d53a415a307ef175153bbe60a572c940a922cb736ce13530b666e7ec2795d68"
lib32disabled=yes
nocross=yes
@@ -33,7 +36,7 @@ nodebug=yes
create_wrksrc=yes
archs="x86_64* ppc64le"
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc gcc-go flex perl python3"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl15-devel"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a"
@@ -81,10 +84,10 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
_apply_patch -p0 ${FILESDIR}/musl-ada.patch
_apply_patch -p1 ${FILESDIR}/libgnarl-musl.patch
_apply_patch -p0 ${FILESDIR}/invalid_tls_model.patch
+ _apply_patch -p0 ${FILESDIR}/gccgo-musl.patch
msg_normal "Building cross gcc bootstrap\n"
@@ -153,6 +156,22 @@ _musl_build() {
touch ${wrksrc}/.musl_build_done
}
+_libucontext_build() {
+ [ -f ${wrksrc}/.libucontext_build_done ] && return 0
+
+ cd ${wrksrc}/libucontext-${_libucontext_version}
+ msg_normal "Building cross libucontext\n"
+
+ # it's ok if we're static only here
+ CC="${_triplet}-gcc" AR="${_triplet}-ar" AS="${_triplet}-as" \
+ CFLAGS="-Os -pipe ${_archflags}" \
+ make ARCH=aarch64 libucontext.a
+
+ cp libucontext.a ${_sysroot}/usr/lib
+
+ touch ${wrksrc}/.libucontext_build_done
+}
+
_gcc_build() {
local _args
@@ -168,7 +187,7 @@ _gcc_build() {
_args+=" --libexecdir=/usr/lib"
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,go,fortran,lto"
_args+=" --enable-libada"
_args+=" --enable-lto"
_args+=" --enable-default-pie"
@@ -208,6 +227,7 @@ do_build() {
_gcc_bootstrap
_linux_headers
_musl_build
+ _libucontext_build
_gcc_build
}
@@ -263,6 +283,11 @@ do_install() {
ln -svf libgnat-${_majorver}.so libgnat.so
rm -vf ${DESTDIR}/${_adalib}/libgna{rl,t}.so
+ # We need to build libatomic in target gcc as gccgo needs it to
+ # build... but it's not needed at runtime, so remove it from the
+ # destdir so it doesn't conflict with the libatomic package
+ rm -f ${DESTDIR}/${_sysroot}/usr/lib/libatomic.*
+
# Remove unnecessary stuff
rm -f ${DESTDIR}/usr/lib*/libiberty.a
rm -rf ${DESTDIR}/usr/share
From ff93eb00b4f5caf49c6778fec3cd1a2870599031 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 02:27:36 +0200
Subject: [PATCH 04/16] cross-x86_64-linux-musl: update for gcc-9.2.0 +
go/objc(++)
---
.../files/gccgo-musl.patch | 1 +
.../files/non-nullness.patch | 1 -
srcpkgs/cross-x86_64-linux-musl/template | 43 +++++++++++++++----
3 files changed, 35 insertions(+), 10 deletions(-)
create mode 120000 srcpkgs/cross-x86_64-linux-musl/files/gccgo-musl.patch
delete mode 120000 srcpkgs/cross-x86_64-linux-musl/files/non-nullness.patch
diff --git a/srcpkgs/cross-x86_64-linux-musl/files/gccgo-musl.patch b/srcpkgs/cross-x86_64-linux-musl/files/gccgo-musl.patch
new file mode 120000
index 00000000000..a093af85773
--- /dev/null
+++ b/srcpkgs/cross-x86_64-linux-musl/files/gccgo-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/gccgo-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-x86_64-linux-musl/files/non-nullness.patch b/srcpkgs/cross-x86_64-linux-musl/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-x86_64-linux-musl/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index 2f6a2a4241d..349eacf973c 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -1,16 +1,17 @@
# Template file for 'cross-x86_64-linux-musl'
#
_binutils_version=2.32
-_gcc_version=9.1.0
+_gcc_version=9.2.0
_musl_version=1.1.23
_linux_version=4.19
+_libucontext_version=0.9.0
_triplet=x86_64-linux-musl
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
-version=0.31
-revision=3
+version=0.32
+revision=1
archs="i686* x86_64 ppc64le"
short_desc="Cross toolchain for x86_64 with musl"
maintainer="Orphaned <orphan@voidlinux.org>"
@@ -20,18 +21,20 @@ distfiles="
${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
${GNU_SITE}/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.xz
http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz"
+ ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz
+ https://distfiles.adelielinux.org/source/libucontext/libucontext-${_libucontext_version}.tar.xz"
checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
- 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
+ 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
+ 0d53a415a307ef175153bbe60a572c940a922cb736ce13530b666e7ec2795d68"
lib32disabled=yes
nocross=yes
nopie=yes
nodebug=yes
create_wrksrc=yes
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc gcc-go flex perl python3"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl15-devel"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a"
@@ -83,10 +86,10 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
_apply_patch -p0 ${FILESDIR}/musl-ada.patch
_apply_patch -p1 ${FILESDIR}/libgnarl-musl.patch
_apply_patch -p0 ${FILESDIR}/invalid_tls_model.patch
+ _apply_patch -p0 ${FILESDIR}/gccgo-musl.patch
sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
sed -i 's/lib64/lib/' gcc/config/i386/linux64.h
@@ -158,6 +161,22 @@ _musl_build() {
touch ${wrksrc}/.musl_build_done
}
+_libucontext_build() {
+ [ -f ${wrksrc}/.libucontext_build_done ] && return 0
+
+ cd ${wrksrc}/libucontext-${_libucontext_version}
+ msg_normal "Building cross libucontext\n"
+
+ # it's ok if we're static only here
+ CC="${_triplet}-gcc" AR="${_triplet}-ar" AS="${_triplet}-as" \
+ CFLAGS="-Os -pipe ${_archflags}" \
+ make ARCH=x86_64 libucontext.a
+
+ cp libucontext.a ${_sysroot}/usr/lib
+
+ touch ${wrksrc}/.libucontext_build_done
+}
+
_gcc_build() {
local _args
[ -f ${wrksrc}/.gcc_build_done ] && return 0
@@ -171,7 +190,7 @@ _gcc_build() {
_args="--prefix=/usr"
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,go,fortran,lto"
_args+=" --enable-libada"
_args+=" --enable-lto"
_args+=" --enable-default-pie"
@@ -213,6 +232,7 @@ do_build() {
_gcc_bootstrap
_linux_headers
_musl_build
+ _libucontext_build
_gcc_build
}
@@ -264,6 +284,11 @@ do_install() {
ln -svf libgnat-${_majorver}.so libgnat.so
rm -vf ${DESTDIR}/${_adalib}/libgna{rl,t}.so
+ # We need to build libatomic in target gcc as gccgo needs it to
+ # build... but it's not needed at runtime, so remove it from the
+ # destdir so it doesn't conflict with the libatomic package
+ rm -f ${DESTDIR}/${_sysroot}/usr/lib/libatomic.*
+
# Remove unnecessary stuff
rm -f ${DESTDIR}/usr/lib*/libiberty.a
rm -rf ${DESTDIR}/usr/share
From ccd0fcf577b6f23f904bc56f26057bc42cf768df Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 02:33:03 +0200
Subject: [PATCH 05/16] cross-powerpc64le-linux-musl: update for gcc-9.2.0 +
go/objc(++)
---
.../files/gccgo-musl.patch | 1 +
.../files/non-nullness.patch | 1 -
srcpkgs/cross-powerpc64le-linux-musl/template | 43 +++++++++++++++----
3 files changed, 35 insertions(+), 10 deletions(-)
create mode 120000 srcpkgs/cross-powerpc64le-linux-musl/files/gccgo-musl.patch
delete mode 120000 srcpkgs/cross-powerpc64le-linux-musl/files/non-nullness.patch
diff --git a/srcpkgs/cross-powerpc64le-linux-musl/files/gccgo-musl.patch b/srcpkgs/cross-powerpc64le-linux-musl/files/gccgo-musl.patch
new file mode 120000
index 00000000000..a093af85773
--- /dev/null
+++ b/srcpkgs/cross-powerpc64le-linux-musl/files/gccgo-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/gccgo-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-powerpc64le-linux-musl/files/non-nullness.patch b/srcpkgs/cross-powerpc64le-linux-musl/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-powerpc64le-linux-musl/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index 7e75d7b1c5c..0de402db9c0 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -1,15 +1,16 @@
# Template file for 'cross-powerpc64le-linux-musl'
_binutils_version=2.32
-_gcc_version=9.1.0
+_gcc_version=9.2.0
_musl_version=1.1.23
_linux_version=4.19
+_libucontext_version=0.9.0
_triplet="powerpc64le-linux-musl"
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
-version=0.31
-revision=3
+version=0.32
+revision=1
short_desc="Cross toolchain for powerpc64le with musl"
maintainer="q66 <daniel@octaforge.org>"
homepage="https://www.voidlinux.org/"
@@ -18,18 +19,20 @@ distfiles="
${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
${GNU_SITE}/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.xz
http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz"
+ ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz
+ https://distfiles.adelielinux.org/source/libucontext/libucontext-${_libucontext_version}.tar.xz"
checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
- 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
+ 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
+ 0d53a415a307ef175153bbe60a572c940a922cb736ce13530b666e7ec2795d68"
lib32disabled=yes
nocross=yes
nopie=yes
nodebug=yes
create_wrksrc=yes
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc gcc-go flex perl python3"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl15-devel"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a"
@@ -81,13 +84,13 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
_apply_patch -p0 ${FILESDIR}/0010-ldbl128-config.patch
_apply_patch -p0 ${FILESDIR}/ppc64-pure64.patch
_apply_patch -p0 ${FILESDIR}/libgcc-musl-ldbl128-config.patch
_apply_patch -p0 ${FILESDIR}/musl-ada.patch
_apply_patch -p1 ${FILESDIR}/libgnarl-musl.patch
_apply_patch -p0 ${FILESDIR}/invalid_tls_model.patch
+ _apply_patch -p0 ${FILESDIR}/gccgo-musl.patch
sed -i 's/lib64/lib/' gcc/config/rs6000/linux64.h
@@ -161,6 +164,22 @@ _musl_build() {
touch ${wrksrc}/.musl_build_done
}
+_libucontext_build() {
+ [ -f ${wrksrc}/.libucontext_build_done ] && return 0
+
+ cd ${wrksrc}/libucontext-${_libucontext_version}
+ msg_normal "Building cross libucontext\n"
+
+ # it's ok if we're static only here
+ CC="${_triplet}-gcc" AR="${_triplet}-ar" AS="${_triplet}-as" \
+ CFLAGS="-Os -pipe ${_archflags}" \
+ make ARCH=ppc64 libucontext.a
+
+ cp libucontext.a ${_sysroot}/usr/lib
+
+ touch ${wrksrc}/.libucontext_build_done
+}
+
_gcc_build() {
local _args
[ -f ${wrksrc}/.gcc_build_done ] && return 0
@@ -176,7 +195,7 @@ _gcc_build() {
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
_args+=" --with-abi=elfv2"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,go,fortran,lto"
_args+=" --enable-decimal-float=no"
_args+=" --enable-secureplt"
_args+=" --enable-targets=powerpcle-linux"
@@ -219,6 +238,7 @@ do_build() {
_gcc_bootstrap
_linux_headers
_musl_build
+ _libucontext_build
_gcc_build
}
@@ -270,6 +290,11 @@ do_install() {
ln -svf libgnat-${_majorver}.so libgnat.so
rm -vf ${DESTDIR}/${_adalib}/libgna{rl,t}.so
+ # We need to build libatomic in target gcc as gccgo needs it to
+ # build... but it's not needed at runtime, so remove it from the
+ # destdir so it doesn't conflict with the libatomic package
+ rm -f ${DESTDIR}/${_sysroot}/usr/lib/libatomic.*
+
# Remove unnecessary stuff
rm -f ${DESTDIR}/usr/lib*/libiberty.a
rm -rf ${DESTDIR}/usr/share
From 8db9605e0ce1b659d8dba8e8ef3a3390e8da3825 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 02:36:30 +0200
Subject: [PATCH 06/16] cross-powerpc64-linux-musl: update for gcc-9.2.0 +
go/objc(++)
---
.../files/gccgo-musl.patch | 1 +
.../files/non-nullness.patch | 1 -
srcpkgs/cross-powerpc64-linux-musl/template | 43 +++++++++++++++----
3 files changed, 35 insertions(+), 10 deletions(-)
create mode 120000 srcpkgs/cross-powerpc64-linux-musl/files/gccgo-musl.patch
delete mode 120000 srcpkgs/cross-powerpc64-linux-musl/files/non-nullness.patch
diff --git a/srcpkgs/cross-powerpc64-linux-musl/files/gccgo-musl.patch b/srcpkgs/cross-powerpc64-linux-musl/files/gccgo-musl.patch
new file mode 120000
index 00000000000..a093af85773
--- /dev/null
+++ b/srcpkgs/cross-powerpc64-linux-musl/files/gccgo-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/gccgo-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-powerpc64-linux-musl/files/non-nullness.patch b/srcpkgs/cross-powerpc64-linux-musl/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-powerpc64-linux-musl/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index d3a9a758fe9..559dac88f36 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -1,15 +1,16 @@
# Template file for 'cross-powerpc64-linux-musl'
_binutils_version=2.32
-_gcc_version=9.1.0
+_gcc_version=9.2.0
_musl_version=1.1.23
_linux_version=4.19
+_libucontext_version=0.9.0
_triplet="powerpc64-linux-musl"
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
-version=0.31
-revision=3
+version=0.32
+revision=1
short_desc="Cross toolchain for powerpc64 with musl"
maintainer="q66 <daniel@octaforge.org>"
homepage="https://www.voidlinux.org/"
@@ -18,18 +19,20 @@ distfiles="
${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
${GNU_SITE}/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.xz
http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz"
+ ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz
+ https://distfiles.adelielinux.org/source/libucontext/libucontext-${_libucontext_version}.tar.xz"
checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
- 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
+ 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
+ 0d53a415a307ef175153bbe60a572c940a922cb736ce13530b666e7ec2795d68"
lib32disabled=yes
nocross=yes
nopie=yes
nodebug=yes
create_wrksrc=yes
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc gcc-go flex perl python3"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl15-devel"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a"
@@ -81,13 +84,13 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
_apply_patch -p0 ${FILESDIR}/0010-ldbl128-config.patch
_apply_patch -p0 ${FILESDIR}/ppc64-pure64.patch
_apply_patch -p0 ${FILESDIR}/libgcc-musl-ldbl128-config.patch
_apply_patch -p0 ${FILESDIR}/musl-ada.patch
_apply_patch -p1 ${FILESDIR}/libgnarl-musl.patch
_apply_patch -p0 ${FILESDIR}/invalid_tls_model.patch
+ _apply_patch -p0 ${FILESDIR}/gccgo-musl.patch
sed -i 's/lib64/lib/' gcc/config/rs6000/linux64.h
@@ -161,6 +164,22 @@ _musl_build() {
touch ${wrksrc}/.musl_build_done
}
+_libucontext_build() {
+ [ -f ${wrksrc}/.libucontext_build_done ] && return 0
+
+ cd ${wrksrc}/libucontext-${_libucontext_version}
+ msg_normal "Building cross libucontext\n"
+
+ # it's ok if we're static only here
+ CC="${_triplet}-gcc" AR="${_triplet}-ar" AS="${_triplet}-as" \
+ CFLAGS="-Os -pipe ${_archflags}" \
+ make ARCH=ppc64 libucontext.a
+
+ cp libucontext.a ${_sysroot}/usr/lib
+
+ touch ${wrksrc}/.libucontext_build_done
+}
+
_gcc_build() {
local _args
[ -f ${wrksrc}/.gcc_build_done ] && return 0
@@ -176,7 +195,7 @@ _gcc_build() {
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
_args+=" --with-abi=elfv2"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,go,fortran,lto"
_args+=" --enable-decimal-float=no"
_args+=" --enable-secureplt"
_args+=" --enable-targets=powerpc-linux"
@@ -219,6 +238,7 @@ do_build() {
_gcc_bootstrap
_linux_headers
_musl_build
+ _libucontext_build
_gcc_build
}
@@ -270,6 +290,11 @@ do_install() {
ln -svf libgnat-${_majorver}.so libgnat.so
rm -vf ${DESTDIR}/${_adalib}/libgna{rl,t}.so
+ # We need to build libatomic in target gcc as gccgo needs it to
+ # build... but it's not needed at runtime, so remove it from the
+ # destdir so it doesn't conflict with the libatomic package
+ rm -f ${DESTDIR}/${_sysroot}/usr/lib/libatomic.*
+
# Remove unnecessary stuff
rm -f ${DESTDIR}/usr/lib*/libiberty.a
rm -rf ${DESTDIR}/usr/share
From fd12fa492cca12881e119210b75ba4f40b45de6d Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 02:40:18 +0200
Subject: [PATCH 07/16] cross-powerpc-linux-musl: update for gcc-9.2.0 +
go/objc(++)
---
.../files/gccgo-musl.patch | 1 +
.../files/non-nullness.patch | 1 -
srcpkgs/cross-powerpc-linux-musl/template | 63 +++++++++++++------
3 files changed, 44 insertions(+), 21 deletions(-)
create mode 120000 srcpkgs/cross-powerpc-linux-musl/files/gccgo-musl.patch
delete mode 120000 srcpkgs/cross-powerpc-linux-musl/files/non-nullness.patch
diff --git a/srcpkgs/cross-powerpc-linux-musl/files/gccgo-musl.patch b/srcpkgs/cross-powerpc-linux-musl/files/gccgo-musl.patch
new file mode 120000
index 00000000000..a093af85773
--- /dev/null
+++ b/srcpkgs/cross-powerpc-linux-musl/files/gccgo-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/gccgo-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-powerpc-linux-musl/files/non-nullness.patch b/srcpkgs/cross-powerpc-linux-musl/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-powerpc-linux-musl/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index 856e8fb0885..9d61d406ace 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -1,9 +1,9 @@
-# Template build file for 'cross-powerpc-linux-musl'
-#
+# Template file for 'cross-powerpc-linux-musl'
_binutils_version=2.32
-_gcc_version=9.1.0
+_gcc_version=9.2.0
_musl_version=1.1.23
_linux_version=4.19
+_libucontext_version=0.9.0
_triplet=powerpc-linux-musl
_fpuflags=
@@ -11,8 +11,8 @@ _archflags="-mcpu=powerpc -msecure-plt"
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
-version=0.31
-revision=3
+version=0.32
+revision=1
short_desc="Cross toolchain for PowerPC (musl)"
maintainer="Thomas Batten <stenstorpmc@gmail.com>"
@@ -21,13 +21,14 @@ license="GPL-3.0-or-later, GPL-2.0-only, MIT"
distfiles="
${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
${GNU_SITE}/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.xz
+ http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz
- http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz"
-checksum="
- 0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+ https://distfiles.adelielinux.org/source/libucontext/libucontext-${_libucontext_version}.tar.xz"
+checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
+ 8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
- 8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa"
+ 0d53a415a307ef175153bbe60a572c940a922cb736ce13530b666e7ec2795d68"
lib32disabled=yes
nocross=yes
@@ -36,7 +37,7 @@ nodebug=yes
create_wrksrc=yes
archs="i686* x86_64* ppc64*"
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc gcc-go flex perl python3"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl15-devel"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a"
@@ -86,13 +87,13 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
_apply_patch -p0 ${FILESDIR}/musl-ada.patch
_apply_patch -p0 ${FILESDIR}/no-stack_chk_fail_local.patch
_apply_patch -p0 ${FILESDIR}/0010-ldbl128-config.patch
_apply_patch -p0 ${FILESDIR}/libgcc-musl-ldbl128-config.patch
_apply_patch -p1 ${FILESDIR}/libgnarl-musl.patch
_apply_patch -p0 ${FILESDIR}/invalid_tls_model.patch
+ _apply_patch -p0 ${FILESDIR}/gccgo-musl.patch
msg_normal "Building cross gcc bootstrap\n"
@@ -166,6 +167,22 @@ _musl_build() {
touch ${wrksrc}/.musl_build_done
}
+_libucontext_build() {
+ [ -f ${wrksrc}/.libucontext_build_done ] && return 0
+
+ cd ${wrksrc}/libucontext-${_libucontext_version}
+ msg_normal "Building cross libucontext\n"
+
+ # it's ok if we're static only here
+ CC="${_triplet}-gcc" AR="${_triplet}-ar" AS="${_triplet}-as" \
+ CFLAGS="-Os -pipe ${_archflags}" \
+ make ARCH=ppc libucontext.a
+
+ cp libucontext.a ${_sysroot}/usr/lib
+
+ touch ${wrksrc}/.libucontext_build_done
+}
+
_gcc_build() {
local _args
@@ -181,7 +198,7 @@ _gcc_build() {
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
_args+=" --libexecdir=/usr/lib"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,go,fortran,lto"
_args+=" --enable-lto"
_args+=" --enable-libada"
_args+=" --enable-default-pie"
@@ -226,6 +243,7 @@ do_build() {
_gcc_bootstrap
_linux_headers
_musl_build
+ _libucontext_build
_gcc_build
}
@@ -268,15 +286,20 @@ do_install() {
ln -sf libc.so ${DESTDIR}/${_sysroot}/usr/lib/ld-musl-powerpc.so.1
ln -sf libc.so ${DESTDIR}/${_sysroot}/usr/lib/ld-musl-powerpc-sf.so.1
- # symlinks for gnarl and gnat shared libraries
- _majorver=${_gcc_version%.*.*}
- _adalib=usr/lib/gcc/${_triplet}/${_gcc_version}/adalib
- mv -v ${DESTDIR}/${_adalib}/libgnarl-${_majorver}.so ${DESTDIR}/${_sysroot}/usr/lib
- mv -v ${DESTDIR}/${_adalib}/libgnat-${_majorver}.so ${DESTDIR}/${_sysroot}/usr/lib
- ln -svf libgnarl-${_majorver}.so libgnarl.so
- ln -svf libgnat-${_majorver}.so libgnat.so
+ # symlinks for gnarl and gnat shared libraries
+ _majorver=${_gcc_version%.*.*}
+ _adalib=usr/lib/gcc/${_triplet}/${_gcc_version}/adalib
+ mv -v ${DESTDIR}/${_adalib}/libgnarl-${_majorver}.so ${DESTDIR}/${_sysroot}/usr/lib
+ mv -v ${DESTDIR}/${_adalib}/libgnat-${_majorver}.so ${DESTDIR}/${_sysroot}/usr/lib
+ ln -svf libgnarl-${_majorver}.so libgnarl.so
+ ln -svf libgnat-${_majorver}.so libgnat.so
rm -vf ${DESTDIR}/${_adalib}/libgna{rl,t}.so
+ # We need to build libatomic in target gcc as gccgo needs it to
+ # build... but it's not needed at runtime, so remove it from the
+ # destdir so it doesn't conflict with the libatomic package
+ rm -f ${DESTDIR}/${_sysroot}/usr/lib/libatomic.*
+
# Remove unnecessary stuff
rm -f ${DESTDIR}/usr/lib*/libiberty.a
rm -rf ${DESTDIR}/usr/share
From 7db522d82fa730bd8530771d4f25ae2b8f5ad191 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 02:44:26 +0200
Subject: [PATCH 08/16] cross-arm-linux-musleabi: update for gcc-9.2.0 +
go/objc(++)
---
.../files/gccgo-musl.patch | 1 +
.../files/non-nullness.patch | 1 -
srcpkgs/cross-arm-linux-musleabi/template | 43 +++++++++++++++----
3 files changed, 35 insertions(+), 10 deletions(-)
create mode 120000 srcpkgs/cross-arm-linux-musleabi/files/gccgo-musl.patch
delete mode 120000 srcpkgs/cross-arm-linux-musleabi/files/non-nullness.patch
diff --git a/srcpkgs/cross-arm-linux-musleabi/files/gccgo-musl.patch b/srcpkgs/cross-arm-linux-musleabi/files/gccgo-musl.patch
new file mode 120000
index 00000000000..a093af85773
--- /dev/null
+++ b/srcpkgs/cross-arm-linux-musleabi/files/gccgo-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/gccgo-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-arm-linux-musleabi/files/non-nullness.patch b/srcpkgs/cross-arm-linux-musleabi/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-arm-linux-musleabi/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index f1434fe9b26..985af935aac 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -1,9 +1,10 @@
# Template build file for 'cross-arm-linux-musleabi'
#
_binutils_version=2.32
-_gcc_version=9.1.0
+_gcc_version=9.2.0
_musl_version=1.1.23
_linux_version=4.19
+_libucontext_version=0.9.0
_triplet=arm-linux-musleabi
_fpuflags="--with-arch=armv5te --without-fp --with-float=soft"
@@ -11,8 +12,8 @@ _archflags="-march=armv5te -msoft-float -mfloat-abi=soft"
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
-version=0.31
-revision=3
+version=0.32
+revision=1
short_desc="Cross toolchain for ARMv5 TE target (musl)"
maintainer="Orphaned <orphan@voidlinux.org>"
homepage="https://www.voidlinux.org/"
@@ -21,11 +22,13 @@ distfiles="
${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
${GNU_SITE}/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.xz
http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz"
+ ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz
+ https://distfiles.adelielinux.org/source/libucontext/libucontext-${_libucontext_version}.tar.xz"
checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
- 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
+ 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
+ 0d53a415a307ef175153bbe60a572c940a922cb736ce13530b666e7ec2795d68"
lib32disabled=yes
nocross=yes
@@ -33,7 +36,7 @@ nopie=yes
nodebug=yes
create_wrksrc=yes
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc gcc-go flex perl python3"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl15-devel"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a"
@@ -84,10 +87,10 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
_apply_patch -p0 ${FILESDIR}/musl-ada.patch
_apply_patch -p1 ${FILESDIR}/libgnarl-musl.patch
_apply_patch -p0 ${FILESDIR}/invalid_tls_model.patch
+ _apply_patch -p0 ${FILESDIR}/gccgo-musl.patch
msg_normal "Building cross gcc bootstrap\n"
@@ -155,6 +158,22 @@ _musl_build() {
touch ${wrksrc}/.musl_build_done
}
+_libucontext_build() {
+ [ -f ${wrksrc}/.libucontext_build_done ] && return 0
+
+ cd ${wrksrc}/libucontext-${_libucontext_version}
+ msg_normal "Building cross libucontext\n"
+
+ # it's ok if we're static only here
+ CC="${_triplet}-gcc" AR="${_triplet}-ar" AS="${_triplet}-as" \
+ CFLAGS="-Os -pipe ${_archflags}" \
+ make ARCH=arm libucontext.a
+
+ cp libucontext.a ${_sysroot}/usr/lib
+
+ touch ${wrksrc}/.libucontext_build_done
+}
+
_gcc_build() {
local _args
@@ -169,7 +188,7 @@ _gcc_build() {
_args="--prefix=/usr"
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,go,fortran,lto"
_args+=" --enable-libada"
_args+=" --enable-lto"
_args+=" --enable-default-pie"
@@ -211,6 +230,7 @@ do_build() {
_gcc_bootstrap
_linux_headers
_musl_build
+ _libucontext_build
_gcc_build
}
@@ -261,6 +281,11 @@ do_install() {
ln -svf libgnat-${_majorver}.so libgnat.so
rm -vf ${DESTDIR}/${_adalib}/libgna{rl,t}.so
+ # We need to build libatomic in target gcc as gccgo needs it to
+ # build... but it's not needed at runtime, so remove it from the
+ # destdir so it doesn't conflict with the libatomic package
+ rm -f ${DESTDIR}/${_sysroot}/usr/lib/libatomic.*
+
# Remove unnecessary stuff
rm -f ${DESTDIR}/usr/lib*/libiberty.a
rm -rf ${DESTDIR}/usr/share
From fd91ca767b9baa312f7fff4de71cc1818591d692 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 02:46:45 +0200
Subject: [PATCH 09/16] cross-arm-linux-musleabihf: update for gcc-9.2.0 +
go/objc(++)
---
.../files/gccgo-musl.patch | 1 +
.../files/non-nullness.patch | 1 -
srcpkgs/cross-arm-linux-musleabihf/template | 43 +++++++++++++++----
3 files changed, 35 insertions(+), 10 deletions(-)
create mode 120000 srcpkgs/cross-arm-linux-musleabihf/files/gccgo-musl.patch
delete mode 120000 srcpkgs/cross-arm-linux-musleabihf/files/non-nullness.patch
diff --git a/srcpkgs/cross-arm-linux-musleabihf/files/gccgo-musl.patch b/srcpkgs/cross-arm-linux-musleabihf/files/gccgo-musl.patch
new file mode 120000
index 00000000000..a093af85773
--- /dev/null
+++ b/srcpkgs/cross-arm-linux-musleabihf/files/gccgo-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/gccgo-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-arm-linux-musleabihf/files/non-nullness.patch b/srcpkgs/cross-arm-linux-musleabihf/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-arm-linux-musleabihf/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index 6b9194ebc65..a5b5fc028c7 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -1,9 +1,10 @@
# Template build file for 'cross-arm-linux-musleabihf'
#
_binutils_version=2.32
-_gcc_version=9.1.0
+_gcc_version=9.2.0
_musl_version=1.1.23
_linux_version=4.19
+_libucontext_version=0.9.0
_triplet=arm-linux-musleabihf
_fpuflags="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
@@ -11,8 +12,8 @@ _archflags="-march=armv6 -mfpu=vfp -mfloat-abi=hard"
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
-version=0.31
-revision=3
+version=0.32
+revision=1
short_desc="Cross toolchain for ARMv6 LE Hard Float target (musl)"
maintainer="Orphaned <orphan@voidlinux.org>"
homepage="https://www.voidlinux.org/"
@@ -21,11 +22,13 @@ distfiles="
${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
${GNU_SITE}/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.xz
http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz"
+ ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz
+ https://distfiles.adelielinux.org/source/libucontext/libucontext-${_libucontext_version}.tar.xz"
checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
- 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
+ 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
+ 0d53a415a307ef175153bbe60a572c940a922cb736ce13530b666e7ec2795d68"
lib32disabled=yes
nocross=yes
@@ -33,7 +36,7 @@ nopie=yes
nodebug=yes
create_wrksrc=yes
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc gcc-go flex perl python3"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl15-devel"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a"
@@ -84,10 +87,10 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
_apply_patch -p0 ${FILESDIR}/musl-ada.patch
_apply_patch -p1 ${FILESDIR}/libgnarl-musl.patch
_apply_patch -p0 ${FILESDIR}/invalid_tls_model.patch
+ _apply_patch -p0 ${FILESDIR}/gccgo-musl.patch
msg_normal "Building cross gcc bootstrap\n"
@@ -155,6 +158,22 @@ _musl_build() {
touch ${wrksrc}/.musl_build_done
}
+_libucontext_build() {
+ [ -f ${wrksrc}/.libucontext_build_done ] && return 0
+
+ cd ${wrksrc}/libucontext-${_libucontext_version}
+ msg_normal "Building cross libucontext\n"
+
+ # it's ok if we're static only here
+ CC="${_triplet}-gcc" AR="${_triplet}-ar" AS="${_triplet}-as" \
+ CFLAGS="-Os -pipe ${_archflags}" \
+ make ARCH=arm libucontext.a
+
+ cp libucontext.a ${_sysroot}/usr/lib
+
+ touch ${wrksrc}/.libucontext_build_done
+}
+
_gcc_build() {
local _args
[ -f ${wrksrc}/.gcc_build_done ] && return 0
@@ -168,7 +187,7 @@ _gcc_build() {
_args="--prefix=/usr"
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,go,fortran,lto"
_args+=" --enable-libada"
_args+=" --enable-lto"
_args+=" --enable-default-pie"
@@ -210,6 +229,7 @@ do_build() {
_gcc_bootstrap
_linux_headers
_musl_build
+ _libucontext_build
_gcc_build
}
@@ -260,6 +280,11 @@ do_install() {
ln -svf libgnat-${_majorver}.so libgnat.so
rm -vf ${DESTDIR}/${_adalib}/libgna{rl,t}.so
+ # We need to build libatomic in target gcc as gccgo needs it to
+ # build... but it's not needed at runtime, so remove it from the
+ # destdir so it doesn't conflict with the libatomic package
+ rm -f ${DESTDIR}/${_sysroot}/usr/lib/libatomic.*
+
# Remove unnecessary stuff
rm -f ${DESTDIR}/usr/lib*/libiberty.a
rm -rf ${DESTDIR}/usr/share
From 30d29b026144e09ec74bdcd3dff9fb620487accf Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 02:49:32 +0200
Subject: [PATCH 10/16] cross-armv7l-linux-musleabihf: update for gcc-9.2.0 +
go/objc(++)
---
.../files/gccgo-musl.patch | 1 +
.../files/non-nullness.patch | 1 -
.../cross-armv7l-linux-musleabihf/template | 43 +++++++++++++++----
3 files changed, 35 insertions(+), 10 deletions(-)
create mode 120000 srcpkgs/cross-armv7l-linux-musleabihf/files/gccgo-musl.patch
delete mode 120000 srcpkgs/cross-armv7l-linux-musleabihf/files/non-nullness.patch
diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/files/gccgo-musl.patch b/srcpkgs/cross-armv7l-linux-musleabihf/files/gccgo-musl.patch
new file mode 120000
index 00000000000..a093af85773
--- /dev/null
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/files/gccgo-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/gccgo-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/files/non-nullness.patch b/srcpkgs/cross-armv7l-linux-musleabihf/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-armv7l-linux-musleabihf/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 37daba36ac9..5704eb067a9 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -1,9 +1,10 @@
# Template build file for 'cross-armv7l-linux-musleabihf'
#
_binutils_version=2.32
-_gcc_version=9.1.0
+_gcc_version=9.2.0
_musl_version=1.1.23
_linux_version=4.19
+_libucontext_version=0.9.0
_triplet=armv7l-linux-musleabihf
_fpuflags="--with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard"
@@ -11,8 +12,8 @@ _archflags="-march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard"
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
-version=0.31
-revision=3
+version=0.32
+revision=1
short_desc="Cross toolchain for ARMv7 LE Hard Float target (musl)"
maintainer="Orphaned <orphan@voidlinux.org>"
homepage="https://www.voidlinux.org/"
@@ -21,11 +22,13 @@ distfiles="
${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
${GNU_SITE}/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.xz
http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz"
+ ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz
+ https://distfiles.adelielinux.org/source/libucontext/libucontext-${_libucontext_version}.tar.xz"
checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
- 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
+ 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
+ 0d53a415a307ef175153bbe60a572c940a922cb736ce13530b666e7ec2795d68"
lib32disabled=yes
nocross=yes
@@ -33,7 +36,7 @@ nopie=yes
nodebug=yes
create_wrksrc=yes
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc gcc-go flex perl python3"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl15-devel"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a"
@@ -84,10 +87,10 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
_apply_patch -p0 ${FILESDIR}/musl-ada.patch
_apply_patch -p1 ${FILESDIR}/libgnarl-musl.patch
_apply_patch -p0 ${FILESDIR}/invalid_tls_model.patch
+ _apply_patch -p0 ${FILESDIR}/gccgo-musl.patch
msg_normal "Building cross gcc bootstrap\n"
@@ -156,6 +159,22 @@ _musl_build() {
touch ${wrksrc}/.musl_build_done
}
+_libucontext_build() {
+ [ -f ${wrksrc}/.libucontext_build_done ] && return 0
+
+ cd ${wrksrc}/libucontext-${_libucontext_version}
+ msg_normal "Building cross libucontext\n"
+
+ # it's ok if we're static only here
+ CC="${_triplet}-gcc" AR="${_triplet}-ar" AS="${_triplet}-as" \
+ CFLAGS="-Os -pipe ${_archflags}" \
+ make ARCH=arm libucontext.a
+
+ cp libucontext.a ${_sysroot}/usr/lib
+
+ touch ${wrksrc}/.libucontext_build_done
+}
+
_gcc_build() {
local _args
@@ -170,7 +189,7 @@ _gcc_build() {
_args="--prefix=/usr"
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,go,fortran,lto"
_args+=" --enable-libada"
_args+=" --enable-lto"
_args+=" --enable-default-pie"
@@ -212,6 +231,7 @@ do_build() {
_gcc_bootstrap
_linux_headers
_musl_build
+ _libucontext_build
_gcc_build
}
@@ -262,6 +282,11 @@ do_install() {
ln -svf libgnat-${_majorver}.so libgnat.so
rm -vf ${DESTDIR}/${_adalib}/libgna{rl,t}.so
+ # We need to build libatomic in target gcc as gccgo needs it to
+ # build... but it's not needed at runtime, so remove it from the
+ # destdir so it doesn't conflict with the libatomic package
+ rm -f ${DESTDIR}/${_sysroot}/usr/lib/libatomic.*
+
# Remove unnecessary stuff
rm -f ${DESTDIR}/usr/lib*/libiberty.a
rm -rf ${DESTDIR}/usr/share
From 246def05c0710913fa93a473eec8364042e3836f Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 02:53:27 +0200
Subject: [PATCH 11/16] cross-i686-linux-musl: update for gcc-9.2.0 +
go/objc(++)
---
.../files/bug90756.patch | 1 -
.../files/gccgo-musl.patch | 1 +
.../files/non-nullness.patch | 1 -
srcpkgs/cross-i686-linux-musl/template | 47 +++++++++++++++----
4 files changed, 38 insertions(+), 12 deletions(-)
delete mode 120000 srcpkgs/cross-i686-linux-musl/files/bug90756.patch
create mode 120000 srcpkgs/cross-i686-linux-musl/files/gccgo-musl.patch
delete mode 120000 srcpkgs/cross-i686-linux-musl/files/non-nullness.patch
diff --git a/srcpkgs/cross-i686-linux-musl/files/bug90756.patch b/srcpkgs/cross-i686-linux-musl/files/bug90756.patch
deleted file mode 120000
index 02ae43b18b4..00000000000
--- a/srcpkgs/cross-i686-linux-musl/files/bug90756.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/bug90756.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-i686-linux-musl/files/gccgo-musl.patch b/srcpkgs/cross-i686-linux-musl/files/gccgo-musl.patch
new file mode 120000
index 00000000000..a093af85773
--- /dev/null
+++ b/srcpkgs/cross-i686-linux-musl/files/gccgo-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/gccgo-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-i686-linux-musl/files/non-nullness.patch b/srcpkgs/cross-i686-linux-musl/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-i686-linux-musl/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index 905bacb0e27..25d8042180a 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -1,17 +1,18 @@
# Template build file for 'cross-i686-linux-musl'
#
_binutils_version=2.32
-_gcc_version=9.1.0
+_gcc_version=9.2.0
_musl_version=1.1.23
_linux_version=4.19
+_libucontext_version=0.9.0
_triplet=i686-linux-musl
_sysroot="/usr/${_triplet}"
_archflags="-march=i686"
pkgname=cross-${_triplet}
-version=0.31
-revision=4
+version=0.32
+revision=1
short_desc="Cross toolchain for i686 target (musl)"
maintainer="Orphaned <orphan@voidlinux.org>"
homepage="https://www.voidlinux.org/"
@@ -20,18 +21,20 @@ distfiles="
${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.xz
${GNU_SITE}/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.xz
http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
- ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz"
+ ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz
+ https://distfiles.adelielinux.org/source/libucontext/libucontext-${_libucontext_version}.tar.xz"
checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
- 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
+ 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1
+ 0d53a415a307ef175153bbe60a572c940a922cb736ce13530b666e7ec2795d68"
lib32disabled=yes
nocross=yes
nopie=yes
nodebug=yes
create_wrksrc=yes
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc gcc-go flex perl python3"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl15-devel"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a"
@@ -83,12 +86,11 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
_apply_patch -p0 ${FILESDIR}/no-stack_chk_fail_local.patch
_apply_patch -p0 ${FILESDIR}/musl-ada.patch
_apply_patch -p1 ${FILESDIR}/libgnarl-musl.patch
_apply_patch -p0 ${FILESDIR}/invalid_tls_model.patch
- _apply_patch -p0 ${FILESDIR}/bug90756.patch
+ _apply_patch -p0 ${FILESDIR}/gccgo-musl.patch
msg_normal "Building cross gcc bootstrap\n"
@@ -155,6 +157,25 @@ _musl_build() {
touch ${wrksrc}/.musl_build_done
}
+_libucontext_build() {
+ [ -f ${wrksrc}/.libucontext_build_done ] && return 0
+
+ cd ${wrksrc}/libucontext-${_libucontext_version}
+ msg_normal "Building cross libucontext\n"
+
+ sed -i arch/x86/startcontext.S -e \
+ "s;__i686.get_pc_thunk.bx;i686_get_pc_thunk_bx;g"
+
+ # it's ok if we're static only here
+ CC="${_triplet}-gcc" AR="${_triplet}-ar" AS="${_triplet}-as" \
+ CFLAGS="-Os -pipe ${_archflags}" \
+ make ARCH=x86 libucontext.a
+
+ cp libucontext.a ${_sysroot}/usr/lib
+
+ touch ${wrksrc}/.libucontext_build_done
+}
+
_gcc_build() {
local _args
[ -f ${wrksrc}/.gcc_build_done ] && return 0
@@ -168,7 +189,7 @@ _gcc_build() {
_args="--target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
_args+=" --prefix=/usr"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,go,fortran,lto"
_args+=" --enable-lto"
_args+=" --enable-default-pie"
_args+=" --enable-default-ssp"
@@ -209,6 +230,7 @@ do_build() {
_gcc_bootstrap
_linux_headers
_musl_build
+ _libucontext_build
_gcc_build
}
@@ -266,6 +288,11 @@ do_install() {
ln -svf libgnat-${_majorver}.so libgnat.so
rm -vf ${DESTDIR}/${_adalib}/libgna{rl,t}.so
+ # We need to build libatomic in target gcc as gccgo needs it to
+ # build... but it's not needed at runtime, so remove it from the
+ # destdir so it doesn't conflict with the libatomic package
+ rm -f ${DESTDIR}/${_sysroot}/usr/lib/libatomic.*
+
# Remove unnecessary stuff
rm -f ${DESTDIR}/usr/lib*/libiberty.a
rm -rf ${DESTDIR}/usr/share
From 3bd2fe566a8b202e2a46e2cce9778662050edbcb Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 02:58:40 +0200
Subject: [PATCH 12/16] cross-mips-linux-musl: update for gcc-9.2.0 + objc(++)
---
.../cross-mips-linux-musl/files/non-nullness.patch | 1 -
srcpkgs/cross-mips-linux-musl/template | 14 +++++++-------
2 files changed, 7 insertions(+), 8 deletions(-)
delete mode 120000 srcpkgs/cross-mips-linux-musl/files/non-nullness.patch
diff --git a/srcpkgs/cross-mips-linux-musl/files/non-nullness.patch b/srcpkgs/cross-mips-linux-musl/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-mips-linux-musl/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index a129e937dbf..213d288cafc 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -1,7 +1,7 @@
# Template build file for 'cross-mips-linux-musl'
#
_binutils_version=2.32
-_gcc_version=9.1.0
+_gcc_version=9.2.0
_musl_version=1.1.23
_linux_version=4.19
@@ -11,8 +11,8 @@ _archflags="-march=mips32r2 -msoft-float"
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
-version=0.31
-revision=3
+version=0.32
+revision=1
short_desc="Cross toolchain for MIPS32r2 BE softfloat target (musl)"
maintainer="Orphaned <orphan@voidlinux.org>"
homepage="https://www.voidlinux.org/"
@@ -23,7 +23,7 @@ distfiles="
http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz"
checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
@@ -33,7 +33,7 @@ nopie=yes
nodebug=yes
create_wrksrc=yes
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc flex perl python3"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl15-devel"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a"
@@ -84,7 +84,6 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
_apply_patch -p0 ${FILESDIR}/musl-ada.patch
_apply_patch -p1 ${FILESDIR}/libgnarl-musl.patch
_apply_patch -p0 ${FILESDIR}/invalid_tls_model.patch
@@ -169,7 +168,7 @@ _gcc_build() {
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
_args+=" --libexecdir=/usr/lib"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,fortran,lto"
_args+=" --enable-libada"
_args+=" --enable-lto"
_args+=" --enable-default-pie"
@@ -180,6 +179,7 @@ _gcc_build() {
_args+=" --disable-libquadmath"
_args+=" --disable-libmpx"
_args+=" --disable-libmudflap"
+ _args+=" --disable-libatomic"
_args+=" --enable-shared"
_args+=" ${_fpuflags}"
From 85aa95ee1bfd9a2fae521566987903b30b223c72 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 03:08:52 +0200
Subject: [PATCH 13/16] cross-mips-linux-muslhf: update for gcc-9.2.0 +
objc(++)
---
.../files/non-nullness.patch | 1 -
srcpkgs/cross-mips-linux-muslhf/template | 14 +++++++-------
2 files changed, 7 insertions(+), 8 deletions(-)
delete mode 120000 srcpkgs/cross-mips-linux-muslhf/files/non-nullness.patch
diff --git a/srcpkgs/cross-mips-linux-muslhf/files/non-nullness.patch b/srcpkgs/cross-mips-linux-muslhf/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-mips-linux-muslhf/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index 5ad364ecf40..84892aa48ba 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -1,7 +1,7 @@
# Template build file for 'cross-mips-linux-muslhf'
#
_binutils_version=2.32
-_gcc_version=9.1.0
+_gcc_version=9.2.0
_musl_version=1.1.23
_linux_version=4.19
@@ -11,8 +11,8 @@ _archflags="-march=mips32r2 -mhard-float"
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
-version=0.31
-revision=3
+version=0.32
+revision=1
short_desc="Cross toolchain for MIPS32r2 BE hardfloat target (musl)"
maintainer="hipperson0 <hipperson0@gmail.com>"
homepage="https://www.voidlinux.org/"
@@ -23,7 +23,7 @@ distfiles="
https://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz"
checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
@@ -33,7 +33,7 @@ nopie=yes
nodebug=yes
create_wrksrc=yes
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc flex perl python3"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl15-devel"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a"
@@ -84,7 +84,6 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
_apply_patch -p0 ${FILESDIR}/musl-ada.patch
_apply_patch -p1 ${FILESDIR}/libgnarl-musl.patch
_apply_patch -p0 ${FILESDIR}/invalid_tls_model.patch
@@ -169,7 +168,7 @@ _gcc_build() {
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
_args+=" --libexecdir=/usr/lib"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,fortran,lto"
_args+=" --enable-libada"
_args+=" --enable-lto"
_args+=" --enable-default-pie"
@@ -180,6 +179,7 @@ _gcc_build() {
_args+=" --disable-libquadmath"
_args+=" --disable-libmpx"
_args+=" --disable-libmudflap"
+ _args+=" --disable-libatomic"
_args+=" --enable-shared"
_args+=" ${_fpuflags}"
From dc16aef453181323f6ff73d13d2114ad1004063e Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 03:15:29 +0200
Subject: [PATCH 14/16] cross-mipsel-linux-musl: update for gcc-9.2.0 +
objc(++)
---
.../files/non-nullness.patch | 1 -
srcpkgs/cross-mipsel-linux-musl/template | 14 +++++++-------
2 files changed, 7 insertions(+), 8 deletions(-)
delete mode 120000 srcpkgs/cross-mipsel-linux-musl/files/non-nullness.patch
diff --git a/srcpkgs/cross-mipsel-linux-musl/files/non-nullness.patch b/srcpkgs/cross-mipsel-linux-musl/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-mipsel-linux-musl/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 1621d1005d5..20cbe0fed03 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -1,7 +1,7 @@
# Template build file for 'cross-mipsel-linux-musl'
#
_binutils_version=2.32
-_gcc_version=9.1.0
+_gcc_version=9.2.0
_musl_version=1.1.23
_linux_version=4.19
@@ -11,8 +11,8 @@ _archflags="-march=mips32r2 -msoft-float"
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
-version=0.31
-revision=3
+version=0.32
+revision=1
short_desc="Cross toolchain for MIPS32r2 LE softfloat target (musl)"
maintainer="Orphaned <orphan@voidlinux.org>"
homepage="https://www.voidlinux.org/"
@@ -23,7 +23,7 @@ distfiles="
http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz"
checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
@@ -33,7 +33,7 @@ nopie=yes
nodebug=yes
create_wrksrc=yes
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc flex perl python3"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl15-devel"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a"
@@ -84,7 +84,6 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
_apply_patch -p0 ${FILESDIR}/musl-ada.patch
_apply_patch -p1 ${FILESDIR}/libgnarl-musl.patch
_apply_patch -p0 ${FILESDIR}/invalid_tls_model.patch
@@ -169,7 +168,7 @@ _gcc_build() {
_args+=" --libexecdir=/usr/lib"
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,fortran,lto"
_args+=" --enable-libada"
_args+=" --enable-lto"
_args+=" --enable-default-pie"
@@ -180,6 +179,7 @@ _gcc_build() {
_args+=" --disable-libquadmath"
_args+=" --disable-libmpx"
_args+=" --disable-libmudflap"
+ _args+=" --disable-libatomic"
_args+=" --enable-shared"
_args+=" ${_fpuflags}"
From 38865a58a7b9cf87a50f8d3d8b1267b6452c6d3e Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 03:17:20 +0200
Subject: [PATCH 15/16] cross-mipsel-linux-muslhf: update for gcc-9.2.0 +
objc(++)
---
.../files/non-nullness.patch | 1 -
srcpkgs/cross-mipsel-linux-muslhf/template | 14 +++++++-------
2 files changed, 7 insertions(+), 8 deletions(-)
delete mode 120000 srcpkgs/cross-mipsel-linux-muslhf/files/non-nullness.patch
diff --git a/srcpkgs/cross-mipsel-linux-muslhf/files/non-nullness.patch b/srcpkgs/cross-mipsel-linux-muslhf/files/non-nullness.patch
deleted file mode 120000
index c8b653748fe..00000000000
--- a/srcpkgs/cross-mipsel-linux-muslhf/files/non-nullness.patch
+++ /dev/null
@@ -1 +0,0 @@
-../../gcc/patches/non-nullness.patch
\ No newline at end of file
diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index 3f02ba22d27..d2a692b48fe 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -1,7 +1,7 @@
# Template build file for 'cross-mipsel-linux-muslhf'
#
_binutils_version=2.32
-_gcc_version=9.1.0
+_gcc_version=9.2.0
_musl_version=1.1.23
_linux_version=4.19
@@ -11,8 +11,8 @@ _archflags="-march=mips32r2 -mhard-float"
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
-version=0.31
-revision=3
+version=0.32
+revision=1
short_desc="Cross toolchain for MIPS32r2 LE hardfloat target (musl)"
maintainer="Orphaned <orphan@voidlinux.org>"
homepage="https://www.voidlinux.org/"
@@ -23,7 +23,7 @@ distfiles="
http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz
${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz"
checksum="0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
- 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+ ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
8a0feb41cef26c97dde382c014e68b9bb335c094bbc1356f6edaaf6b79bd14aa
0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1"
@@ -33,7 +33,7 @@ nopie=yes
nodebug=yes
create_wrksrc=yes
-hostmakedepends="flex perl python3"
+hostmakedepends="gcc-objc flex perl python3"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel isl15-devel"
nostrip_files="libcaf_single.a libgcc.a libgcov.a libgcc_eh.a
libgnarl_pic.a libgnarl.a libgnat_pic.a libgnat.a"
@@ -84,7 +84,6 @@ _gcc_bootstrap() {
cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
- _apply_patch -p0 ${FILESDIR}/non-nullness.patch
_apply_patch -p0 ${FILESDIR}/musl-ada.patch
_apply_patch -p1 ${FILESDIR}/libgnarl-musl.patch
_apply_patch -p0 ${FILESDIR}/invalid_tls_model.patch
@@ -169,7 +168,7 @@ _gcc_build() {
_args+=" --libexecdir=/usr/lib"
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
- _args+=" --enable-languages=c,ada,c++,fortran,lto"
+ _args+=" --enable-languages=c,ada,c++,objc,obj-c++,fortran,lto"
_args+=" --enable-libada"
_args+=" --enable-lto"
_args+=" --enable-default-pie"
@@ -180,6 +179,7 @@ _gcc_build() {
_args+=" --disable-libquadmath"
_args+=" --disable-libmpx"
_args+=" --disable-libmudflap"
+ _args+=" --disable-libatomic"
_args+=" --enable-shared"
_args+=" ${_fpuflags}"
From f18cc06ece778176c2d59898024f415cec20bb4f Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 8 Sep 2019 00:57:20 +0200
Subject: [PATCH 16/16] gcc: reenable on cross and enable go/objc(++) for cross
targets
Except mips*-musl, as it doesn't have libucontext support yet.
[ci skip]
---
srcpkgs/gcc/template | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template
index 069b66a11f2..d8cae082a4f 100644
--- a/srcpkgs/gcc/template
+++ b/srcpkgs/gcc/template
@@ -31,7 +31,13 @@ lib32disabled=yes
bootstrap=yes
replaces="gcc-gcj<7.2.0 gcc-gcj-jdk-compat<7.2.0 libmpx>=0 libmpx-devel>=0"
alternatives="cc:cc:/usr/bin/gcc"
-nocross=yes
+
+_have_gccgo=yes
+
+# MIPS does not have libucontext yet
+case "$XBPS_TARGET_MACHINE" in
+ mips*-musl) _have_gccgo=no ;;
+esac
if [ "$CHROOT_READY" ]; then
hostmakedepends="perl flex"
@@ -68,8 +74,8 @@ fi
if [ "$CHROOT_READY" ]; then
subpackages+=" gcc-fortran libgfortran-devel libgfortran"
- if [ -z "$CROSS_BUILD" ]; then
- subpackages+=" gcc-objc gcc-objc++ libobjc-devel libobjc"
+ subpackages+=" gcc-objc gcc-objc++ libobjc-devel libobjc"
+ if [ "$_have_gccgo" = "yes" ]; then
subpackages+=" gcc-go gcc-go-tools libgo-devel libgo"
# we need this for gcc-go on musl
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
@@ -129,7 +135,6 @@ case "$XBPS_TARGET_MACHINE" in
esac
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" cross-${_triplet}"
- export GFORTRAN_FOR_TARGET=" ${_triplet}-gfortran"
if [ "$build_option_ada" ]; then
hostmakedepends+=" gcc-ada libada-devel"
fi
@@ -162,6 +167,9 @@ pre_configure() {
# _FORTIFY_SOURCE needs an optimization level.
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure
case "$XBPS_TARGET_MACHINE" in
+ mips*-musl)
+ patch -p1 -i ${FILESDIR}/libgnarl-musl.patch
+ ;;
*-musl)
patch -p1 -i ${FILESDIR}/libgnarl-musl.patch
patch -p0 -i ${FILESDIR}/gccgo-musl.patch
@@ -219,20 +227,26 @@ do_configure() {
export CC_FOR_TARGET="$CC"
export GCC_FOR_TARGET="$CC"
export CXX_FOR_TARGET="$CXX"
+ export GOC_FOR_TARGET="${_triplet}-gccgo"
+ export GFORTRAN_FOR_TARGET="${_triplet}-gfortran"
_args+=" --host=$XBPS_CROSS_TRIPLET"
_args+=" --with-build-sysroot=${XBPS_CROSS_BASE}"
_args+=" --enable-sjlj-exceptions=no"
- _langs+=",fortran"
+ _langs+=",objc,obj-c++,fortran"
elif [ -z "$CHROOT_READY" ]; then
export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib"
_args+=" --build=${_triplet}"
else
- _langs="c,c++,objc,obj-c++,go,fortran,lto"
+ _langs="c,c++,objc,obj-c++,fortran,lto"
_args+=" --build=${_triplet}"
_args+=" --enable-fast-character"
fi
+ if [ "$_have_gccgo" = "yes" ]; then
+ _langs+=",go"
+ fi
+
case "$XBPS_TARGET_MACHINE" in
*-musl) _args+=" --disable-libsanitizer";;
esac
next prev parent reply other threads:[~2019-09-08 1:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-07 17:35 [PR PATCH] [WIP] gcc: update to 9.2.0 and enable gcc-go on musl voidlinux-github
2019-09-07 18:18 ` [PR PATCH] [Updated] " voidlinux-github
2019-09-07 18:18 ` voidlinux-github
2019-09-07 18:19 ` voidlinux-github
2019-09-07 18:19 ` voidlinux-github
2019-09-07 18:59 ` voidlinux-github
2019-09-07 19:01 ` voidlinux-github
2019-09-07 23:45 ` voidlinux-github
2019-09-07 23:48 ` [PR PATCH] [Updated] " voidlinux-github
2019-09-07 23:48 ` voidlinux-github
2019-09-07 23:52 ` voidlinux-github
2019-09-07 23:52 ` voidlinux-github
2019-09-08 1:20 ` voidlinux-github [this message]
2019-09-08 1:20 ` [PR PATCH] [Updated] gcc: update to 9.2.0 and enable gcc-go on musl + go and objc/objc++ on cross targets voidlinux-github
2019-09-08 1:56 ` voidlinux-github
2019-09-08 1:56 ` voidlinux-github
2019-09-08 2:27 ` voidlinux-github
2019-09-08 10:31 ` voidlinux-github
2019-09-08 15:30 ` [PR PATCH] [Updated] " voidlinux-github
2019-09-08 15:30 ` voidlinux-github
2019-09-08 19:02 ` voidlinux-github
2019-09-08 19:03 ` voidlinux-github
2019-09-08 20:12 ` [PR PATCH] [Closed]: " voidlinux-github
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190908012040.yAojGVZ-0ey1FNo1Ggusf_xtU2_pc7qIu2v8zIv5Ais@z \
--to=voidlinux-github@inbox.vuxu.org \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).