Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 266548 - disable-multilib breaks pthread applications on aix
Summary: disable-multilib breaks pthread applications on aix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All AIX
: High normal
Assignee: Michael Haubenwallner (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-17 15:22 UTC by Michael Haubenwallner (RETIRED)
Modified: 2009-09-29 08:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Haubenwallner (RETIRED) gentoo-dev 2009-04-17 15:22:30 UTC
On AIX, one criteria to select the multilib gcc-libraries is the '-pthread' compiler flag: When linking with -pthread, gcc uses different libgcc_s and libstdc++.

One thing is:
Mixing objects built with and without -pthread isn't a good idea in general.

Another thing is:
In Prefix, we disable multilib, so the pthread-libs are not built at all.

Now when linking C++ code, simply using STL, executables with -pthread end in coredumps like this:
> terminate called after throwing an instance of 'std::bad_cast'
>   what():  std::bad_cast
Comment 1 Michael Haubenwallner (RETIRED) gentoo-dev 2009-04-17 15:27:35 UTC
The solution is to knock out pthread as multilib-criterion, and always behave as if '-pthread' was specified, for both compiling and linking.

This already is done for gcc-3.4.6: $FILESDIR/3.4.4/aix-force-pthread.patch
Comment 2 Michael Haubenwallner (RETIRED) gentoo-dev 2009-04-17 16:12:33 UTC
Fixed for gcc-4.2.4 in r43722.
Comment 3 Fabian Groffen gentoo-dev 2009-04-28 20:05:11 UTC
any more to do here?
Comment 4 Michael Haubenwallner (RETIRED) gentoo-dev 2009-04-29 10:25:20 UTC
yes: for gcc-4.3, and 4.1 eventually.
Comment 5 Michael Haubenwallner (RETIRED) gentoo-dev 2009-09-29 08:02:28 UTC
Fixed for gcc 4.3.3/4.4.1, dropped ~ppc-aix keyword from gcc-4.3.2 in r51702.