From 1ba6d00a720be6b9579d76d844b1536b0ea81a89 Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Mon, 5 Dec 2016 17:56:20 +0100 Subject: [PATCH] 8066474: Remove the lib/ directory from Linux and Solaris images Reviewed-by: tbell, ihse --- jdk/make/copy/Copy-java.base.gmk | 3 +- jdk/make/copy/Copy-java.desktop.gmk | 4 +- jdk/make/launcher/Launcher-java.base.gmk | 4 +- jdk/make/launcher/LauncherCommon.gmk | 8 +-- jdk/make/lib/CoreLibraries.gmk | 3 - .../macosx/native/libjli/java_md_macosx.c | 31 +++------- .../unix/classes/java/lang/ProcessImpl.java | 6 +- jdk/src/java.base/unix/native/libjli/ergo.c | 2 +- .../java.base/unix/native/libjli/ergo_i586.c | 4 +- .../java.base/unix/native/libjli/java_md.h | 6 +- .../unix/native/libjli/java_md_solinux.c | 61 ++++++++----------- .../java.base/windows/native/libjli/java_md.c | 20 +----- jdk/test/java/awt/JAWT/Makefile.unix | 4 +- jdk/test/tools/launcher/RunpathTest.java | 4 +- 14 files changed, 57 insertions(+), 103 deletions(-) diff --git a/jdk/make/copy/Copy-java.base.gmk b/jdk/make/copy/Copy-java.base.gmk index f736866e208..5d75ddfcf41 100644 --- a/jdk/make/copy/Copy-java.base.gmk +++ b/jdk/make/copy/Copy-java.base.gmk @@ -100,8 +100,7 @@ else # Allow override by ALT_JVMCFG_SRC if it exists JVMCFG_SRC := $(if $(wildcard $(ALT_JVMCFG_SRC)),$(ALT_JVMCFG_SRC),$(JVMCFG_SRC)) endif -JVMCFG_DIR := $(LIB_DST_DIR)$(OPENJDK_TARGET_CPU_LIBDIR) -JVMCFG := $(JVMCFG_DIR)/jvm.cfg +JVMCFG := $(LIB_DST_DIR)/jvm.cfg # To do: should this also support -zeroshark? diff --git a/jdk/make/copy/Copy-java.desktop.gmk b/jdk/make/copy/Copy-java.desktop.gmk index 51db98a356a..49d6b86aeb2 100644 --- a/jdk/make/copy/Copy-java.desktop.gmk +++ b/jdk/make/copy/Copy-java.desktop.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -64,7 +64,7 @@ ifneq ($(FREETYPE_BUNDLE_LIB_PATH), ) ifeq ($(OPENJDK_TARGET_OS), windows) FREETYPE_TARGET_LIB := $(LIB_DST_DIR)/$(call SHARED_LIBRARY,freetype) else - FREETYPE_TARGET_LIB := $(LIB_DST_DIR)$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6 + FREETYPE_TARGET_LIB := $(LIB_DST_DIR)/$(call SHARED_LIBRARY,freetype).6 endif # We can't use $(install-file) in this rule because it preserves symbolic links and diff --git a/jdk/make/launcher/Launcher-java.base.gmk b/jdk/make/launcher/Launcher-java.base.gmk index 4d4b981c097..f70d90029a6 100644 --- a/jdk/make/launcher/Launcher-java.base.gmk +++ b/jdk/make/launcher/Launcher-java.base.gmk @@ -74,7 +74,7 @@ $(eval $(call SetupBuildLauncher, keytool, \ BUILD_JEXEC := BUILD_JEXEC_SRC := BUILD_JEXEC_INC := -BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR) +BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base # # UNHANDLED: @@ -138,7 +138,7 @@ endif BUILD_JSPAWNHELPER := BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/jspawnhelper JSPAWNHELPER_CFLAGS := -I$(JDK_TOPDIR)/src/java.base/unix/native/libjava -BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR) +BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base LINK_JSPAWNHELPER_OBJECTS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o BUILD_JSPAWNHELPER_LDFLAGS := diff --git a/jdk/make/launcher/LauncherCommon.gmk b/jdk/make/launcher/LauncherCommon.gmk index 1bef88f8a42..a4178039d6e 100644 --- a/jdk/make/launcher/LauncherCommon.gmk +++ b/jdk/make/launcher/LauncherCommon.gmk @@ -32,13 +32,13 @@ else ifeq ($(OPENJDK_TARGET_OS), windows) DISABLE_MAPFILES := true endif - ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN,/../lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli) + ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN,/../lib/jli) # Applications expect to be able to link against libjawt without invoking # System.loadLibrary("jawt") first. This was the behaviour described in the # devloper documentation of JAWT and what worked with OpenJDK6. ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), ) - ORIGIN_ARG += $(call SET_EXECUTABLE_ORIGIN,/../lib$(OPENJDK_TARGET_CPU_LIBDIR)) + ORIGIN_ARG += $(call SET_EXECUTABLE_ORIGIN,/../lib) endif endif @@ -190,9 +190,9 @@ define SetupBuildLauncherBody $$(ORIGIN_ARG) \ $$($1_LDFLAGS), \ LDFLAGS_linux := \ - -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli, \ + -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jli, \ LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \ - -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR)/jli, \ + -L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jli, \ MAPFILE := $$($1_MAPFILE), \ LIBS := $(JDKEXE_LIBS) $$($1_LIBS), \ LIBS_unix := $$($1_LIBS_unix), \ diff --git a/jdk/make/lib/CoreLibraries.gmk b/jdk/make/lib/CoreLibraries.gmk index 345c4253389..18e4349c257 100644 --- a/jdk/make/lib/CoreLibraries.gmk +++ b/jdk/make/lib/CoreLibraries.gmk @@ -324,9 +324,6 @@ endif LIBJLI_CFLAGS += $(addprefix -I, $(LIBJLI_SRC_DIRS)) -# Append defines depending on target platform -LIBJLI_CFLAGS += $(OPENJDK_TARGET_CPU_JLI_CFLAGS) - ifneq ($(USE_EXTERNAL_LIBZ), true) LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS) LIBJLI_EXTRA_FILES += \ diff --git a/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c b/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c index 8205f12f5d4..e299a7e8671 100644 --- a/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c +++ b/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c @@ -171,8 +171,6 @@ struct NSAppArgs { * Main */ -#define GetArch() GetArchPath(CURRENT_DATA_MODEL) - /* Store the name of the executable once computed */ static char *execname = NULL; @@ -184,16 +182,6 @@ GetExecName() { return execname; } -const char * -GetArchPath(int nbits) -{ - switch(nbits) { - default: - return LIBARCHNAME; - } -} - - /* * Exports the JNI interface from libjli * @@ -211,7 +199,7 @@ static InvocationFunctions *GetExportedJNIFunctions() { if (sExportedJNIFunctions != NULL) return sExportedJNIFunctions; char jrePath[PATH_MAX]; - jboolean gotJREPath = GetJREPath(jrePath, sizeof(jrePath), GetArch(), JNI_FALSE); + jboolean gotJREPath = GetJREPath(jrePath, sizeof(jrePath), JNI_FALSE); if (!gotJREPath) { JLI_ReportErrorMessage("Failed to GetJREPath()"); return NULL; @@ -229,7 +217,7 @@ static InvocationFunctions *GetExportedJNIFunctions() { } char jvmPath[PATH_MAX]; - jboolean gotJVMPath = GetJVMPath(jrePath, preferredJVM, jvmPath, sizeof(jvmPath), GetArch(), CURRENT_DATA_MODEL); + jboolean gotJVMPath = GetJVMPath(jrePath, preferredJVM, jvmPath, sizeof(jvmPath), CURRENT_DATA_MODEL); if (!gotJVMPath) { JLI_ReportErrorMessage("Failed to GetJVMPath()"); return NULL; @@ -390,7 +378,6 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, /* Check data model flags, and exec process, if needed */ { - char *arch = (char *)GetArch(); /* like sparc or sparcv9 */ char * jvmtype = NULL; int argc = *pargc; char **argv = *pargv; @@ -462,7 +449,7 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, jvmpath does not exist */ if (wanted == running) { /* Find out where the JRE is that we will be using. */ - if (!GetJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { + if (!GetJREPath(jrepath, so_jrepath, JNI_FALSE) ) { JLI_ReportErrorMessage(JRE_ERROR1); exit(2); } @@ -481,7 +468,7 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, exit(4); } - if (!GetJVMPath(jrepath, jvmtype, jvmpath, so_jvmpath, arch, wanted)) { + if (!GetJVMPath(jrepath, jvmtype, jvmpath, so_jvmpath, wanted)) { JLI_ReportErrorMessage(CFG_ERROR8, jvmtype, jvmpath); exit(4); } @@ -502,7 +489,7 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, #if defined(DUAL_MODE) if (running != wanted) { /* Find out where the JRE is that we will be using. */ - if (!GetJREPath(jrepath, so_jrepath, GetArchPath(wanted), JNI_TRUE)) { + if (!GetJREPath(jrepath, so_jrepath, JNI_TRUE)) { /* give up and let other code report error message */ JLI_ReportErrorMessage(JRE_ERROR2, wanted); exit(1); @@ -526,7 +513,7 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, } /* exec child can do error checking on the existence of the path */ - jvmpathExists = GetJVMPath(jrepath, jvmtype, jvmpath, so_jvmpath, GetArchPath(wanted), wanted); + jvmpathExists = GetJVMPath(jrepath, jvmtype, jvmpath, so_jvmpath, wanted); } #else /* ! DUAL_MODE */ JLI_ReportErrorMessage(JRE_ERROR2, wanted); @@ -579,7 +566,7 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, */ static jboolean GetJVMPath(const char *jrepath, const char *jvmtype, - char *jvmpath, jint jvmpathsize, const char * arch, int bitsWanted) + char *jvmpath, jint jvmpathsize, int bitsWanted) { struct stat s; @@ -613,7 +600,7 @@ GetJVMPath(const char *jrepath, const char *jvmtype, * Find path to JRE based on .exe's location or registry settings. */ static jboolean -GetJREPath(char *path, jint pathsize, const char * arch, jboolean speculative) +GetJREPath(char *path, jint pathsize, jboolean speculative) { char libjava[MAXPATHLEN]; @@ -841,7 +828,7 @@ static void* hSplashLib = NULL; void* SplashProcAddress(const char* name) { if (!hSplashLib) { char jrePath[PATH_MAX]; - if (!GetJREPath(jrePath, sizeof(jrePath), GetArch(), JNI_FALSE)) { + if (!GetJREPath(jrePath, sizeof(jrePath), JNI_FALSE)) { JLI_ReportErrorMessage(JRE_ERROR1); return NULL; } diff --git a/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java b/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java index f26b0108fed..78d9f7fc061 100644 --- a/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java +++ b/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -109,13 +109,9 @@ final class ProcessImpl extends Process { private String helperPath(String javahome, String osArch) { switch (this) { case SOLARIS: - if (osArch.equals("x86")) { osArch = "i386"; } - else if (osArch.equals("x86_64")) { osArch = "amd64"; } // fall through... case LINUX: case AIX: - return javahome + "/lib/" + osArch + "/jspawnhelper"; - case BSD: return javahome + "/lib/jspawnhelper"; diff --git a/jdk/src/java.base/unix/native/libjli/ergo.c b/jdk/src/java.base/unix/native/libjli/ergo.c index 2047087e7c5..461303a2930 100644 --- a/jdk/src/java.base/unix/native/libjli/ergo.c +++ b/jdk/src/java.base/unix/native/libjli/ergo.c @@ -91,7 +91,7 @@ ServerClassMachineImpl(void) { result = JNI_TRUE; } } - JLI_TraceLauncher("unix_" LIBARCHNAME "_ServerClassMachine: %s\n", + JLI_TraceLauncher("unix_ServerClassMachine: %s\n", (result == JNI_TRUE ? "JNI_TRUE" : "JNI_FALSE")); return result; } diff --git a/jdk/src/java.base/unix/native/libjli/ergo_i586.c b/jdk/src/java.base/unix/native/libjli/ergo_i586.c index f2421700289..0df40da0b09 100644 --- a/jdk/src/java.base/unix/native/libjli/ergo_i586.c +++ b/jdk/src/java.base/unix/native/libjli/ergo_i586.c @@ -99,7 +99,7 @@ ServerClassMachineImpl(void) { result = JNI_TRUE; } } - JLI_TraceLauncher("solaris_" LIBARCHNAME "_ServerClassMachine: %s\n", + JLI_TraceLauncher("solaris_ServerClassMachine: %s\n", (result == JNI_TRUE ? "true" : "false")); return result; } @@ -193,7 +193,7 @@ ServerClassMachineImpl(void) { result = JNI_TRUE; } } - JLI_TraceLauncher("linux_" LIBARCHNAME "_ServerClassMachine: %s\n", + JLI_TraceLauncher("linux_ServerClassMachine: %s\n", (result == JNI_TRUE ? "true" : "false")); return result; } diff --git a/jdk/src/java.base/unix/native/libjli/java_md.h b/jdk/src/java.base/unix/native/libjli/java_md.h index 8e95aced972..f0eaa302bd3 100644 --- a/jdk/src/java.base/unix/native/libjli/java_md.h +++ b/jdk/src/java.base/unix/native/libjli/java_md.h @@ -54,10 +54,8 @@ char *FindExecName(char *program); const char *SetExecname(char **argv); const char *GetExecName(); static jboolean GetJVMPath(const char *jrepath, const char *jvmtype, - char *jvmpath, jint jvmpathsize, const char * arch, - int bitsWanted); -static jboolean GetJREPath(char *path, jint pathsize, const char * arch, - jboolean speculative); + char *jvmpath, jint jvmpathsize, int bitsWanted); +static jboolean GetJREPath(char *path, jint pathsize, jboolean speculative); #if defined(_AIX) #include "java_md_aix.h" diff --git a/jdk/src/java.base/unix/native/libjli/java_md_solinux.c b/jdk/src/java.base/unix/native/libjli/java_md_solinux.c index b9091aaead3..30ee9b975a2 100644 --- a/jdk/src/java.base/unix/native/libjli/java_md_solinux.c +++ b/jdk/src/java.base/unix/native/libjli/java_md_solinux.c @@ -52,9 +52,6 @@ #endif #ifdef __solaris__ -# ifndef LIBARCHNAME -# error "The macro LIBARCHNAME was not defined on the compile line" -# endif # include # include # include @@ -188,12 +185,13 @@ JvmExists(const char *path) { return JNI_FALSE; } /* - * contains a lib/$LIBARCHNAME/{server,client}/libjvm.so ? + * contains a lib/{server,client}/libjvm.so ? */ static jboolean ContainsLibJVM(const char *env) { - char clientPattern[PATH_MAX + 1]; - char serverPattern[PATH_MAX + 1]; + /* the usual suspects */ + char clientPattern[] = "lib/client"; + char serverPattern[] = "lib/server"; char *envpath; char *path; jboolean clientPatternFound; @@ -204,10 +202,6 @@ ContainsLibJVM(const char *env) { return JNI_FALSE; } - /* the usual suspects */ - JLI_Snprintf(clientPattern, PATH_MAX, "lib/%s/client", LIBARCHNAME); - JLI_Snprintf(serverPattern, PATH_MAX, "lib/%s/server", LIBARCHNAME); - /* to optimize for time, test if any of our usual suspects are present. */ clientPatternFound = JLI_StrStr(env, clientPattern) != NULL; serverPatternFound = JLI_StrStr(env, serverPattern) != NULL; @@ -322,7 +316,6 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, /* Check data model flags, and exec process, if needed */ { - char *arch = LIBARCHNAME; /* like sparc or sparcv9 */ char * jvmtype = NULL; int argc = *pargc; char **argv = *pargv; @@ -408,12 +401,12 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, jvmpath does not exist */ if (wanted == running) { /* Find out where the JRE is that we will be using. */ - if (!GetJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { + if (!GetJREPath(jrepath, so_jrepath, JNI_FALSE) ) { JLI_ReportErrorMessage(JRE_ERROR1); exit(2); } - JLI_Snprintf(jvmcfg, so_jvmcfg, "%s%slib%s%s%sjvm.cfg", - jrepath, FILESEP, FILESEP, arch, FILESEP); + JLI_Snprintf(jvmcfg, so_jvmcfg, "%s%slib%s%sjvm.cfg", + jrepath, FILESEP, FILESEP, FILESEP); /* Find the specified JVM type */ if (ReadKnownVMs(jvmcfg, JNI_FALSE) < 1) { JLI_ReportErrorMessage(CFG_ERROR7); @@ -427,7 +420,7 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, exit(4); } - if (!GetJVMPath(jrepath, jvmtype, jvmpath, so_jvmpath, arch, 0 )) { + if (!GetJVMPath(jrepath, jvmtype, jvmpath, so_jvmpath, 0 )) { JLI_ReportErrorMessage(CFG_ERROR8, jvmtype, jvmpath); exit(4); } @@ -457,8 +450,8 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, * We will set the LD_LIBRARY_PATH as follows: * * o $JVMPATH (directory portion only) - * o $JRE/lib/$LIBARCHNAME - * o $JRE/../lib/$LIBARCHNAME + * o $JRE/lib + * o $JRE/../lib * * followed by the user's previous effective LD_LIBRARY_PATH, if * any. @@ -518,10 +511,10 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, jvmpath = JLI_StringDup(jvmpath); new_runpath_size = ((runpath != NULL) ? JLI_StrLen(runpath) : 0) + - 2 * JLI_StrLen(jrepath) + 2 * JLI_StrLen(arch) + + 2 * JLI_StrLen(jrepath) + #ifdef AIX /* On AIX we additionally need 'jli' in the path because ld doesn't support $ORIGIN. */ - JLI_StrLen(jrepath) + JLI_StrLen(arch) + JLI_StrLen("/lib//jli:") + + JLI_StrLen(jrepath) + JLI_StrLen("/lib//jli:") + #endif JLI_StrLen(jvmpath) + 52; new_runpath = JLI_MemAlloc(new_runpath_size); @@ -539,17 +532,17 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, sprintf(new_runpath, LD_LIBRARY_PATH "=" "%s:" - "%s/lib/%s:" + "%s/lib:" #ifdef AIX - "%s/lib/%s/jli:" /* Needed on AIX because ld doesn't support $ORIGIN. */ + "%s/lib/jli:" /* Needed on AIX because ld doesn't support $ORIGIN. */ #endif - "%s/../lib/%s", + "%s/../lib", jvmpath, - jrepath, arch, + jrepath, #ifdef AIX - jrepath, arch, + jrepath, #endif - jrepath, arch + jrepath ); @@ -638,14 +631,14 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, */ static jboolean GetJVMPath(const char *jrepath, const char *jvmtype, - char *jvmpath, jint jvmpathsize, const char * arch, int bitsWanted) + char *jvmpath, jint jvmpathsize, int bitsWanted) { struct stat s; if (JLI_StrChr(jvmtype, '/')) { JLI_Snprintf(jvmpath, jvmpathsize, "%s/" JVM_DLL, jvmtype); } else { - JLI_Snprintf(jvmpath, jvmpathsize, "%s/lib/%s/%s/" JVM_DLL, jrepath, arch, jvmtype); + JLI_Snprintf(jvmpath, jvmpathsize, "%s/lib/%s/" JVM_DLL, jrepath, jvmtype); } JLI_TraceLauncher("Does `%s' exist ... ", jvmpath); @@ -663,14 +656,14 @@ GetJVMPath(const char *jrepath, const char *jvmtype, * Find path to JRE based on .exe's location or registry settings. */ static jboolean -GetJREPath(char *path, jint pathsize, const char * arch, jboolean speculative) +GetJREPath(char *path, jint pathsize, jboolean speculative) { char libjava[MAXPATHLEN]; struct stat s; if (GetApplicationHome(path, pathsize)) { /* Is JRE co-located with the application? */ - JLI_Snprintf(libjava, sizeof(libjava), "%s/lib/%s/" JAVA_DLL, path, arch); + JLI_Snprintf(libjava, sizeof(libjava), "%s/lib/" JAVA_DLL, path); if (access(libjava, F_OK) == 0) { JLI_TraceLauncher("JRE path is %s\n", path); return JNI_TRUE; @@ -681,7 +674,7 @@ GetJREPath(char *path, jint pathsize, const char * arch, jboolean speculative) return JNI_FALSE; } /* Does the app ship a private JRE in /jre directory? */ - JLI_Snprintf(libjava, sizeof(libjava), "%s/jre/lib/%s/" JAVA_DLL, path, arch); + JLI_Snprintf(libjava, sizeof(libjava), "%s/jre/lib/" JAVA_DLL, path); if (access(libjava, F_OK) == 0) { JLI_StrCat(path, "/jre"); JLI_TraceLauncher("JRE path is %s\n", path); @@ -690,7 +683,7 @@ GetJREPath(char *path, jint pathsize, const char * arch, jboolean speculative) } if (GetApplicationHomeFromDll(path, pathsize)) { - JLI_Snprintf(libjava, sizeof(libjava), "%s/lib/%s/" JAVA_DLL, path, arch); + JLI_Snprintf(libjava, sizeof(libjava), "%s/lib/" JAVA_DLL, path); if (stat(libjava, &s) == 0) { JLI_TraceLauncher("JRE path is %s\n", path); return JNI_TRUE; @@ -856,12 +849,12 @@ void* SplashProcAddress(const char* name) { char jrePath[MAXPATHLEN]; char splashPath[MAXPATHLEN]; - if (!GetJREPath(jrePath, sizeof(jrePath), LIBARCHNAME, JNI_FALSE)) { + if (!GetJREPath(jrePath, sizeof(jrePath), JNI_FALSE)) { JLI_ReportErrorMessage(JRE_ERROR1); return NULL; } - ret = JLI_Snprintf(splashPath, sizeof(splashPath), "%s/lib/%s/%s", - jrePath, LIBARCHNAME, SPLASHSCREEN_SO); + ret = JLI_Snprintf(splashPath, sizeof(splashPath), "%s/lib/%s", + jrePath, SPLASHSCREEN_SO); if (ret >= (int) sizeof(splashPath)) { JLI_ReportErrorMessage(JRE_ERROR11); diff --git a/jdk/src/java.base/windows/native/libjli/java_md.c b/jdk/src/java.base/windows/native/libjli/java_md.c index 1db3c408740..b08bef3b744 100644 --- a/jdk/src/java.base/windows/native/libjli/java_md.c +++ b/jdk/src/java.base/windows/native/libjli/java_md.c @@ -150,22 +150,6 @@ IsJavaw() return _isjavaw; } -/* - * Returns the arch path, to get the current arch use the - * macro GetArch, nbits here is ignored for now. - */ -const char * -GetArchPath(int nbits) -{ -#ifdef _M_AMD64 - return "amd64"; -#elif defined(_M_IA64) - return "ia64"; -#else - return "i386"; -#endif -} - /* * */ @@ -207,8 +191,8 @@ CreateExecutionEnvironment(int *pargc, char ***pargv, exit(2); } - JLI_Snprintf(jvmcfg, so_jvmcfg, "%s%slib%s%s%sjvm.cfg", - jrepath, FILESEP, FILESEP, (char*)GetArch(), FILESEP); + JLI_Snprintf(jvmcfg, so_jvmcfg, "%s%slib%sjvm.cfg", + jrepath, FILESEP, FILESEP); /* Find the specified JVM type */ if (ReadKnownVMs(jvmcfg, JNI_FALSE) < 1) { diff --git a/jdk/test/java/awt/JAWT/Makefile.unix b/jdk/test/java/awt/JAWT/Makefile.unix index b3be2f9a624..978d6cee043 100644 --- a/jdk/test/java/awt/JAWT/Makefile.unix +++ b/jdk/test/java/awt/JAWT/Makefile.unix @@ -1,4 +1,4 @@ -# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,7 @@ LINK = ld J_INC = $(TESTJAVA)/include INCLUDES = -I$(J_INC) -I$(J_INC)/$(SYST) -I. -LIBS = -L$(TESTJAVA)/lib/$(ARCH) -ljawt -lX11 +LIBS = -L$(TESTJAVA)/lib -ljawt -lX11 all: $(CLASSES) libmylib.so diff --git a/jdk/test/tools/launcher/RunpathTest.java b/jdk/test/tools/launcher/RunpathTest.java index 00e757343c3..2730f5da464 100644 --- a/jdk/test/tools/launcher/RunpathTest.java +++ b/jdk/test/tools/launcher/RunpathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -64,7 +64,7 @@ public class RunpathTest extends TestHelper { } void testRpath() { - String expectedRpath = ".*RPATH.*\\$ORIGIN/../lib/" + getJreArch() + ".*"; + String expectedRpath = ".*RPATH.*\\$ORIGIN/../lib.*"; elfCheck(javaCmd, expectedRpath); }