Index: config/init/hints/hpux.pm =================================================================== --- config/init/hints/hpux.pm (revision 10936) +++ config/init/hints/hpux.pm (working copy) @@ -14,7 +14,56 @@ $libs .= ' -lpthread'; } - $conf->data->set(libs => $libs); +# It is possible to have various permutations of compiler and linker on +# HP-UX: +# +# * The bundled (K&R) compiler/linker, which won't ever build parrot +# * The commercial (c89) compiler and HP linker +# * gcc with the HP linker +# * gcc with the GNU linker +# +# Ever though we may have gcc, we need to know which linker is being used +# +# Note: The only configuration currently available to me is gcc with the +# HP linker, so confirmation on other permutations would be appreciated + + my $cc_shared = $conf->data->get('cc_shared'); + my $ld_share_flags = $conf->data->get('ld_share_flags'); + + my ($rpath, $ld_libparrot_soname); + + if ($ld_share_flags eq '-b') + { + # HP linker + + $rpath = '-Wl,+s -Wl,+b -Wl,'; + + $ld_libparrot_soname = '+h libparrot$(SHARE_EXT).$(SOVERSION) '; + } + else + { + # GNU linker (based on Linux) + + $rpath = '-Wl,-rpath='; + + $ld_libparrot_soname='-Wl,-soname=libparrot$(SHARE_EXT).$(SOVERSION) '; + } + + + $conf->data->set + ( + libs => $libs, + + has_dynamic_linking => 1, + parrot_is_shared => 1, + + libparrot_shared => 'libparrot$(SHARE_EXT).$(SOVERSION)', + libparrot_shared_alias => 'libparrot$(SHARE_EXT)', + + rpath => $rpath, + + ld_libparrot_soname => $ld_libparrot_soname, + ); } 1;