summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-22 21:33:47 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-22 21:33:47 -0500
commit1318fa654f51d5349b8b8b11657f89c4da0d1c51 (patch)
treec5458af07bdae99a25597d306104996589309fab /system
parentc8f9f3c01c830ad95cde91757a65e3660373f961 (diff)
downloadpackages-1318fa654f51d5349b8b8b11657f89c4da0d1c51.tar.gz
packages-1318fa654f51d5349b8b8b11657f89c4da0d1c51.tar.bz2
packages-1318fa654f51d5349b8b8b11657f89c4da0d1c51.tar.xz
packages-1318fa654f51d5349b8b8b11657f89c4da0d1c51.zip
system/gcc: [PD] add gcc-go, add m68k stuff, etc
Diffstat (limited to 'system')
-rw-r--r--system/gcc-libssp/APKBUILD28
-rw-r--r--system/gcc-libssp/__stack_chk_fail_local.c2
-rw-r--r--system/gcc/330-gccgo-link-to-ucontext.patch11
-rw-r--r--system/gcc/331-gccgo-use-real-off_t-type.patch30
-rw-r--r--system/gcc/332-gccgo-remove-ustat.patch153
-rw-r--r--system/gcc/APKBUILD41
6 files changed, 222 insertions, 43 deletions
diff --git a/system/gcc-libssp/APKBUILD b/system/gcc-libssp/APKBUILD
deleted file mode 100644
index a09c75307..000000000
--- a/system/gcc-libssp/APKBUILD
+++ /dev/null
@@ -1,28 +0,0 @@
-# Contributor: A. Wilcox <awilfox@adelielinux.org>
-# Maintainer: A. Wilcox <awilfox@adelielinux.org>
-pkgname=gcc-libssp
-pkgver=6.4.0
-pkgrel=0
-pkgdesc="Add libssp support to GCC for use with non-native spec files"
-url="https://code.foxkit.us/adelie/packages"
-arch="all"
-license="NCSA"
-options="!check !dbg !strip"
-depends="gcc"
-makedepends=""
-subpackages=""
-source="__stack_chk_fail_local.c"
-builddir="$srcdir"
-
-build() {
- cd "$builddir"
- ${CROSS_COMPILE}gcc $CPPFLAGS $CFLAGS -c "$srcdir"/__stack_chk_fail_local.c -o __stack_chk_fail_local.o
- ${CROSS_COMPILE}ar r libssp_nonshared.a __stack_chk_fail_local.o
-}
-
-package() {
- cd "$builddir"
- install -D -m644 libssp_nonshared.a "$pkgdir"/usr/lib/gcc/${CHOST}/${pkgver}/libssp_nonshared.a
-}
-
-sha512sums="062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c"
diff --git a/system/gcc-libssp/__stack_chk_fail_local.c b/system/gcc-libssp/__stack_chk_fail_local.c
deleted file mode 100644
index 2b403a6e0..000000000
--- a/system/gcc-libssp/__stack_chk_fail_local.c
+++ /dev/null
@@ -1,2 +0,0 @@
-extern void __stack_chk_fail(void);
-void __attribute__((visibility ("hidden"))) __stack_chk_fail_local(void) { __stack_chk_fail(); }
diff --git a/system/gcc/330-gccgo-link-to-ucontext.patch b/system/gcc/330-gccgo-link-to-ucontext.patch
new file mode 100644
index 000000000..8aa60ca54
--- /dev/null
+++ b/system/gcc/330-gccgo-link-to-ucontext.patch
@@ -0,0 +1,11 @@
+--- gcc-6.4.0/Makefile.in.old 2018-06-21 22:16:35.167781541 -0500
++++ gcc-6.4.0/Makefile.in 2018-06-22 00:36:13.849486086 -0500
+@@ -41332,7 +41332,7 @@
+ 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} \
diff --git a/system/gcc/331-gccgo-use-real-off_t-type.patch b/system/gcc/331-gccgo-use-real-off_t-type.patch
new file mode 100644
index 000000000..1c8c43e9e
--- /dev/null
+++ b/system/gcc/331-gccgo-use-real-off_t-type.patch
@@ -0,0 +1,30 @@
+--- gcc-6.4.0/libgo/go/syscall/libcall_linux.go.old 2016-02-03 15:58:02.419872000 -0600
++++ gcc-6.4.0/libgo/go/syscall/libcall_linux.go 2018-06-22 00:56:31.478280552 -0500
+@@ -355,19 +355,19 @@
+ //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)
diff --git a/system/gcc/332-gccgo-remove-ustat.patch b/system/gcc/332-gccgo-remove-ustat.patch
new file mode 100644
index 000000000..95b3cb1d2
--- /dev/null
+++ b/system/gcc/332-gccgo-remove-ustat.patch
@@ -0,0 +1,153 @@
+From bdead75ea02fa852a559f35b41453df0c47c9a66 Mon Sep 17 00:00:00 2001
+From: Ian Lance Taylor <iant@golang.org>
+Date: Fri, 22 Jun 2018 06:24:48 -0700
+Subject: [PATCH] syscall: remove Ustat
+
+glibc 2.28 removes ustat.h and the ustat function entirely, which
+breaks syscall.Ustat.
+
+Updates golang/go#25990
+
+Change-Id: I430802c86389a02cb4a0cd6caff36fa542d98f2f
+Reviewed-on: https://go-review.googlesource.com/120535
+Reviewed-by: Than McIntosh <thanm@google.com>
+---
+ libgo/config.h.in | 3 ---
+ libgo/configure | 33 ---------------------------------
+ libgo/configure.ac | 18 ------------------
+ libgo/go/syscall/libcall_linux_ustat.go | 12 ------------
+ libgo/mksysinfo.sh | 14 --------------
+ libgo/sysinfo.c | 3 ---
+ 6 files changed, 83 deletions(-)
+ delete mode 100644 libgo/go/syscall/libcall_linux_ustat.go
+
+diff --git a/libgo/config.h.in b/libgo/config.h.in
+index 57560cd0..de57d0cc 100644
+--- a/libgo/config.h.in
++++ b/libgo/config.h.in
+@@ -343,9 +343,6 @@
+ /* Define to 1 if you have the `unshare' function. */
+ #undef HAVE_UNSHARE
+
+-/* Define to 1 if you have the <ustat.h> header file and it works. */
+-#undef HAVE_USTAT_H
+-
+ /* Define to 1 if you have the `utimensat' function. */
+ #undef HAVE_UTIMENSAT
+
+diff --git a/libgo/configure b/libgo/configure
+index 66942eda..7166f940 100755
+--- a/libgo/configure
++++ b/libgo/configure
+@@ -14760,39 +14760,6 @@ fi
+ done
+
+
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <ustat.h> can be used" >&5
+-$as_echo_n "checking whether <ustat.h> can be used... " >&6; }
+-if test "${libgo_cv_c_ustat_h+set}" = set; then :
+- $as_echo_n "(cached) " >&6
+-else
+- CFLAGS_hold=$CFLAGS
+-CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE $OSCFLAGS"
+-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-
+-#include <sys/types.h>
+-#ifdef HAVE_LINUX_FILTER_H
+-#include <linux/filter.h>
+-#endif
+-#include <ustat.h>
+-
+-_ACEOF
+-if ac_fn_c_try_compile "$LINENO"; then :
+- libgo_cv_c_ustat_h=yes
+-else
+- libgo_cv_c_ustat_h=no
+-fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-CFLAGS=$CFLAGS_hold
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_c_ustat_h" >&5
+-$as_echo "$libgo_cv_c_ustat_h" >&6; }
+-if test $libgo_cv_c_ustat_h = yes; then
+-
+-$as_echo "#define HAVE_USTAT_H 1" >>confdefs.h
+-
+-fi
+-
+ if test "$ac_cv_header_sys_mman_h" = yes; then
+ HAVE_SYS_MMAN_H_TRUE=
+ HAVE_SYS_MMAN_H_FALSE='#'
+diff --git a/libgo/configure.ac b/libgo/configure.ac
+index 3cee2c0f..1c192752 100644
+--- a/libgo/configure.ac
++++ b/libgo/configure.ac
+@@ -537,24 +537,6 @@ AC_CHECK_HEADERS([linux/filter.h linux/if_addr.h linux/if_ether.h linux/if_tun.h
+ #endif
+ ])
+
+-AC_CACHE_CHECK([whether <ustat.h> can be used],
+-[libgo_cv_c_ustat_h],
+-[CFLAGS_hold=$CFLAGS
+-CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE $OSCFLAGS"
+-AC_COMPILE_IFELSE(
+-[AC_LANG_SOURCE([
+-#include <sys/types.h>
+-#ifdef HAVE_LINUX_FILTER_H
+-#include <linux/filter.h>
+-#endif
+-#include <ustat.h>
+-])], [libgo_cv_c_ustat_h=yes], [libgo_cv_c_ustat_h=no])
+-CFLAGS=$CFLAGS_hold])
+-if test $libgo_cv_c_ustat_h = yes; then
+- AC_DEFINE(HAVE_USTAT_H, 1,
+- [Define to 1 if you have the <ustat.h> header file and it works.])
+-fi
+-
+ AM_CONDITIONAL(HAVE_SYS_MMAN_H, test "$ac_cv_header_sys_mman_h" = yes)
+
+ AC_CHECK_FUNCS(strerror_r strsignal wait4 mincore setenv unsetenv dl_iterate_phdr)
+diff --git a/libgo/go/syscall/libcall_linux_ustat.go b/libgo/go/syscall/libcall_linux_ustat.go
+deleted file mode 100644
+index f515fce3..00000000
+--- a/libgo/go/syscall/libcall_linux_ustat.go
++++ /dev/null
+@@ -1,12 +0,0 @@
+-// Copyright 2015 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.
+-
+-// GNU/Linux library ustat call.
+-// This is not supported on some kernels, such as arm64.
+-// +build !arm64,!nios2,!riscv64
+-
+-package syscall
+-
+-//sys Ustat(dev int, ubuf *Ustat_t) (err error)
+-//ustat(dev _dev_t, ubuf *Ustat_t) _C_int
+diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
+index 92ecb479..48bc71db 100755
+--- a/libgo/mksysinfo.sh
++++ b/libgo/mksysinfo.sh
+@@ -1164,20 +1164,6 @@ grep '^type _sysinfo ' gen-sysinfo.go | \
+ -e 's/mem_unit/Unit/' \
+ >> ${OUT}
+
+-# The ustat struct.
+-grep '^type _ustat ' gen-sysinfo.go | \
+- sed -e 's/_ustat/Ustat_t/' \
+- -e 's/f_tfree/Tfree/' \
+- -e 's/f_tinode/Tinoe/' \
+- -e 's/f_fname/Fname/' \
+- -e 's/f_fpack/Fpack/' \
+- >> ${OUT}
+-# Force it to be defined, as on some older GNU/Linux systems the
+-# header file fails when using with <linux/filter.h>.
+-if ! grep 'type _ustat ' gen-sysinfo.go >/dev/null 2>&1; then
+- echo 'type Ustat_t struct { Tfree int32; Tinoe uint64; Fname [5+1]int8; Fpack [5+1]int8; }' >> ${OUT}
+-fi
+-
+ # The utimbuf struct.
+ grep '^type _utimbuf ' gen-sysinfo.go | \
+ sed -e 's/_utimbuf/Utimbuf/' \
diff --git a/system/gcc/APKBUILD b/system/gcc/APKBUILD
index de4431f5b..aebf3b666 100644
--- a/system/gcc/APKBUILD
+++ b/system/gcc/APKBUILD
@@ -6,26 +6,26 @@ pkgver=6.4.0
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname="$pkgname$_target"
-pkgrel=8
+pkgrel=9
pkgdesc="The GNU Compiler Collection"
url="http://gcc.gnu.org"
arch="all"
-license="GPL LGPL"
+license="GPL-3.0+ AND LGPL-2.1+"
_gccrel=$pkgver-r$pkgrel
depends="binutils$_target isl"
makedepends_build="gcc$_cross g++$_cross paxmark bison flex texinfo zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
-makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev !gettext-dev"
+makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev libucontext-dev"
subpackages=" "
-[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_target"
+[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_target gcc-lang$_target"
replaces="libstdc++ binutils"
-options="$options !check !dbg strip"
+options="$options !check !dbg strip toolchain"
: ${LANG_CXX:=true}
: ${LANG_OBJC:=true}
: ${LANG_JAVA:=true}
: ${LANG_GO:=true}
: ${LANG_FORTRAN:=true}
-: ${LANG_ADA:=true}
+: ${LANG_ADA:=false}
LIBGOMP=true
LIBGCC=true
@@ -90,12 +90,11 @@ else
_builddir="$srcdir/build"
fi
-# Go needs {set,make,swap}context, unimplemented in musl
-[ "$CTARGET_LIBC" = musl ] && LANG_GO=false
-
# libitm has TEXTRELs in ARM build, so disable for now
+# gcc itself has TEXTRELs in m68k; until this is fixed, we need it
case "$CTARGET_ARCH" in
arm*) LIBITM=false ;;
+m68k) options="$options textrels" ;;
esac
# Fortran uses libquadmath if toolchain has __float128
@@ -184,6 +183,9 @@ source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgba
300-main-gcc-add-musl-s390x-dynamic-linker.patch
310-build-gcj-s390x.patch
320-libffi-gnulinux.patch
+ 330-gccgo-link-to-ucontext.patch
+ 331-gccgo-use-real-off_t-type.patch
+ 332-gccgo-remove-ustat.patch
fix-rs6000-pie.patch
add-classic_table-support.patch
@@ -238,6 +240,7 @@ build() {
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
armv6-*-*-*eabihf) _arch_configure="--with-arch=armv6zk --with-tune=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-abi=aapcs-linux";;
armv7-*-*-*eabihf) _arch_configure="--with-arch=armv7-a --with-tune=generic-armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-abi=aapcs-linux --with-mode=thumb";;
+ m68k-*-*-*) _arch_configure="--with-arch=68020 --with-tune=68020-40";;
mipsel-*-*-*) _arch_configure="--with-arch-32=mips2 --with-tune-32=mips32 --with-fp-32=32 --with-mips-plt --with-float=hard --with-abi=32";;
mips-*-*-*) _arch_configure="--with-arch=mips3 --with-mips-plt --with-abi=32"; _hash_style="sysv";;
mips32el-*-*-*) _arch_configure="--with-arch=mips32 --with-mips-plt --with-abi=32"; _hash_style="sysv";;
@@ -254,10 +257,10 @@ build() {
musl)
# musl does not support mudflap, or libsanitizer
# libmpx uses secure_getenv and struct _libc_fpstate not present in musl
- # alpine musl provides libssp_nonshared.a, so we don't need libssp either
- _libc_configure="--disable-libssp --disable-libmpx --disable-libmudflap --disable-libsanitizer"
+ _libc_configure="--disable-libmpx --disable-libmudflap --disable-libsanitizer"
_symvers="--disable-symvers"
export libat_cv_have_ifunc=no
+ export ac_cv_type_off64_t=no
;;
esac
@@ -303,7 +306,6 @@ build() {
--disable-fixed-point \
--disable-libstdcxx-pch \
--disable-multilib \
- --disable-nls \
--disable-werror \
$_symvers \
--enable-__cxa_atexit \
@@ -474,7 +476,7 @@ java() {
paxmark -pm "$pkgdir"/$_gcclibexec/ecj1
mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib "$subpkgdir"/$_gcclibdir/
cd "$pkgdir"/usr/bin
- mv gcj gcj-dbtool gjavah gcjh jcf-dump "$subpkgdir"/usr/bin/
+ mv *gcj *gcj-dbtool *gjavah *gcjh *jcf-dump "$subpkgdir"/usr/bin/
cd "$pkgdir"
for i in $(find usr/ -name ecj1 -o -name jc1 -o -name jvgenmain); do
mkdir -p "$subpkgdir"/${i%/*}
@@ -485,6 +487,9 @@ java() {
mv "$i" "$subpkgdir"/usr/lib/
fi
done
+ mkdir -p "$subpkgdir"/usr/share/gcc-6.4.0/python
+ mv "$pkgdir"/usr/share/gcc-6.4.0/python/libjava \
+ "$subpkgdir"/usr/share/gcc-6.4.0/python
mv "$pkgdir"/usr/lib/libgij.so "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libgcj.spec "$subpkgdir"/$_gcclibdir/
}
@@ -516,6 +521,9 @@ libgcj() {
"$pkgdir"/usr/lib/security \
"$subpkgdir"/usr/lib/
+ mkdir -p "$subpkgdir"/usr/lib/pkgconfig
+ mv "$pkgdir"/usr/lib/pkgconfig/libgcj* "$subpkgdir"/usr/lib/pkgconfig/
+
mkdir -p "$subpkgdir"/usr/share/
mv "$pkgdir"/usr/share/java "$subpkgdir"/usr/share/
}
@@ -537,10 +545,15 @@ go() {
"$subpkgdir"/usr/bin
mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/
+ mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
+ mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
mv "$pkgdir"/usr/lib/libgo.a \
"$pkgdir"/usr/lib/libgo.so \
"$pkgdir"/usr/lib/libgobegin.a \
+ "$pkgdir"/usr/lib/libgolibbegin.a \
+ "$pkgdir"/usr/lib/libnetgo.a \
"$subpkgdir"/usr/lib/
}
@@ -641,6 +654,8 @@ fa44c8158111627aa0e91c43e7cc3aa38642c2041c96532dd4f0932dae4d6f92ea2850b683abcf10
4b4a0ff306a8ef34ff6e3284fbfca869012164a47ba7cb099085c1dd03e6ca0cdd462f82710e08c9a02895adc7484e4c5eef17b5aa264cf5d978fe8ad78eea93 300-main-gcc-add-musl-s390x-dynamic-linker.patch
385bc2fa50204f678964e5148c6170f572701dab920fbec8301f505bda34d182cde0adb7da042fee71719e12fb59f59181897f9b1bb4f4716ff59aad46ca1998 310-build-gcj-s390x.patch
f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45b58ba8764ab1eb575d4eb6d6dfc550a87a183f8b94e76181 320-libffi-gnulinux.patch
+8efd028febb962ae100be32f72f7450c4f77d67ad96a5f47072136cdf47043f9d54835a87c7ab5aaa0fa0108c4c7a97ba2d7732d5aaf2efce70fe1f7e1c39d6e 330-gccgo-link-to-ucontext.patch
+24c8708f64b9b7945b3f07e9bbecf17ab8bcde2524f49cbd694ca2f6146ccc3f13bb027db282f326525ea79d50a2868fa3fa2b0d688a914b5ea77bbfd7e5cbe4 331-gccgo-use-real-off_t-type.patch
01c71cd5881fc07ea3b9b980697e89b3ca0fe98502958ceafc3fca18b2604c844e2f457feab711baf8e03f00a5383b0e38aac7eb954034e306f43d4a37f165ed fix-rs6000-pie.patch
1860593584f629d24d5b6db14b0a3412e9f93449b663aaa4981301a0923db0159314905e694f27366fbfef72dce06636ab6df86862b7e9e9564847e03bee82c1 add-classic_table-support.patch
4e1b421ed72668b66ecbcb0a34afa99d2a34cb2ea9ee51c4aad605fc8a0e94e3bfbabae4ebe236efc5ec86fc01a472cbe93f36fe25cf579714939d8102a9b84a lra-pentium.patch"