source: trunk/openjdk/hotspot/make/os2/makefiles/compile.make

Last change on this file was 448, checked in by dmik, 9 years ago

Remove SYM file generation on OS/2.

This doesn't make any practical sense as there is embedded HLL debug
info which is much more verbose than SYM and doesn't require separate
files (it is generated when -g option is passed to gcc).

This commint also removes the dependency on mapsym.exe and wmapsym.cmd.

File size: 3.7 KB
Line 
1#
2# Copyright 1997-2009 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20# CA 95054 USA or visit www.sun.com if you need additional information or
21# have any questions.
22#
23#
24
25# Generic compiler settings
26CC = gcc
27CXX = g++
28
29CC_FLAGS = $(C_FLAGS) $(CPP_FLAGS)
30CXX_FLAGS = $(C_FLAGS) $(CPP_FLAGS)
31
32C_FLAGS = -Zomf -march=i486 -mtune=generic
33
34# We compile a lot of MSVC code which seems to silently tolerate these
35C_FLAGS += -Wno-sign-compare -Wno-write-strings
36
37CXX_FLAGS += -fno-rtti
38CXX_FLAGS += -fno-exceptions
39CXX_FLAGS += -fcheck-new
40
41# Based on BUILDARCH we add some flags and select the default compiler name
42ifeq ($(BUILDARCH),i486)
43CPP_FLAGS += -DIA32
44endif
45
46# Hotspot uses very unstrict aliasing turn this optimization off
47OPT_CFLAGS = -fno-strict-aliasing
48
49# Compile for space above time.
50ifeq ($(Variant),kernel)
51PRODUCT_OPT_OPTION = -s -Os $(OPT_CFLAGS)
52FASTDEBUG_OPT_OPTION = -s -Os $(OPT_CFLAGS)
53DEBUG_OPT_OPTION = -g
54else
55PRODUCT_OPT_OPTION = -s -O3 $(OPT_CFLAGS)
56FASTDEBUG_OPT_OPTION = -s -O3 $(OPT_CFLAGS)
57DEBUG_OPT_OPTION = -g
58endif
59
60# If NO_OPTIMIZATIONS is defined in the environment, turn everything off
61ifdef NO_OPTIMIZATIONS
62PRODUCT_OPT_OPTION = $(DEBUG_OPT_OPTION)
63FASTDEBUG_OPT_OPTION = $(DEBUG_OPT_OPTION)
64endif
65
66# Used for platform dispatching. Note that on OS/2 we pretend to be 'windows'
67# (it works in most cases and all differences are usually handled by
68# TARGET_COMPILER_gcc).
69CPP_FLAGS += -DTARGET_OS_FAMILY_windows
70CPP_FLAGS += -DTARGET_ARCH_$(Platform_arch)
71CPP_FLAGS += -DTARGET_ARCH_MODEL_$(Platform_arch_model)
72CPP_FLAGS += -DTARGET_OS_ARCH_windows_$(Platform_arch)
73CPP_FLAGS += -DTARGET_OS_ARCH_MODEL_windows_$(Platform_arch_model)
74CPP_FLAGS += -DTARGET_COMPILER_gcc
75
76# Additional define for differences not covered by TARGET_COMPILER_gcc
77CPP_FLAGS += -DTARGET_OS_FAMILY_os2
78
79# Generate dependencies
80CPP_FLAGS += -MMD -MP -MF $(@:%=%.d)
81SUFFIXES += .d
82
83# Generic linker settings
84LINK = g++
85LINK_FLAGS = \
86 -Zomf -Zmap -Zstack 0x2000 -Zhigh-mem -Zno-fork -Zno-unix
87
88ifeq ($(EMXOMFLD_TYPE), WLINK)
89 LINK_FLAGS += -Zlinker "DISABLE 1121"
90endif
91ifeq ($(EMXOMFLD_TYPE), VAC308)
92 LINK_FLAGS += -Zlinker /OPTFUNC
93endif
94
95IMPLIB = emximp
96
97# Odin SDK
98
99CPP_FLAGS += -D__WIN32OS2__ -D__i386__ -DSTRICT -D_POSIX_SOURCE \
100 -D_POSIX_C_SOURCE=200112 -D_EMX_SOURCE -D_XOPEN_SOURCE=600 \
101 -D_SVID_SOURCE -DOS2EMX_PLAIN_CHAR
102CPP_FLAGS += -I$(ALT_ODINSDK_HEADERS_PATH)/Win -I$(ALT_ODINSDK_HEADERS_PATH)
103
104PRODUCT_LINK_FLAGS += -s -L$(ALT_ODINSDK_LIB_PATH)
105FASTDEBUG_LINK_FLAGS += -s -L$(firstword $(ALT_ODINSDK_DBGLIB_PATH) $(ALT_ODINSDK_LIB_PATH))
106DEBUG_LINK_FLAGS += -g -L$(firstword $(ALT_ODINSDK_DBGLIB_PATH) $(ALT_ODINSDK_LIB_PATH))
107
108LINK_FLAGS += -lkernel32.lib -luser32.lib -lgdi32.lib -lwinspool.lib \
109 -lcomdlg32.lib -ladvapi32.lib -lshell32.lib -lole32.lib \
110 -loleaut32.lib -lWsock32.lib -lwinmm.lib -llibwrap.lib
Note: See TracBrowser for help on using the repository browser.