Commit 35e7db41 by Ian Lance Taylor

libgo: add -L option for libatomic when using -pthread

    
    Fixes https://gcc.gnu.org/PR84484
    
    Reviewed-on: https://go-review.googlesource.com/95436

From-SVN: r257911
parent 5d0d5d68
c6e0970f75508e209a10a7db5164d6ea3f9b28bf b4d61f028dd1623142df4130b6c660bb77474b7b
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -14209,7 +14209,7 @@ if test "${libgo_cv_lib_pthread+set}" = set; then : ...@@ -14209,7 +14209,7 @@ if test "${libgo_cv_lib_pthread+set}" = set; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
CFLAGS_hold=$CFLAGS CFLAGS_hold=$CFLAGS
CFLAGS="$CFLAGS -pthread" CFLAGS="$CFLAGS -pthread -L../libatomic/.libs"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
int i; int i;
...@@ -14226,7 +14226,8 @@ fi ...@@ -14226,7 +14226,8 @@ fi
$as_echo "$libgo_cv_lib_pthread" >&6; } $as_echo "$libgo_cv_lib_pthread" >&6; }
PTHREAD_CFLAGS= PTHREAD_CFLAGS=
if test "$libgo_cv_lib_pthread" = yes; then if test "$libgo_cv_lib_pthread" = yes; then
PTHREAD_CFLAGS=-pthread # RISC-V apparently adds -latomic when using -pthread.
PTHREAD_CFLAGS="-pthread -L../libatomic/.libs"
fi fi
......
...@@ -493,14 +493,15 @@ dnl Test whether the compiler supports the -pthread option. ...@@ -493,14 +493,15 @@ dnl Test whether the compiler supports the -pthread option.
AC_CACHE_CHECK([whether -pthread is supported], AC_CACHE_CHECK([whether -pthread is supported],
[libgo_cv_lib_pthread], [libgo_cv_lib_pthread],
[CFLAGS_hold=$CFLAGS [CFLAGS_hold=$CFLAGS
CFLAGS="$CFLAGS -pthread" CFLAGS="$CFLAGS -pthread -L../libatomic/.libs"
AC_COMPILE_IFELSE([[int i;]], AC_COMPILE_IFELSE([[int i;]],
[libgo_cv_lib_pthread=yes], [libgo_cv_lib_pthread=yes],
[libgo_cv_lib_pthread=no]) [libgo_cv_lib_pthread=no])
CFLAGS=$CFLAGS_hold]) CFLAGS=$CFLAGS_hold])
PTHREAD_CFLAGS= PTHREAD_CFLAGS=
if test "$libgo_cv_lib_pthread" = yes; then if test "$libgo_cv_lib_pthread" = yes; then
PTHREAD_CFLAGS=-pthread # RISC-V apparently adds -latomic when using -pthread.
PTHREAD_CFLAGS="-pthread -L../libatomic/.libs"
fi fi
AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CFLAGS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment