[arch-commits] Commit in gcc/trunk (PKGBUILD fs64270.patch)
Bartłomiej Piotrowski
bpiotrowski at archlinux.org
Thu Mar 12 21:17:26 UTC 2020
Date: Thursday, March 12, 2020 @ 21:17:26
Author: bpiotrowski
Revision: 377438
9.3.0-1
Added:
gcc/trunk/fs64270.patch
Modified:
gcc/trunk/PKGBUILD
---------------+
PKGBUILD | 24 +++++++++++++++---------
fs64270.patch | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 9 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-03-12 20:48:37 UTC (rev 377437)
+++ PKGBUILD 2020-03-12 21:17:26 UTC (rev 377438)
@@ -6,10 +6,10 @@
# NOTE: libtool requires rebuilt with each new gcc version
pkgname=(gcc gcc-libs gcc-fortran gcc-objc gcc-ada gcc-go lib32-gcc-libs 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)
@@ -18,25 +18,28 @@
checkdepends=(dejagnu inetutils)
options=(!emptydirs)
_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=$_commit
+# _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)
+ gdc_thunk_weak_ref.patch
+ fs64270.patch)
validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski at archlinux.org
86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos at foutrelis.com
13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther at gmail.com
33C235A34C46AA3FFB293709A328C3A2C3C45C06) # Jakub Jelinek <jakub at redhat.com>
-sha256sums=('SKIP'
+sha256sums=('71e197867611f6054aa1119b13a0c0abac12834765fe2d81f35ac57f84f742d1'
+ 'SKIP'
'777058852a3db9500954361e294881214f6ecd4b594c00da5eee974cd6a54960'
'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931'
'2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a'
'c86372c207d174c0918d4aedf1cb79f7fc093649eb1ad8d9450dccc46849d308'
'3862757491160700ac2fb723096f6f636f30320cccc6efd9537149ed348b57d1'
- '9699d7105375754f0dcf6abff87d09b270565bfc6578a13641770f3fc62d678a')
+ '9699d7105375754f0dcf6abff87d09b270565bfc6578a13641770f3fc62d678a'
+ 'f45160f699501568ae9e81127562395dd95b5b4a8e4d55a1615fbb00f9e4deb2')
prepare() {
[[ ! -d gcc ]] && ln -s gcc-${pkgver/+/-} gcc
@@ -58,8 +61,11 @@
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"
+
mkdir -p "$srcdir/gcc-build"
}
Added: fs64270.patch
===================================================================
--- fs64270.patch (rev 0)
+++ fs64270.patch 2020-03-12 21:17:26 UTC (rev 377438)
@@ -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",
More information about the arch-commits
mailing list