rebuild geeqie
[oi-userland.git] / components / runtime / openjdk-8 / patches / 0014-patch-hotspot_make_solaris_makefiles_gcc.make.patch
blob3c93e337bdd66e22bb1112d67a1c215a827a8c21
1 $NetBSD: patch-hotspot_make_solaris_makefiles_gcc.make,v 1.2 2015/07/18 07:07:42 fhajny Exp $
3 GCC support.
5 --- hotspot/make/solaris/makefiles/gcc.make.orig 2015-06-10 10:31:44.000000000 +0000
6 +++ hotspot/make/solaris/makefiles/gcc.make
7 @@ -70,11 +70,23 @@ VM_PICFLAG/LIBJVM = $(PICFLAG)
8 VM_PICFLAG/AOUT =
9 VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO))
11 +ifeq ($(JVM_VARIANT_ZERO), true)
12 + CFLAGS += $(LIBFFI_CFLAGS)
13 +endif
14 +ifeq ($(JVM_VARIANT_ZEROSHARK), true)
15 + CFLAGS += $(LIBFFI_CFLAGS)
16 + CFLAGS += $(LLVM_CFLAGS)
17 +endif
18 CFLAGS += $(VM_PICFLAG)
19 CFLAGS += -fno-rtti
20 CFLAGS += -fno-exceptions
21 CFLAGS += -D_REENTRANT
22 CFLAGS += -fcheck-new
23 +# version 4 and above support fvisibility=hidden (matches jni_x86.h file)
24 +# except 4.1.2 gives pointless warnings that can't be disabled (afaik)
25 +ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
26 + CFLAGS += -fvisibility=hidden
27 +endif
29 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
31 @@ -94,10 +107,9 @@ ISA_DIR/sparcv9=/64
32 CFLAGS += $(ARCHFLAG)
33 AOUT_FLAGS += $(ARCHFLAG)
34 LFLAGS += $(ARCHFLAG)
35 -ASFLAGS += $(ARCHFLAG)
37 ifeq ($(BUILDARCH), amd64)
38 -ASFLAGS += -march=k8 -march=amd64
39 +ASFLAGS += -march=k8 -64
40 LFLAGS += -march=k8
41 endif
43 @@ -107,6 +119,11 @@ ifdef CC_INTERP
44 CFLAGS += -DCC_INTERP
45 endif
47 +# Build for embedded targets
48 +ifdef JAVASE_EMBEDDED
49 + CFLAGS += -DJAVASE_EMBEDDED
50 +endif
52 # Keep temporary files (.ii, .s)
53 ifdef NEED_ASM
54 CFLAGS += -save-temps
55 @@ -117,9 +134,18 @@ endif
57 # Compiler warnings are treated as errors
58 WARNINGS_ARE_ERRORS = -Werror
59 -# Enable these warnings. See 'info gcc' about details on these options
60 -WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef -Wformat=2
61 -CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)
63 +# Except for a few acceptable ones
64 +# Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
65 +# conversions which might affect the values. To avoid that, we need to turn
66 +# it off explicitly.
67 +ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
68 + ACCEPTABLE_WARNINGS = -Wpointer-arith -Wsign-compare
69 +else
70 + ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef
71 +endif
73 +CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
74 # Special cases
75 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
77 @@ -177,7 +203,7 @@ MAPFLAG = -Xlinker -M -Xlinker FILENAME
78 endif
80 # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj
81 -SONAMEFLAG = -Xlinker -soname=SONAME
82 +SONAMEFLAG = -Wl,-soname=SONAME
84 # Build shared library
85 SHARED_FLAG = -shared
86 @@ -185,15 +211,32 @@ SHARED_FLAG = -shared
87 #------------------------------------------------------------------------
88 # Debug flags
90 -# Use the stabs format for debugging information (this is the default
91 -# on gcc-2.91). It's good enough, has all the information about line
92 -# numbers and local variables, and libjvm.so is only about 16M.
93 -# Change this back to "-g" if you want the most expressive format.
94 -# (warning: that could easily inflate libjvm.so to 150M!)
95 -# Note: The Itanium gcc compiler crashes when using -gstabs.
96 -DEBUG_CFLAGS/ia64 = -g
97 -DEBUG_CFLAGS/amd64 = -g
98 -DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
99 -ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
100 -DEBUG_CFLAGS += -gstabs
101 -endif
102 +# DEBUG_BINARIES uses full -g debug information for all configs
103 +ifeq ($(DEBUG_BINARIES), true)
104 + CFLAGS += -g
105 +else
106 +# Use the stabs format for debugging information (this is the default
107 +# on gcc-2.91). It's good enough, has all the information about line
108 +# numbers and local variables, and libjvm_g.so is only about 16M.
109 +# Change this back to "-g" if you want the most expressive format.
110 +# (warning: that could easily inflate libjvm_g.so to 150M!)
111 +# Note: The Itanium gcc compiler crashes when using -gstabs.
112 +DEBUG_CFLAGS/ia64 = -g
113 +DEBUG_CFLAGS/amd64 = -g
114 +DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
115 +ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
116 +DEBUG_CFLAGS += -gstabs
117 +endif
118 +endif
120 +# If we are building HEADLESS, pass on to VM
121 +# so it can set the java.awt.headless property
122 +ifdef HEADLESS
123 + CFLAGS += -DHEADLESS
124 +endif
126 +# We are building Embedded for a small device
127 +# favor code space over speed
128 +ifdef MINIMIZE_RAM_USAGE
129 + CFLAGS += -DMINIMIZE_RAM_USAGE
130 +endif