--- old/jdk/make/lib/CoreLibraries.gmk 2016-01-20 11:43:52.833321998 +0100 +++ new/jdk/make/lib/CoreLibraries.gmk 2016-01-20 11:43:52.529321981 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 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 @@ -269,7 +269,7 @@ -export:JIMAGE_PackageToModule \ -export:JIMAGE_FindResource -export:JIMAGE_GetResource \ -export:JIMAGE_ResourceIterator, \ - LIBS_unix := -ljvm -ldl $(LIBCXX), \ + LIBS_unix := -ljvm $(LIBDL) $(LIBCXX), \ LIBS_solaris := -lc, \ LIBS_macosx := -lc++, \ LIBS_windows := jvm.lib, \ @@ -443,8 +443,9 @@ TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a endif -else ifeq ($(OPENJDK_TARGET_OS), aix) - # AIX also requires a static libjli because the compiler doesn't support '-rpath' +else ifneq ($(filter $(OPENJDK_TARGET_OS_ENV), aix bsd.netbsd), ) + # AIX and NetBSD also requires a static libjli because the compiler doesn't + # support '-rpath' $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ STATIC_LIBRARY := jli_static, \ OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \