Enforce usage -zrelax=transtls when GNU C Compiler is used on Solaris
When GNU C Compiler is used on Solaris (11), the Thread Local Storage is completely broken. The behaviour doesn't manifest when GNU ld is used. Thus, we need to enforce usage of GNU ld when GNU C Compiler is the compiler of choice. For more background for this change, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90912
This commit is contained in:
committed by
Witold Krecicki
parent
95a8e42e57
commit
d584223653
11
configure.ac
11
configure.ac
@@ -326,6 +326,17 @@ esac
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_C99
|
||||
|
||||
#
|
||||
# Using Solaris linker with gcc on Solaris breaks Thread Local Storage
|
||||
#
|
||||
AS_CASE([$host],
|
||||
[*-solaris*],[
|
||||
AS_IF([test "$GCC" = "yes"],
|
||||
[LDFLAGS="$LDFLAGS -zrelax=transtls"
|
||||
AC_MSG_WARN([When using GNU C Compiler on Solaris, -zrelax=transtls linker flag is used to fix bug in Thread Local Storage])
|
||||
])
|
||||
])
|
||||
|
||||
#
|
||||
# CCNOOPT defaults to -O0 on gcc and disables optimization when is last
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user