1 #
2 # Copyright (c) 1999, 2012, 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.
8 #
9 # This code is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 # version 2 for more details (a copy is included in the LICENSE file that
13 # accompanied this code).
14 #
15 # You should have received a copy of the GNU General Public License version
16 # 2 along with this work; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 #
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 # or visit www.oracle.com if you need additional information or have any
21 # questions.
22 #
55 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
56 # Allow the user to turn off precompiled headers from the command line.
57 ifneq ($(USE_PRECOMPILED_HEADER),0)
58 PRECOMPILED_HEADER_DIR=.
59 PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled/precompiled.hpp
60 PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch
61 endif
62 endif
63
64
65 #------------------------------------------------------------------------
66 # Compiler flags
67
68 # position-independent code
69 PICFLAG = -fPIC
70
71 VM_PICFLAG/LIBJVM = $(PICFLAG)
72 VM_PICFLAG/AOUT =
73 VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO))
74
75 ifeq ($(JVM_VARIANT_ZERO), true)
76 CFLAGS += $(LIBFFI_CFLAGS)
77 endif
78 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
79 CFLAGS += $(LIBFFI_CFLAGS)
80 CFLAGS += $(LLVM_CFLAGS)
81 endif
82 CFLAGS += $(VM_PICFLAG)
83 CFLAGS += -fno-rtti
84 CFLAGS += -fno-exceptions
85 CFLAGS += -D_REENTRANT
86 CFLAGS += -fcheck-new
87 # version 4 and above support fvisibility=hidden (matches jni_x86.h file)
88 # except 4.1.2 gives pointless warnings that can't be disabled (afaik)
89 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
90 CFLAGS += -fvisibility=hidden
91 endif
92
93 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
94 ARCHFLAG/i486 = -m32 -march=i586
95 ARCHFLAG/amd64 = -m64
96 ARCHFLAG/ia64 =
97 ARCHFLAG/sparc = -m32 -mcpu=v9
98 ARCHFLAG/sparcv9 = -m64 -mcpu=v9
|
1 #
2 # Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
3 # Copyright (c) 2013 Red Hat, Inc.
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 #
6 # This code is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License version 2 only, as
8 # published by the Free Software Foundation.
9 #
10 # This code is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 # version 2 for more details (a copy is included in the LICENSE file that
14 # accompanied this code).
15 #
16 # You should have received a copy of the GNU General Public License version
17 # 2 along with this work; if not, write to the Free Software Foundation,
18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 #
20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 # or visit www.oracle.com if you need additional information or have any
22 # questions.
23 #
56 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
57 # Allow the user to turn off precompiled headers from the command line.
58 ifneq ($(USE_PRECOMPILED_HEADER),0)
59 PRECOMPILED_HEADER_DIR=.
60 PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled/precompiled.hpp
61 PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch
62 endif
63 endif
64
65
66 #------------------------------------------------------------------------
67 # Compiler flags
68
69 # position-independent code
70 PICFLAG = -fPIC
71
72 VM_PICFLAG/LIBJVM = $(PICFLAG)
73 VM_PICFLAG/AOUT =
74 VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO))
75
76 ifeq ($(TYPE),ZERO)
77 CFLAGS += $(LIBFFI_CFLAGS)
78 endif
79 ifeq ($(TYPE),SHARK)
80 CFLAGS += $(LIBFFI_CFLAGS)
81 CFLAGS += $(LLVM_CFLAGS)
82 endif
83 CFLAGS += $(VM_PICFLAG)
84 CFLAGS += -fno-rtti
85 CFLAGS += -fno-exceptions
86 CFLAGS += -D_REENTRANT
87 CFLAGS += -fcheck-new
88 # version 4 and above support fvisibility=hidden (matches jni_x86.h file)
89 # except 4.1.2 gives pointless warnings that can't be disabled (afaik)
90 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
91 CFLAGS += -fvisibility=hidden
92 endif
93
94 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
95 ARCHFLAG/i486 = -m32 -march=i586
96 ARCHFLAG/amd64 = -m64
97 ARCHFLAG/ia64 =
98 ARCHFLAG/sparc = -m32 -mcpu=v9
99 ARCHFLAG/sparcv9 = -m64 -mcpu=v9
|