This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Building on solaris with native linker


With the following patch to libtool's ltconfig I was able to build a working
libgcj.so using the native solaris 7 x86 linker. Note that my experience
directly contridicts the comment in ltconfig about "gcc -shared" not working
with C++ - its libtool's existing method that doesn't work with C++, "gcc
-shared" works just fine (at least with gcc 2.95 and solaris 7)

  [ bryce ]


Index: ltconfig
===================================================================
RCS file: /cvs/java/libgcj/ltconfig,v
retrieving revision 1.4
diff -u -r1.4 ltconfig
--- ltconfig 1999/08/03 03:16:01 1.4
+++ ltconfig 1999/12/23 00:55:02
@@ -1425,19 +1425,7 @@
     ;;

   solaris*)
-    no_undefined_flag=' -z text'
-    # $CC -shared without GNU ld will not create a library from C++
-    # object files and a static libstdc++, better avoid it by now
-    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs
$deplibs $linkopts'
-    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed
-e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs
$deplibs $linkopts~$rm $lib.exp'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_shlibpath_var=no
-    case "$host_os" in
-    solaris2.[0-5] | solaris2.[0-5].*) ;;
-    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
-    esac
+    archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-B ${wl}symbolic
${wl}-G${allow_undefined_flag} ${wl}-h ${wl}$soname -o $lib'
     ;;

   sunos4*)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]