* [patch] add HP-UX shared lib extension to libjava.exp
@ 2006-05-05 20:03 Andreas Tobler
2006-05-06 20:42 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Tobler @ 2006-05-05 20:03 UTC (permalink / raw)
To: Java Patches
Hello all,
obvious for main?
While testing with a shared only build on HP-UX I struggled over this one.
2006-05-05 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/lib/libjava.exp (libjava_find_lib): Add sl to the shared
library extensions.
Index: testsuite/lib/libjava.exp
===================================================================
--- testsuite/lib/libjava.exp (revision 113557)
+++ testsuite/lib/libjava.exp (working copy)
@@ -1,4 +1,4 @@
-# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
Foundation
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free
Software Foundation
proc load_gcc_lib { filename } {
global srcdir
@@ -242,7 +242,7 @@
proc libjava_find_lib {dir name} {
global base_dir
set gp [get_multilibs]
- foreach extension {so dll dylib a} {
+ foreach extension {so dll dylib sl a} {
foreach sub {.libs _libs} {
if {$gp != ""} {
if {[file exists
$gp/$dir/$sub/lib${name}.${extension}]} then {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] add HP-UX shared lib extension to libjava.exp
2006-05-05 20:03 [patch] add HP-UX shared lib extension to libjava.exp Andreas Tobler
@ 2006-05-06 20:42 ` Tom Tromey
2006-05-06 20:53 ` Andreas Tobler
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2006-05-06 20:42 UTC (permalink / raw)
To: Andreas Tobler; +Cc: Java Patches
>>>>> "Andreas" == Andreas Tobler <toa@pop.agri.ch> writes:
Andreas> 2006-05-05 Andreas Tobler <a.tobler@schweiz.ch>
Andreas> * testsuite/lib/libjava.exp (libjava_find_lib): Add sl to the shared
Andreas> library extensions.
Ok.
You may also want to fix up libjava.jni/jni.exp.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] add HP-UX shared lib extension to libjava.exp
2006-05-06 20:42 ` Tom Tromey
@ 2006-05-06 20:53 ` Andreas Tobler
2006-05-06 20:55 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Tobler @ 2006-05-06 20:53 UTC (permalink / raw)
To: tromey; +Cc: Java Patches
[-- Attachment #1: Type: text/plain, Size: 735 bytes --]
Tom Tromey wrote:
>>>>>> "Andreas" == Andreas Tobler <toa@pop.agri.ch> writes:
>
> Andreas> 2006-05-05 Andreas Tobler <a.tobler@schweiz.ch>
> Andreas> * testsuite/lib/libjava.exp (libjava_find_lib): Add sl to the shared
> Andreas> library extensions.
>
> Ok.
>
> You may also want to fix up libjava.jni/jni.exp.
Bah, I have this one since months in my tree.
Here the updated patch.
Thanks for review Tom!
Andreas
2006-05-06 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Add check for
HP-UX and add appropriate extension for shared libraries, sl.
(gcj_jni_test_one): Likewise.
* testsuite/lib/libjava.exp (libjava_find_lib): Add sl to the shared
library extensions.
[-- Attachment #2: pa-java-ts.diff --]
[-- Type: text/plain, Size: 2152 bytes --]
Index: testsuite/lib/libjava.exp
===================================================================
--- testsuite/lib/libjava.exp (revision 113576)
+++ testsuite/lib/libjava.exp (working copy)
@@ -1,4 +1,4 @@
-# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software Foundation
proc load_gcc_lib { filename } {
global srcdir
@@ -242,7 +242,7 @@
proc libjava_find_lib {dir name} {
global base_dir
set gp [get_multilibs]
- foreach extension {so dll dylib a} {
+ foreach extension {so dll dylib sl a} {
foreach sub {.libs _libs} {
if {$gp != ""} {
if {[file exists $gp/$dir/$sub/lib${name}.${extension}]} then {
Index: testsuite/libjava.jni/jni.exp
===================================================================
--- testsuite/libjava.jni/jni.exp (revision 113576)
+++ testsuite/libjava.jni/jni.exp (working copy)
@@ -10,13 +10,17 @@
set options_cxx $options
set options ""
-# apple uses a different extension for shared/dynamic libraries
+# Apple uses a different extension for shared/dynamic libraries
# so we check against powerpc-apple-darwin and set them to
-# dylib, else we assume it's .so
+# dylib.
+# HP-UX uses sl, so we check this too, otherwise we take so.
if { [istarget "*-*-darwin*"] } {
set so_extension "dylib"
set so_flag "-dynamiclib"
+ } elseif { [istarget "hppa*-hp-hpux*"] } {
+ set so_extension "sl"
+ set so_flag "-shared"
} else {
set so_extension "so"
set so_flag "-shared"
@@ -76,12 +80,15 @@
global host_triplet
global INTERPRETER
-# apple uses a different extension for shared/dynamic libraries
+# Apple uses a different extension for shared/dynamic libraries
# so we check against powerpc-apple-darwin and set them to
-# dylib, else we assume it's .so
+# dylib.
+# HP-UX uses sl, so we check this too, otherwise we take so.
if { [istarget "*-*-darwin*"] } {
set so_extension "dylib"
+ } elseif { [istarget "hppa*-hp-hpux*"] } {
+ set so_extension "sl"
} else {
set so_extension "so"
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] add HP-UX shared lib extension to libjava.exp
2006-05-06 20:53 ` Andreas Tobler
@ 2006-05-06 20:55 ` Tom Tromey
0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2006-05-06 20:55 UTC (permalink / raw)
To: Andreas Tobler; +Cc: Java Patches
>>>>> "Andreas" == Andreas Tobler <toa@pop.agri.ch> writes:
Andreas> Bah, I have this one since months in my tree.
Andreas> Here the updated patch.
Looks good, please commit.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-05-06 20:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-05 20:03 [patch] add HP-UX shared lib extension to libjava.exp Andreas Tobler
2006-05-06 20:42 ` Tom Tromey
2006-05-06 20:53 ` Andreas Tobler
2006-05-06 20:55 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).