aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-08-05 13:46:33 +0200
committerpespin <pespin@sysmocom.de>2019-08-06 08:10:48 +0000
commite188b8cd98f599468fbb200c7d590de955daf761 (patch)
tree1ae76ce3e018a19282bacb8b68097ee7cc98a2a4 /configure.ac
parentf65278f807da1a5af6b9b76d943c64cb18ebc7c2 (diff)
configure: Autodetect TLS bug on ARM with old gcc and apply workaround
Check if compiler being used contains the bug. GCC 7.3.0 is the oldest version containing the fix, and version 6.3.0 is known to contain the bug. Bug is only known to appear so far only on ARM32. If the bug is present, gcc will generate a wrong binary which wil lend up segfaulting when accessing TLS (__thread) variables under certain conditions. Related: OS#4062 Related: SYS#4628 Change-Id: I8acc2cf41b73da0c3290f1cefd79f2bc68b0e77d
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d717a0bb..3764e29e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,6 +122,10 @@ AC_DEFUN([CHECK_TM_INCLUDES_TM_GMTOFF], [
CHECK_TM_INCLUDES_TM_GMTOFF
+dnl Check if We need to apply workaround for TLS bug on ARM platform for GCC < 7.3.0:
+CHECK_TLS_GCC_ARM_BUG
+CFLAGS="$CFLAGS $TLS_GCC_ARM_BUG_CFLAGS"
+
dnl Generate the output
AC_CONFIG_HEADER(config.h)