aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/205-nopie.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-07-01 12:28:16 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-07-05 17:56:14 +0000
commit5b7befa1b989315a57f4fb49b8381ce06ded96c9 (patch)
treeef08980d3525ee01131078415e2f553f7d58c156 /main/gcc/205-nopie.patch
parent25c19fed5767953094db3d80079717b8c83baa05 (diff)
downloadaports-5b7befa1b989315a57f4fb49b8381ce06ded96c9.tar.bz2
aports-5b7befa1b989315a57f4fb49b8381ce06ded96c9.tar.xz
main/gcc: upgrade to 6.1.0
- use --enable-default-pie - patch bind now, ssp-strong, fortify and as-needed to be defaults - remove gentoo esp patches as unneeded (deprecated by the above) - update ecj - remove upstreamed musl patches, add current musl patches - support musl's static pie - fix some bootstrapping related issues
Diffstat (limited to 'main/gcc/205-nopie.patch')
-rw-r--r--main/gcc/205-nopie.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/main/gcc/205-nopie.patch b/main/gcc/205-nopie.patch
new file mode 100644
index 0000000000..e3da94d105
--- /dev/null
+++ b/main/gcc/205-nopie.patch
@@ -0,0 +1,75 @@
+From b6015aca9c9cc83739fd0ed637a835119b2c4e34 Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Sat, 7 Nov 2015 02:08:05 +0000
+Subject: [PATCH 5/6] nopie
+
+---
+ gcc/configure | 27 +++++++++++++++++++++++++++
+ gcc/configure.ac | 13 +++++++++++++
+ 2 files changed, 40 insertions(+)
+
+diff --git a/gcc/configure b/gcc/configure
+index 1c6e340..7e8b5d6 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -29390,6 +29390,33 @@ fi
+ $as_echo "$gcc_cv_no_pie" >&6; }
+ if test "$gcc_cv_no_pie" = "yes"; then
+ NO_PIE_FLAG="-no-pie"
++else
++ # Check if -nopie works.
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -nopie option" >&5
++$as_echo_n "checking for -nopie option... " >&6; }
++if test "${gcc_cv_nopie+set}" = set; then :
++ $as_echo_n "(cached) " >&6
++else
++ saved_LDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -nopie"
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++int main(void) {return 0;}
++_ACEOF
++if ac_fn_cxx_try_link "$LINENO"; then :
++ gcc_cv_nopie=yes
++else
++ gcc_cv_nopie=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++ LDFLAGS="$saved_LDFLAGS"
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nopie" >&5
++$as_echo "$gcc_cv_nopie" >&6; }
++ if test "$gcc_cv_nopie" = "yes"; then
++ NO_PIE_FLAG="-nopie"
++ fi
+ fi
+
+
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 6c1dcd9..0ca7647 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -6098,6 +6098,19 @@ AC_CACHE_CHECK([for -no-pie option],
+ LDFLAGS="$saved_LDFLAGS"])
+ if test "$gcc_cv_no_pie" = "yes"; then
+ NO_PIE_FLAG="-no-pie"
++else
++ # Check if -nopie works.
++ AC_CACHE_CHECK([for -nopie option],
++ [gcc_cv_nopie],
++ [saved_LDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS -nopie"
++ AC_LINK_IFELSE([int main(void) {return 0;}],
++ [gcc_cv_nopie=yes],
++ [gcc_cv_nopie=no])
++ LDFLAGS="$saved_LDFLAGS"])
++ if test "$gcc_cv_nopie" = "yes"; then
++ NO_PIE_FLAG="-nopie"
++ fi
+ fi
+ AC_SUBST([NO_PIE_FLAG])
+
+--
+2.8.1
+