diff --git a/makefile b/makefile index 803a56a797..f128d3e1f5 100755 --- a/makefile +++ b/makefile @@ -220,9 +220,9 @@ ifneq ($(android),) $(platform-lflags) \ -lstdc++ -ifeq ($(platform),linux) - classpath-lflags += -lrt -endif + ifeq ($(platform),linux) + classpath-lflags += -lrt + endif classpath-objects = \ $(call cpp-objects,$(luni-cpps),$(luni-native),$(build)) \ @@ -1970,6 +1970,9 @@ ifeq ($(ios),true) < "$(openjdk-src)/solaris/native/java/lang/UNIXProcess_md.c" \ > $(build)/openjdk/UNIXProcess_md.c endif + if [ -f openjdk-patches/$(notdir $(<)).patch ]; then \ + ( cd $(build) && patch -p0 ) < openjdk-patches/$(notdir $(<)).patch; \ + fi $(cc) -fPIC $(openjdk-extra-cflags) $(openjdk-cflags) \ $(optimization-cflags) -w -c $(build)/openjdk/$(notdir $(<)) \ $(call output,$(@)) -Wno-return-type diff --git a/openjdk-patches/java_props_macosx.c.patch b/openjdk-patches/java_props_macosx.c.patch new file mode 100644 index 0000000000..42622f6fda --- /dev/null +++ b/openjdk-patches/java_props_macosx.c.patch @@ -0,0 +1,15 @@ +--- openjdk/java_props_macosx.c ++++ openjdk/java_props_macosx.c +@@ -37,11 +37,7 @@ + + // need dlopen/dlsym trick to avoid pulling in JavaRuntimeSupport before libjava.dylib is loaded + static void *getJRSFramework() { +- static void *jrsFwk = NULL; +- if (jrsFwk == NULL) { +- jrsFwk = dlopen("/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/JavaRuntimeSupport", RTLD_LAZY | RTLD_LOCAL); +- } +- return jrsFwk; ++ return NULL; + } + + static char *getPosixLocale(int cat) {