summaryrefslogtreecommitdiff
path: root/system/gcc/0016-invalid-tls-model.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-04-19 07:34:23 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-04-19 07:34:23 +0000
commit187dc661d66da6fb33295a37aa6f84ca4f9af90d (patch)
treeb43e2e3073947f2048e8ea925f1c9e950e3e3361 /system/gcc/0016-invalid-tls-model.patch
parente4f5e187a9eaa4b7a2d2c33c18ea5c020aece30e (diff)
downloadpackages-187dc661d66da6fb33295a37aa6f84ca4f9af90d.tar.gz
packages-187dc661d66da6fb33295a37aa6f84ca4f9af90d.tar.bz2
packages-187dc661d66da6fb33295a37aa6f84ca4f9af90d.tar.xz
packages-187dc661d66da6fb33295a37aa6f84ca4f9af90d.zip
system/gcc: fix gomp/itm TLS model
Diffstat (limited to 'system/gcc/0016-invalid-tls-model.patch')
-rw-r--r--system/gcc/0016-invalid-tls-model.patch51
1 files changed, 51 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