summaryrefslogtreecommitdiff
path: root/libjava/gij.cc
diff options
context:
space:
mode:
authorfitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-07 21:46:24 +0000
committerfitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-07 21:46:24 +0000
commit30f7243e608dd7bf809ebd67daf3eaec35b1e669 (patch)
tree3059efcfea3de62c60cdca8f76c6d16830f5258a /libjava/gij.cc
parent55f80fd58ba56dcfd984c063540fccaf7e0be2f4 (diff)
downloadgcc-30f7243e608dd7bf809ebd67daf3eaec35b1e669.tar.gz
2006-06-07 Thomas Fitzsimmons <fitzsim@redhat.com>
* scripts/makemake.tcl (emit_bc_rule): Do not skip gnu-java-awt-peer-qt.lo. * configure.ac (QT_AWT): Remove conditional. Do not add gnu/java/awt/peer/qt to standard.omit. * classpath/native/jni/qt-peer/Makefile.am: Install libqtpeer.so in GCJ's versioned library directory. * classpath/gnu/java/awt/peer/qt/QtToolkit.java (initToolkit): Load libqtpeer.so unconditionally. * gij.cc (main): Do not re-exec gij. * Makefile.am: Remove lib-gnu-java-awt-peer-qt.lo build logic. (gij_LDFLAGS): Point -rpath at GCJ's versioned library directory when linking gij. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114473 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/gij.cc')
-rw-r--r--libjava/gij.cc47
1 files changed, 0 insertions, 47 deletions
diff --git a/libjava/gij.cc b/libjava/gij.cc
index 817378f8bca..b10e53b0808 100644
--- a/libjava/gij.cc
+++ b/libjava/gij.cc
@@ -14,7 +14,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <unistd.h>
static void
help ()
@@ -72,52 +71,6 @@ add_option (JvVMInitArgs& vm_args, char const* option, void const* extra)
int
main (int argc, char const** argv)
{
- // libjawt.so must be installed in GCJ's versioned directory and not
- // the main library directory so that it doesn't override other
- // libjawt.so implementations. Programs that use the AWT Native
- // Interface contain a JNI library that links to libjawt.so. We do
- // not want to require that users explicitly add GCJ's versioned
- // directory to LD_LIBRARY_PATH when running such programs.
-
- // Simply adding GCJ's versioned directory to the module load path
- // does not solve this problem since libltdl searches its module
- // load path only for object that it will dlopen; dependencies of
- // these dynamically loaded objects are searched for in
- // LD_LIBRARY_PATH.
-
- // In addition, setting LD_LIBRARY_PATH from within the current
- // process does not alter the dependency search path, since it is
- // computed on startup. This behaviour makes sense since
- // LD_LIBRARY_PATH is designed to allow users to override the path
- // set by a program. This re-spawning trick makes it impossible to
- // override, using LD_LIBRARY_PATH, the versioned directories
- // searched by gij.
-
- // Check if LD_LIBRARY_PATH is already prefixed with
- // GCJ_VERSIONED_LIBDIR. If not, export LD_LIBRARY_PATH prefixed
- // with GCJ_VERSIONED_LIBDIR and re-spawn gij.
- char *libpath = getenv (LTDL_SHLIBPATH_VAR);
- char *newpath = _Jv_PrependVersionedLibdir (libpath);
-
- if (! libpath || strcmp (libpath, newpath))
- {
- char *buffer = (char *) JvMalloc (strlen (LTDL_SHLIBPATH_VAR)
- + strlen (newpath) + 2);
- strcpy (buffer, LTDL_SHLIBPATH_VAR);
- strcat (buffer, "=");
- strcat (buffer, newpath);
- putenv (buffer);
- JvFree (newpath);
-
- int error_code = execvp (argv[0], (char* const*) argv);
-
- fprintf (stderr, "error re-spawning gij with new "
- LTDL_SHLIBPATH_VAR " value: %s\n", strerror (error_code));
-
- return error_code;
- }
- JvFree (newpath);
-
JvVMInitArgs vm_args;
bool jar_mode = false;