1 #
2 # Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
26 ################################################################################
27 # Create the libjsig.so shared library
28
29 default: all
30
31 include $(SPEC)
32 include MakeBase.gmk
33 include NativeCompilation.gmk
34
35 ifneq ($(OPENJDK_TARGET_OS), windows)
36 ifeq ($(STATIC_BUILD), false)
37 ifeq ($(OPENJDK_TARGET_OS), linux)
38 LIBJSIG_CFLAGS := -fPIC -D_GNU_SOURCE -D_REENTRANT $(EXTRA_CFLAGS)
39 LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE) $(EXTRA_CFLAGS)
40 LIBJSIG_LIBS := $(LIBDL)
41
42 # NOTE: The old build compiled this library without -soname.
43 # To emulate this, we need to clear out SET_SHARED_LIBRARY_NAME.
44 SET_SHARED_LIBRARY_NAME :=
45
46 # Flags for other CPUs can be provided in EXTRA_CFLAGS
47 ifeq ($(OPENJDK_TARGET_CPU), x86_64)
48 LIBJSIG_CPU_FLAGS := -m64
49 else ifeq ($(OPENJDK_TARGET_CPU), x86)
50 LIBJSIG_CPU_FLAGS := -m32 -march=i586
51 else ifeq ($(OPENJDK_TARGET_CPU), ppc64)
52 LIBJSIG_CPU_FLAGS := -mcpu=powerpc64 -mtune=power5
53 else ifeq ($(OPENJDK_TARGET_CPU), ppc64le)
54 LIBJSIG_CPU_FLAGS := -DABI_ELFv2 -mcpu=power8 -mtune=power8
55 else ifeq ($(OPENJDK_TARGET_CPU), s390x)
56 LIBJSIG_CPU_FLAGS := -mbackchain -march=z10
57 endif
58
59 else ifeq ($(OPENJDK_TARGET_OS), solaris)
|
1 #
2 # Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
26 ################################################################################
27 # Create the libjsig.so shared library
28
29 default: all
30
31 include $(SPEC)
32 include MakeBase.gmk
33 include NativeCompilation.gmk
34
35 ifneq ($(OPENJDK_TARGET_OS), windows)
36 ifeq ($(STATIC_BUILD), false)
37 ifeq ($(OPENJDK_TARGET_OS), linux)
38 LIBJSIG_CFLAGS := -fPIC -D_GNU_SOURCE -D_REENTRANT $(EXTRA_CFLAGS)
39 LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE) ${LDFLAGS_NO_EXEC_STACK} $(EXTRA_CFLAGS)
40 LIBJSIG_LIBS := $(LIBDL)
41
42 # NOTE: The old build compiled this library without -soname.
43 # To emulate this, we need to clear out SET_SHARED_LIBRARY_NAME.
44 SET_SHARED_LIBRARY_NAME :=
45
46 # Flags for other CPUs can be provided in EXTRA_CFLAGS
47 ifeq ($(OPENJDK_TARGET_CPU), x86_64)
48 LIBJSIG_CPU_FLAGS := -m64
49 else ifeq ($(OPENJDK_TARGET_CPU), x86)
50 LIBJSIG_CPU_FLAGS := -m32 -march=i586
51 else ifeq ($(OPENJDK_TARGET_CPU), ppc64)
52 LIBJSIG_CPU_FLAGS := -mcpu=powerpc64 -mtune=power5
53 else ifeq ($(OPENJDK_TARGET_CPU), ppc64le)
54 LIBJSIG_CPU_FLAGS := -DABI_ELFv2 -mcpu=power8 -mtune=power8
55 else ifeq ($(OPENJDK_TARGET_CPU), s390x)
56 LIBJSIG_CPU_FLAGS := -mbackchain -march=z10
57 endif
58
59 else ifeq ($(OPENJDK_TARGET_OS), solaris)
|