[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libtool & aix & g++ & pthread
From: |
Michael Haubenwallner |
Subject: |
libtool & aix & g++ & pthread |
Date: |
Wed, 11 Jan 2006 11:24:36 +0100 |
Hi,
using libtool with aix & g++ & pthread seems to be one of the
worst combinations one can think of...
What i have:
powerpc-ibm-aix5.2.0.0
gcc-3.4.4
libtool-1.5.20 (initially without, then with some gentoo patches)
CFLAGS=-pthread
CXXFLAGS=-pthread
LDFLAGS=-Wl,-brtl
What my problem is:
gcc provides separate libstdc++.{a,la} for use with pthread and without.
When linking with libtool & g++ & pthread, i end up with an executable
depending on the non-pthreaded libstdc++, and both libgcc_s and
libgcc_s_pthread. This is definitely wrong.
What i found out:
*) works with libtool-1.5.10
*) libtool uses two different ways to ask gcc for the library pathes:
1) sys_lib_search_path_spec=`$CC -print-search-dirs | grep ...`
gcc does not print the pthread-subdir (for pthreaded-libstdc++)
with -print-search-dirs, even if -pthread would be passed.
2) output_verbose_link_cmd='$CC -shared $CFLAGS -v ... | grep "\-L"'
Here the pthread subdir comes out, because -pthread is passed from
CFLAGS, and the output is what is actually done.
*) the change of cvs-version 1.334.2.39 in ltmain.in caused my problem:
* config/ltmain.in (func_mode_link): When linking an installed
libtool library on the command line using -lfoo we need to find
the library in the search paths and add it's dependency_libs to
the link in the conv pass so that any libtool libs listed are
correctly expanded in the link pass.
What i suppose:
Shouldn't the similar change also be done for the '-L' case, to get the
libpath into newlib_search_path, which is used to find the '-l' libs ?
-haubi
libtool-1.5.20-aix-pthread.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- libtool & aix & g++ & pthread,
Michael Haubenwallner <=