This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Threadiing Problems on AIX 4.3.3 ML-11 with gcc 3.2.3 (g++)
- From: Markus dot Schaeffer at np-gmbh dot com
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 5 Aug 2003 17:46:52 +0200
- Subject: Threadiing Problems on AIX 4.3.3 ML-11 with gcc 3.2.3 (g++)
Hello all,
I've got some strange problems on AIX 4.3.3 ML-11 / gcc 3.2.3 (I'am
using g++) / And /usr/ccs/bin/ld is used for linking.
--> Multithreading is not working.
Our application has as core a server that does dynamic loading of
sharedlibs
to call some methods like init/doWork/deinit.
The sharedlib is reintrant, so many threads (server) should be able to call
the doPost in the sharedlib.
But thread safe.....
I guess the linking options are wrong (too much!?).
Coul somebody tell me how to compile/link applications like this!
### Makefile ###
CXXFLAGS= -c -g \
-Wno-deprecated \
-D_REENTRANT -D_LIBC_REENTRANT \
-D_THREAD_SAFE -D_POSIX_SOURCE \
-pthread -fexceptions \
-fpic
LDFLAGS= -Wl,-brtl \
-Wl,-bnoipath \
-Wl,-bnoquiet \
-Wl,-bh:5 \
-pthread \
${XERCESC_LDFLAGS} \
-lc_r -lC_r -lm_r -lpthreads -lpthreads_compat \
-lgcc -lstdc++ -lstdc++ \
-ldl -lnsl -lintl
SHARED_LDFLAGS= -Wl,-brtl \
-Wl,-bE:symbols.exp \
-Wl,-binitfini:init:fini:1 \
-Wl,-bM:SRE \
-Wl,-bdynamic \
-Wl,-bnoquiet \
-Wl,-bh:5 \
-Wl,-bbigtoc \
-nostartfiles \
-pthread \
${XERCESC_LDFLAGS} \
-lc_r -lC_r -lm_r -lpthreads -lpthreads_compat \
-lgcc -lstdc++ -lstdc++ \
-ldl -lnsl -lintl
### Makefile END ###
Regards
Markus
P.S.: Sorry David for interrupt you at work.