8.0.0beta2: gcc: unrecognized option `-pthreads'
Is this pthreads warning of any concern?
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -pthread -pthreads -D_REENTRANT -D_THREAD_SAFE
-D_POSIX_PTHREAD_SEMANTICS -fpic -shared -Wl,-soname,libecpg.so.4 execute.o
typename.o descriptor.o data.o error.o prepare.o memory.o connect.o misc.o
path.o exec.o -L../../../../src/port -L../pgtypeslib -lpgtypes
-L../../../../src/interfaces/libpq -lpq -lcrypt -lm -lpthread
-Wl,-rpath,/opt/pgsql/installs/postgresql-8.0.0beta2/lib -o libecpg.so.4.2
gcc: unrecognized option `-pthreads'
Ed
Ed L. wrote:
Is this pthreads warning of any concern?
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -pthread -pthreads -D_REENTRANT -D_THREAD_SAFE
-D_POSIX_PTHREAD_SEMANTICS -fpic -shared -Wl,-soname,libecpg.so.4 execute.o
typename.o descriptor.o data.o error.o prepare.o memory.o connect.o misc.o
path.o exec.o -L../../../../src/port -L../pgtypeslib -lpgtypes
-L../../../../src/interfaces/libpq -lpq -lcrypt -lm -lpthread
-Wl,-rpath,/opt/pgsql/installs/postgresql-8.0.0beta2/lib -o libecpg.so.4.2
gcc: unrecognized option `-pthreads'
No. The problem is that the test script just tries all options and if
it doesn't error out, it uses it. Ideally we could test from configure
and ingnore meaningless options but we don't know how yet.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Bruce Momjian <pgman@candle.pha.pa.us> writes:
No. The problem is that the test script just tries all options and if
it doesn't error out, it uses it. Ideally we could test from configure
and ingnore meaningless options but we don't know how yet.
Drop any options that cause the compiler to write anything on stderr.
regards, tom lane
Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
No. The problem is that the test script just tries all options and if
it doesn't error out, it uses it. Ideally we could test from configure
and ingnore meaningless options but we don't know how yet.Drop any options that cause the compiler to write anything on stderr.
OK, the configure test is:
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes], [acx_pthread_ok=no])
Seems we can't just jump in there and grab stderr so I added the
following code to CVS which should do the trick.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachments:
/bjm/difftext/plainDownload+42-14
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
No. The problem is that the test script just tries all options and if
it doesn't error out, it uses it. Ideally we could test from configure
and ingnore meaningless options but we don't know how yet.Drop any options that cause the compiler to write anything on stderr.
OK, the configure test is:
BTW, I had some second thoughts about this later: if the compiler
generates warnings only for certain *combinations* of switches, it
seems likely that a simplistic test would get things wrong. Let's
try this patch, but be alert for possible problems.
regards, tom lane
Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
Tom Lane wrote:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
No. The problem is that the test script just tries all options and if
it doesn't error out, it uses it. Ideally we could test from configure
and ingnore meaningless options but we don't know how yet.Drop any options that cause the compiler to write anything on stderr.
OK, the configure test is:
BTW, I had some second thoughts about this later: if the compiler
generates warnings only for certain *combinations* of switches, it
seems likely that a simplistic test would get things wrong. Let's
try this patch, but be alert for possible problems.
Ah, but we test the accumulation of flags, not just each flag in
isolation:
LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
so we should be fine.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073