Joe Conway wrote: > I'm seeing "gcc: unrecognized option `-pthreads'" over and over when > building from cvs tip. > > # pg_config --configure > '--prefix=/usr/local/pgsql-8.0' '--with-pgport=55435' '--with-perl' > '--with-tcl' '--with-tclconfig=/usr/lib' '--without-tk' '--with-python' > '--enable-nls' '--enable-debug' '--enable-cassert' '--enable-depend' > '--with-pam' '--enable-integer-datetimes' '--enable-thread-safety' > '--with-openssl' '--with-krb5' '--with-includes=/usr/include/kerberosIV' > '--with-includes=/usr/include/et' > > # uname -a > Linux jec-linux-lt 2.6.7-1.494.2.2 #1 Tue Aug 3 09:39:58 EDT 2004 i686 > i686 i386 GNU/Linux
Yep, I see that too: gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations -O1 -Wall -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wcast-align -Kthread -kthread -pthread -pthreads -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fpic -I. -I../../../src/include -I/usr/local/include/readline -I/usr/contrib/include -I../../../src/port -DFRONTEND -c -o fe-auth.o fe-auth.c gcc: unrecognized option `-Kthread' gcc: unrecognized option `-kthread' gcc: unrecognized option `-pthreads' What is happening is that config/acx_pthread.m4 is now adding any option that allows it to compile, so we get -pthread and -lpthread for Linux, among other things. The problem is that for certain flags, gcc reports the option as unrecognized, but doesn't generate an error. I can't think of how to check for such output from the compiler from configure. -- Bruce Momjian | http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster