This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC 4.9.0 Release Candidate available from gcc.gnu.org


On Thu, Apr 17, 2014 at 02:04:03PM +0200, Jakub Jelinek wrote:
> Ugh, I guess depends on how the patch looks like.
> In any case, I think libgomp contains pretty much the same hunk as cilkrts,
> so why you don't run into issues in libgomp and only in libcilkrts?
> 
> # Check to see if -pthread or -lpthread is needed.  Prefer the former.
> # In case the pthread.h system header is not found, this test will fail.
> XPCFLAGS=""
> CFLAGS="$CFLAGS -pthread"
> AC_LINK_IFELSE(
>  [AC_LANG_PROGRAM(
>   [#include <pthread.h>
>    void *g(void *d) { return NULL; }],
>   [pthread_t t; pthread_create(&t,NULL,g,NULL);])],
>  [XPCFLAGS=" -Wc,-pthread"],
>  [CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS"
>   AC_LINK_IFELSE(
>    [AC_LANG_PROGRAM(
>     [#include <pthread.h>
>      void *g(void *d) { return NULL; }],
>     [pthread_t t; pthread_create(&t,NULL,g,NULL);])],
>    [],
>    [AC_MSG_ERROR([Pthreads are required to build libgomp])])])

Ah, I see, while it checks for that, it then happily ignores it.
libgomp instead propagates it into XCFLAGS and LIBS vars that are
substituted in the Makefile and used for the build, libcilkrts
hardcodes -lpthread.

I guess I'd prefer to see this fixed on the trunk first and then backported
to 4.9.1.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]