summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/gcc/0016-invalid-tls-model.patch51
-rw-r--r--system/gcc/APKBUILD2
2 files changed, 53 insertions, 0 deletions
diff --git a/system/gcc/0016-invalid-tls-model.patch b/system/gcc/0016-invalid-tls-model.patch
new file mode 100644
index 000000000..d3b2b8ea0
--- /dev/null
+++ b/system/gcc/0016-invalid-tls-model.patch
@@ -0,0 +1,51 @@
+--- gcc-7.3.0/libgomp/configure.tgt.orig 2018-09-25 13:44:16.654561098 -0400
++++ gcc-7.3.0/libgomp/configure.tgt 2018-09-25 13:44:50.452688100 -0400
+@@ -10,23 +10,6 @@
+ # XCFLAGS Add extra compile flags to use.
+ # XLDFLAGS Add extra link flags to use.
+
+-# Optimize TLS usage by avoiding the overhead of dynamic allocation.
+-if test $gcc_cv_have_tls = yes ; then
+- case "${target}" in
+-
+- *-*-k*bsd*-gnu*)
+- ;;
+-
+- *-*-linux* | *-*-gnu*)
+- XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
+- ;;
+-
+- *-*-rtems*)
+- XCFLAGS="${XCFLAGS} -ftls-model=local-exec"
+- ;;
+- esac
+-fi
+-
+ # Since we require POSIX threads, assume a POSIX system by default.
+ config_path="posix"
+
+--- gcc-7.3.0/libitm/configure.tgt.orig 2018-09-25 13:47:31.019296903 -0400
++++ gcc-7.3.0/libitm/configure.tgt 2018-09-25 13:47:37.676322335 -0400
+@@ -27,22 +27,6 @@
+ # XCFLAGS Add extra compile flags to use.
+ # XLDFLAGS Add extra link flags to use.
+
+-# Optimize TLS usage by avoiding the overhead of dynamic allocation.
+-if test "$gcc_cv_have_tls" = yes ; then
+- case "${target}" in
+-
+- # For x86, we use slots in the TCB head for most of our TLS.
+- # The setup of those slots in beginTransaction can afford to
+- # use the global-dynamic model.
+- i[456]86-*-linux* | x86_64-*-linux*)
+- ;;
+-
+- *-*-linux*)
+- XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
+- ;;
+- esac
+-fi
+-
+ # Map the target cpu to an ARCH sub-directory. At the same time,
+ # work out any special compilation flags as necessary.
+ case "${target_cpu}" in
diff --git a/system/gcc/APKBUILD b/system/gcc/APKBUILD
index 9132db501..60f9e6366 100644
--- a/system/gcc/APKBUILD
+++ b/system/gcc/APKBUILD
@@ -145,6 +145,7 @@ source="https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz
0010-ldbl128-config.patch
0011-m68k.patch
0012-static-pie.patch
+ 0016-invalid-tls-model.patch
002_all_default-relro.patch
005_all_default-as-needed.patch
@@ -540,6 +541,7 @@ b8207c1be82b20fdad2596bb0a60469db52257456d0925bacf48b44899f4c6ece93c501347e1ffe9
66085c5555e6b91b6874d1782d5a1dc0ab1792889f9400f48cde9483f82b51b9e3a5de1efbba21a19fc5e664334f2188d0c2bc988d42335efa26118b3c85cc7f 0010-ldbl128-config.patch
cd3ba928121e8578ba9f73215e4d81ee3ebbab33e00b04cdfd62b46d21f9536297ae12dc021aad6e56f3b28d9d544727331bbe6db1e3438d7b9545b2c3250906 0011-m68k.patch
45d5bc11a89e5af77503ca06eec52d6d84e6fea0be021aaee1bcc39f8dd3c7b4baa4200cfa2b0688faa0f207d005db89c029eff32f362207aa3d2365b2f2363e 0012-static-pie.patch
+dfedf48829cff22ee836ece743de20ad467b40e86c8f4034326a4c32df35b10affd69d6b9ab3382df2871a99ad0c2e99d4342183b59f9bca7f15112eed58ec8d 0016-invalid-tls-model.patch
625c02e03c2f1db04da12cc6a086ec85790a031a13df36486243fd9569cd17f7c8ebeec91ac16cc1f87c3ec1ffe4c421153e98a9aeb5eea35943a6f015d81f50 002_all_default-relro.patch
02b725b220e540077efef741e9d457f9e004fe53ae642a138e214875d076a60f7c2f27de0ed9a4225db2030fc9c3d2c5b0414c895b9eec0f5f48fad70e2fb029 005_all_default-as-needed.patch
622fdbcbbf2feb86bd839af627ec3613c6d2c77b14d37d31165b19f73f45b3663a203efff5d224f194edb15eb62d3d5885e32f85d1b584f071e580fea4e12664 011_all_default-warn-format-security.patch