< prev index next >
hotspot/make/bsd/makefiles/vm.make
Print this page
@@ -1,7 +1,7 @@
#
-# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 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
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
@@ -126,10 +126,21 @@
LIBS += -lm
ifeq ($(USE_CLANG),)
LIBS += -pthread
+else
+ # For non-Darwin BSD we also want pthread even with clang.
+ ifneq ($(OS_VENDOR), Darwin)
+ LIBS += -pthread
+ endif
+endif
+
+ifeq ($(USE_CLANG), true)
+ ifeq ($(OS_VENDOR), OpenBSD)
+ LIBS += -lc
+ endif
endif
# By default, link the *.o into the library, not the executable.
LINK_INTO$(LINK_INTO) = LIBJVM
@@ -304,12 +315,15 @@
LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/.
LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/..
LFLAGS_VM += -Xlinker -install_name -Xlinker @rpath/$(@F)
endif
else
+ # On FreeBSD/OpenBSD "environ" is intentionally undefined, so we can't use -z defs.
+ ifeq ($(filter $(OS_VENDOR), FreeBSD OpenBSD), )
LFLAGS_VM += -Wl,-z,defs
endif
+ endif
# JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
# get around library dependency and compatibility issues. Must use gcc not
# g++ to link.
ifeq ($(STATIC_CXX), true)
< prev index next >