core/gcc to 9.3.0-1

This commit is contained in:
Kevin Mihelich 2020-03-14 18:08:32 +00:00
parent 0b6262f7ab
commit 7a6ba4b016
2 changed files with 51 additions and 7 deletions

View file

@ -16,10 +16,10 @@
noautobuild=1
pkgname=(gcc gcc-libs gcc-fortran gcc-objc gcc-go gcc-d)
pkgver=9.2.1+20200130
pkgver=9.3.0
_majorver=${pkgver:0:1}
_islver=0.21
pkgrel=2
pkgrel=1
pkgdesc='The GNU Compiler Collection'
arch=(x86_64)
license=(GPL LGPL FDL custom)
@ -28,26 +28,29 @@ makedepends=(binutils libmpc doxygen python jgit)
checkdepends=(dejagnu inetutils)
options=(!emptydirs !distcc)
_libdir=usr/lib/gcc/$CHOST/${pkgver%%+*}
#source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig}
_commit=6957d3e4eef1f4243eb23ff62aea06139ef4415a
source=(git://gcc.gnu.org/git/gcc.git#commit=$_commi
# _commit=6957d3e4eef1f4243eb23ff62aea06139ef4415a
# source=(git://gcc.gnu.org/git/gcc.git#commit=$_commit
source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig}
http://isl.gforge.inria.fr/isl-${_islver}.tar.xz
c89 c99
gdc_phobos_path.patch
gdc_artificial_decl.patch
gdc_thunk_weak_ref.patch
fs64270.patch
0001-ARMv5-disable-LDRD-STRD.patch)
validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org
86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos@foutrelis.com
13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com
33C235A34C46AA3FFB293709A328C3A2C3C45C06) # Jakub Jelinek <jakub@redhat.com>
sha256sums=('SKIP'
sha256sums=('71e197867611f6054aa1119b13a0c0abac12834765fe2d81f35ac57f84f742d1'
'SKIP'
'777058852a3db9500954361e294881214f6ecd4b594c00da5eee974cd6a54960'
'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931'
'2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a'
'c86372c207d174c0918d4aedf1cb79f7fc093649eb1ad8d9450dccc46849d308'
'3862757491160700ac2fb723096f6f636f30320cccc6efd9537149ed348b57d1'
'9699d7105375754f0dcf6abff87d09b270565bfc6578a13641770f3fc62d678a'
'f45160f699501568ae9e81127562395dd95b5b4a8e4d55a1615fbb00f9e4deb2'
'ac6663528a1cbea30ed9627ef41ef13f25b3cd49c31e22b45b04aa911e6f562f')
prepare() {
@ -73,7 +76,10 @@ prepare() {
patch -p1 -i "$srcdir/gdc_phobos_path.patch"
patch -p1 -i "$srcdir/gdc_artificial_decl.patch"
patch -p1 -i "$srcdir/gdc_thunk_weak_ref.patch"
#sed -i "/GDCFLAGSX=/s/-Wall/-shared-libphobos -Wall/" libphobos/configure
# Turn off SSP for nostdlib|nodefaultlibs|ffreestanding
# https://bugs.archlinux.org/task/64270
patch -p1 -i "$srcdir/fs64270.patch"
# ALARM: Specify build host types, triplet patch
[[ $CARCH == "arm" ]] && CONFIGFLAG="--host=armv5tel-unknown-linux-gnueabi --build=armv5tel-unknown-linux-gnueabi --with-arch=armv5te --with-float=soft"

38
core/gcc/fs64270.patch Normal file
View file

@ -0,0 +1,38 @@
Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
Change the buffer size.
--- a/gcc/gcc.c 2017-07-04 09:15:57.740793000 +0200
+++ b/gcc/gcc.c 2018-03-02 13:58:44.387741114 +0100
@@ -857,6 +857,12 @@ proper position among the other output f
#define LINK_GCC_C_SEQUENCE_SPEC "%G %L %G"
#endif
+#ifdef ENABLE_DEFAULT_SSP
+#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} "
+#else
+#define NO_SSP_SPEC ""
+#endif
+
#ifndef LINK_SSP_SPEC
#ifdef TARGET_LIBC_PROVIDES_SSP
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
@@ -1131,7 +1148,7 @@ static const char *cc1_options =
%{-version:--version}\
%{-help=*:--help=%*}\
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
- %{fsyntax-only:-o %j} %{-param*}\
+ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
%{coverage:-fprofile-arcs -ftest-coverage}\
%{fprofile-arcs|fprofile-generate*|coverage:\
%{!fprofile-update=singel:\
--- a/gcc/params.def 2016-03-30 09:47:40.000000000 +0200
+++ b/gcc/params.def 2016-09-19 12:56:58.443179039 +0200
@@ -673,7 +673,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT,
DEFPARAM (PARAM_SSP_BUFFER_SIZE,
"ssp-buffer-size",
"The lower bound for a buffer to be considered for stack smashing protection.",
- 8, 1, 0)
+ 4, 1, 0)
DEFPARAM (PARAM_MIN_SIZE_FOR_STACK_SHARING,
"min-size-for-stack-sharing",