summaryrefslogtreecommitdiff
path: root/gdb/configure.ac
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2012-04-18 15:11:57 +0000
committerJoel Brobecker <brobecker@gnat.com>2012-04-18 15:11:57 +0000
commitcf4517d88bf5586537f1468c59da6053b2aea92e (patch)
tree9d098532e69a75dc8ce85544f990b9fe863bc5c0 /gdb/configure.ac
parent35577006ff3c20b54b3563dc3a1b73b1ee8e3205 (diff)
downloadgdb-cf4517d88bf5586537f1468c59da6053b2aea92e.tar.gz
put -lpthread into LIBS instead of CONFIG_LDFLAGS.
The problem showed up on AIX when we switched from the system linker to GNU ld. What happens is that configure is adding -lpthdebug to CONFIG_LDFLAGS when AIX thread debugging support is detected. But this causes the "-lpthread" switch to be placed at the _before_ GDB's .o files (see Makefile.in): INTERNAL_LDFLAGS = [...] $(CONFIG_LDFLAGS) [...] gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) rm -f gdb$(EXEEXT) $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ -o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \ $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) And as a result of this, the linker reports an error due to some symbols in aix-thread.o not being satisfied. This patch adds the "-lpthread" switch to LIBS instead, which should be the right place to add it. gdb/ChangeLog (Tristan Gingold): * configure.ac (aix): Put -lpthread into libs. * configure: Regenerate.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r--gdb/configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index de500cc578d..03cd6665167 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1682,7 +1682,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
if test $gdb_cv_have_aix_thread_debug = yes; then
CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
- CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
+ LIBS="$LIBS -lpthdebug"
# Older versions of AIX do not provide the declaration for
# the getthrds function (it appears that it was introduced