[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] PATCH: fix pthread on BSD
From: |
Alan Post |
Subject: |
Re: [Chicken-hackers] PATCH: fix pthread on BSD |
Date: |
Tue, 27 Sep 2011 22:53:01 -0600 |
I believe this practice goes back to bootstrapping pthreads into
BSD, which occured after it did on Linux, wasn't terribly complete
for awhile, and for that reason required a magic gcc flag rather
than the more straightforward linking of the threads library.
I didn't know what the current status of this flag is, or how
whether it will be like this forever or be phased out. It is
still documented in OpenBSD, as you allude to here.
-Alan
On Wed, Sep 28, 2011 at 07:34:54PM +0300, Timo Myyrä wrote:
> Hi,
>
> BSD's seem to use -pthread flag instead of -lpthread to use POSIX threads.
> You can verify this by looking the -pthread flag from gcc man page of
> BSD systems.
>
> Here's patch for Makefile.bsd:
>
> --- Makefile.bsd.orig Wed Sep 28 19:26:44 2011
> +++ Makefile.bsd Wed Sep 28 19:27:04 2011
> @@ -57,7 +57,7 @@
> LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -shared
> -Wl,-R"$(RUNTIME_LINKER_PATH)" -Wl,-L.
> LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R"$(RUNTIME_LINKER_PATH)"
> LIBCHICKEN_SO_LINKER_OPTIONS =
> -Wl,-soname,lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX).so$(SONAME_VERSION)
> -LIBRARIES = -lm -lpthread
> +LIBRARIES = -lm -pthread
> NEEDS_RELINKING = yes
> USES_SONAME = yes
>
> _______________________________________________
> Chicken-hackers mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/chicken-hackers
--
.i ma'a lo bradi cu penmi gi'e du