mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 04:58:57 +00:00
configure: force use of -pthread
on Solaris
This fixes a problem with non-threadsafe errno. Ideally, this would be the use of the AX_PTHREAD macro, but it is GPL 3+ only, which is incompatible with the GPL 2 license of fish. It also would need extending to cover C++. For now, fish doesn't build on anything except GCC under Solaris anyway, so `-pthread` is the right thing to use. Work on #3340.
This commit is contained in:
parent
ee15f1b987
commit
2b0bad889a
1 changed files with 13 additions and 1 deletions
14
configure.ac
14
configure.ac
|
@ -110,7 +110,7 @@ AX_CXX_COMPILE_STDCXX_11(noext,mandatory)
|
|||
# Tell autoconf to create config.h header
|
||||
#
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
AC_CANONICAL_TARGET
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
|
||||
#
|
||||
|
@ -250,6 +250,18 @@ AC_CHECK_FILES([/proc/self/stat])
|
|||
AC_DEFINE([NCURSES_NOMACROS], [1], [Define to 1 to disable ncurses macros that conflict with the STL])
|
||||
AC_DEFINE([NOMACROS], [1], [Define to 1 to disable curses macros that conflict with the STL])
|
||||
|
||||
# Threading is excitingly broken on Solaris without adding -pthread to CXXFLAGS
|
||||
# Only support GCC for now
|
||||
dnl Ideally we would use the AX_PTHREAD macro here, but it's GPL3-licensed
|
||||
dnl ACX_PTHREAD is way too old and seems to break the OS X build
|
||||
dnl Both only check with AC_LANG(C) in any case
|
||||
case $host_os in
|
||||
solaris*)
|
||||
CXXFLAGS="$CXXFLAGS -pthread"
|
||||
CFLAGS="$CFLAGS -pthread"
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Check presense of various libraries. This is done on a per-binary
|
||||
# level, since including various extra libraries in all binaries only
|
||||
|
|
Loading…
Reference in a new issue