musl-cross-make/patches/gcc-9.1.0/0013-invalid_tls_model.diff
Kevin Mark 0e455cd5ba
Support GCC 9.1.0
Rebased the patches for GCC 8.3.0 onto 9.1.0. Not all applied
cleanly, particularly the PIE patch so I had to get a little
creative. Could definitely use an extra pair of eyes on these
patches.

Independent verification of the SHA1 is always appreciated.

Verified compile with the following config.mak:

    BINUTILS_VER = 2.32
    GCC_VER = 9.1.0
    GMP_VER = 6.1.2
    MPC_VER = 1.1.0
    MPFR_VER = 4.0.2
    ISL_VER = 0.21
    LINUX_VER = 3.0.35

    COMMON_CONFIG += --disable-nls
    GCC_CONFIG += --enable-languages=c,c++
    GCC_CONFIG += --disable-libquadmath --disable-decimal-float
    GCC_CONFIG += --disable-multilib
2019-06-30 23:53:50 -04:00

56 lines
1.5 KiB
Diff

diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
index b88bf72fe..b608c55f0 100644
--- a/libgomp/configure.tgt
+++ b/libgomp/configure.tgt
@@ -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 -DUSING_INITIAL_EXEC_TLS"
- ;;
-
- *-*-rtems*)
- XCFLAGS="${XCFLAGS} -ftls-model=local-exec"
- ;;
- esac
-fi
-
# Since we require POSIX threads, assume a POSIX system by default.
config_path="posix"
diff --git a/libitm/configure.tgt b/libitm/configure.tgt
index 4c0b60203..03b1a63b5 100644
--- a/libitm/configure.tgt
+++ b/libitm/configure.tgt
@@ -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