This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: hppa64 libgomp patch
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Mar 2006 14:41:59 -0800 (PST)
- Subject: Patch: hppa64 libgomp patch
- Reply-to: sje at cup dot hp dot com
libgomp tests are failing on hppa64-hp-hpux* targets because the
LIB_SPEC for this target is wrong. It is not adding -lpthread to the
link line when it sees -mt or -pthread. This patch makes the LIB_SPEC
for hppa64 targets more closely match what the regular 32 bit hppa
LIB_SPEC does.
Tested on hppa64-hp-hpux11.11, it reduced the number of libgomp failures
from 400+ to 14.
OK for checkin?
Steve Ellcey
sje@cup.hp.com
2006-03-20 Steve Ellcey <sje@cup.hp.com>
PR libgomp/26384
* config/pa/pa64-hpux.h (LIB_SPEC): Fix for -mt and -pthread options.
Index: config/pa/pa64-hpux.h
===================================================================
--- config/pa/pa64-hpux.h (revision 112222)
+++ config/pa/pa64-hpux.h (working copy)
@@ -56,25 +56,25 @@ Boston, MA 02110-1301, USA. */
#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GNU_LD)
#define LIB_SPEC \
"%{!shared:\
- %{!p:%{!pg: %{static:-lpthread} -lc\
+ %{!p:%{!pg: %{static|mt|pthread:-lpthread} -lc\
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
%{p:%{!pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\
- -lprof %{static:-a archive -lpthread} -lc\
+ -lprof %{static:-a archive} %{static|mt|pthread:-lpthread} -lc\
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
%{pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\
- -lgprof %{static:-a archive -lpthread} -lc\
+ -lgprof %{static:-a archive} %{static|mt|pthread:-lpthread} -lc\
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
/usr/lib/pa20_64/milli.a"
#else
#define LIB_SPEC \
"%{!shared:\
- %{!p:%{!pg: %{static:-lpthread} -lc\
+ %{!p:%{!pg: %{static|mt|pthread:-lpthread} -lc\
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
%{p:%{!pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\
- -lprof %{static:-a archive -lpthread} -lc\
+ -lprof %{static:-a archive} %{shatic|mt|pthread:-lpthread} -lc\
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
%{pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\
- -lgprof %{static:-a archive -lpthread} -lc\
+ -lgprof %{static:-a archive} %{static|mt|pthread:-lpthread} -lc\
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
/usr/lib/pa20_64/milli.a"
#endif