Re: Use of $(THREAD_CFLAGS) in CPPFLAGS

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use of $(THREAD_CFLAGS) in CPPFLAGS
Date: 2003-09-27 04:38:31
Message-ID: 200309270438.h8R4cV708356@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Actually, the most common THREAD_CFLAGS is -pthread, used by Solaris,
> > OSF, and FreeBSD 4.X. Only Linux uses -D flags for threading.
>
> So is -pthread a compile-time or link-time flag?
>
> If we need both THREAD_CPPFLAGS and THREAD_CFLAGS then let's go ahead
> and invent both.

I just did a 'man gcc' on our PostgreSQL FreeBSD server and read:

-pthread
Link a user-threaded process against libc_r instead of libc. Ob-
jects linked into user-threaded processes should be compiled
with -D_THREAD_SAFE.

so it seems it is a link flag, and they have a compile flag no one told
me about. I already have it configured as a compile flag. Let me fix
that. I am working on the thread test program so I will commit it all
at once.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2003-09-27 05:09:11 Re: pg_get_triggerdef pretty printing
Previous Message Tom Lane 2003-09-27 03:08:17 Re: Use of $(THREAD_CFLAGS) in CPPFLAGS