1.1 --- a/make/common/Defs-windows.gmk Fri Aug 13 11:38:10 2010 -0700 1.2 +++ b/make/common/Defs-windows.gmk Mon Aug 30 14:39:42 2010 -0700 1.3 @@ -31,363 +31,7 @@ 1.4 # Get shared JDK settings 1.5 include $(BUILDDIR)/common/shared/Defs.gmk 1.6 1.7 -# CC compiler object code output directive flag value 1.8 -CC_OBJECT_OUTPUT_FLAG = -Fo 1.9 -CC_PROGRAM_OUTPUT_FLAG = -Fe 1.10 - 1.11 -# The suffix applied to the library name for FDLIBM 1.12 -FDDLIBM_SUFFIX = lib 1.13 -# The suffix applied to scripts (.bat for windows, nothing for unix) 1.14 -SCRIPT_SUFFIX = .bat 1.15 - 1.16 -HPIS = windows 1.17 -# LIB_LOCATION, which for windows identifies where .exe files go, may be 1.18 -# set by each GNUmakefile. The default is BINDIR. 1.19 -ifndef LIB_LOCATION 1.20 - LIB_LOCATION = $(BINDIR) 1.21 -endif # LIB_LOCATION 1.22 - 1.23 ifndef PLATFORM_SRC 1.24 PLATFORM_SRC = $(TOPDIR)/src/windows 1.25 endif # PLATFORM_SRC 1.26 1.27 -# for backwards compatability, the old "win32" is used here instead of 1.28 -# the more proper "windows" 1.29 -PLATFORM_INCLUDE_NAME = win32 1.30 -PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME) 1.31 - 1.32 -# The following DLL's are considered MS runtime libraries and should 1.33 -# not to be REBASEd, see deploy/make/common/Release.gmk. 1.34 -# msvcrt.dll, msvcrnn.dll [msvcr71 or msvcr80 or msvcr90] : Microsoft runtimes 1.35 -MS_RUNTIME_LIBRARIES = msvcrt.dll 1.36 -MSVCRNN_DLL = 1.37 -ifeq ($(ARCH_DATA_MODEL), 32) 1.38 - ifeq ($(COMPILER_VERSION), VS2003) 1.39 - MSVCRNN_DLL = msvcr71.dll 1.40 - MSVCPNN_DLL = msvcp71.dll 1.41 - MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL) 1.42 - endif 1.43 - ifeq ($(COMPILER_VERSION), VS2005) 1.44 - MSVCRNN_DLL = msvcr80.dll 1.45 - MSVCPNN_DLL = msvcp80.dll 1.46 - MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL) 1.47 - endif 1.48 - ifeq ($(COMPILER_VERSION), VS2008) 1.49 - MSVCRNN_DLL = msvcr90.dll 1.50 - MSVCPNN_DLL = msvcp90.dll 1.51 - MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL) 1.52 - endif 1.53 - ifeq ($(COMPILER_VERSION), VS2010) 1.54 - MSVCRNN_DLL = msvcr100.dll 1.55 - MSVCPNN_DLL = msvcp100.dll 1.56 - MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL) 1.57 - endif 1.58 -endif 1.59 - 1.60 -# C Compiler flag definitions 1.61 - 1.62 -# 1.63 -# Default optimization 1.64 -# 1.65 -ifeq ($(CC_VERSION),msvc) 1.66 - # Visual Studio .NET 2003 or VS2003 compiler option definitions: 1.67 - # -O1 Favors reduced size over speed (-Og -Os -Oy -Ob2 -Gs -GF -Gy) 1.68 - # -O2 Favors speed over reduced size (-Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy) 1.69 - # -Ox Full optimization (use -O2) (-Og -Oi -Ot -Oy -Ob2) 1.70 - # (Removed in Visual Studio 2005 or VS2005) 1.71 - # -Ob2 More aggressive inlining 1.72 - # -Og Global optimizations 1.73 - # -Oi Replace some functions with intrinsic or special forms 1.74 - # -Op Improve floating point calculations (disables some optimizations) 1.75 - # (Replaced with -fp:precise in VS2005, /Op is default now) 1.76 - # -Os Favor small code 1.77 - # -Ot Favor faster code 1.78 - # -Oy Frame pointer omission 1.79 - # -GB Optimize for pentium (old VC6 option?) 1.80 - # -G6 VS2003 version of -GB? 1.81 - # -GF Pool strings in read-only memory 1.82 - # -Gf Pool strings in read-write memory (the default) 1.83 - # -Gs Controls stack probess 1.84 - # -GS Adds buffer overflow checks on stacks 1.85 - # (Default in VS2005) 1.86 - # -GX Enables exception handling 1.87 - # (Replaced with /EHsc in VS2005) 1.88 - # -Gy Function level linking only 1.89 - # 1.90 - # NOTE: With VC6, -Ox included -Gs. 1.91 - # NOTE: With VC6, -Ox, -O1, and -O2 used -Ob1, not -Ob2. 1.92 - # NOTE: With VC6, -O1 and -O2 used -Gf, not -GF. 1.93 - # 1.94 - ifeq ($(COMPILER_VERSION), VC6) 1.95 - # VC6 (6.2) msvc compiler (the way Tiger and early Mustang were built) 1.96 - # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) 1.97 - AUTOMATIC_PCH_OPTION = 1.98 - GX_OPTION = -GX 1.99 - ifeq ($(ARCH_DATA_MODEL), 32) 1.100 - CC_HIGHEST_OPT = -Ox -Gy -Os -GB 1.101 - CC_HIGHER_OPT = -Ox -Gy -Os -GB 1.102 - CC_LOWER_OPT = -Ox -Gy -Os -GB 1.103 - else 1.104 - CC_HIGHEST_OPT = -Ox -Gy -Op 1.105 - CC_HIGHER_OPT = -Ox -Gy -Op 1.106 - CC_LOWER_OPT = -Ox -Gy -Op 1.107 - endif 1.108 - endif 1.109 - ifeq ($(COMPILER_VERSION), VS2003) 1.110 - # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) 1.111 - AUTOMATIC_PCH_OPTION = -YX 1.112 - # Also known as VC7 compiler 1.113 - GX_OPTION = -GX 1.114 - ifeq ($(ARCH_DATA_MODEL), 32) 1.115 - # Lowered opt level to try and reduce footprint, dll size especially. 1.116 - # Was: CC_HIGHEST_OPT = -O2 -G6 1.117 - # Was: CC_HIGHER_OPT = -O2 1.118 - CC_HIGHEST_OPT = -O2 1.119 - CC_HIGHER_OPT = -O1 1.120 - CC_LOWER_OPT = -O1 1.121 - else 1.122 - CC_HIGHEST_OPT = -O2 -Op 1.123 - CC_HIGHER_OPT = -O2 -Op 1.124 - CC_LOWER_OPT = -O1 -Op 1.125 - endif 1.126 - endif 1.127 - ifeq ($(COMPILER_VERSION), VS2005) 1.128 - # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) 1.129 - AUTOMATIC_PCH_OPTION = 1.130 - # VS2005 compiler, only with Platform SDK right now? 1.131 - GX_OPTION = -EHsc 1.132 - ifeq ($(ARCH_DATA_MODEL), 32) 1.133 - CC_HIGHEST_OPT = -O2 1.134 - CC_HIGHER_OPT = -O1 1.135 - CC_LOWER_OPT = -O1 1.136 - else 1.137 - CC_HIGHEST_OPT = -O2 1.138 - CC_HIGHER_OPT = -O1 1.139 - CC_LOWER_OPT = -O1 1.140 - endif 1.141 - endif 1.142 - ifeq ($(COMPILER_VERSION), VS2008) 1.143 - # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) 1.144 - AUTOMATIC_PCH_OPTION = 1.145 - GX_OPTION = -EHsc 1.146 - ifeq ($(ARCH_DATA_MODEL), 32) 1.147 - CC_HIGHEST_OPT = -O2 1.148 - CC_HIGHER_OPT = -O1 1.149 - CC_LOWER_OPT = -O1 1.150 - else 1.151 - CC_HIGHEST_OPT = -O2 1.152 - CC_HIGHER_OPT = -O1 1.153 - CC_LOWER_OPT = -O1 1.154 - endif 1.155 - endif 1.156 - ifeq ($(COMPILER_VERSION), VS2010) 1.157 - # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) 1.158 - AUTOMATIC_PCH_OPTION = 1.159 - GX_OPTION = -EHsc 1.160 - ifeq ($(ARCH_DATA_MODEL), 32) 1.161 - CC_HIGHEST_OPT = -O2 1.162 - CC_HIGHER_OPT = -O1 1.163 - CC_LOWER_OPT = -O1 1.164 - else 1.165 - CC_HIGHEST_OPT = -O2 1.166 - CC_HIGHER_OPT = -O1 1.167 - CC_LOWER_OPT = -O1 1.168 - endif 1.169 - endif 1.170 - CC_NO_OPT = -Od 1.171 -else # CC_VERSION 1.172 - # GCC not supported, but left for historical reference... 1.173 - CC_HIGHEST_OPT = -O3 1.174 - CC_HIGHER_OPT = -O2 1.175 - CC_LOWER_OPT = -O2 1.176 - CC_NO_OPT = 1.177 -endif 1.178 - 1.179 -# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off 1.180 -ifdef NO_OPTIMIZATIONS 1.181 - CC_HIGHEST_OPT = $(CC_NO_OPT) 1.182 - CC_HIGHER_OPT = $(CC_NO_OPT) 1.183 - CC_LOWER_OPT = $(CC_NO_OPT) 1.184 -endif 1.185 - 1.186 -ifeq ($(PRODUCT), java) 1.187 - _OPT = $(CC_HIGHER_OPT) 1.188 -else 1.189 - _OPT = $(CC_LOWER_OPT) 1.190 -endif 1.191 - 1.192 -# Select the runtime support library carefully, need to be consistent 1.193 -# 1.194 -# VS2003 compiler option definitions: 1.195 -# -MD Use dynamic multi-threaded runtime library 1.196 -# -MDd Use debug version (don't use, doesn't mix with -MD DLL's) 1.197 -# -MT Use static multi-threaded runtime library (-ML is going away) 1.198 -# -MTd Use static debug version (better than -MDd, no runtime issues) 1.199 -# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd) 1.200 -# 1.201 -# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll 1.202 -# 1.203 -ifeq ($(MS_RUNTIME_STATIC),true) 1.204 - MS_RUNTIME_OPTION=-MT 1.205 -else 1.206 - MS_RUNTIME_OPTION=-MD 1.207 -endif 1.208 -# The _DEBUG macro option (changes things like malloc to use debug version) 1.209 -MS_RUNTIME_DEBUG_OPTION= 1.210 -MS_RC_DEBUG_OPTION= 1.211 -# Externally set environment variable can force any build to use the debug vers 1.212 -ifeq ($(MFC_DEBUG), true) 1.213 - ifeq ($(MS_RUNTIME_STATIC),true) 1.214 - MS_RUNTIME_OPTION=-MTd 1.215 - else 1.216 - # This MS debugging flag forces a dependence on the debug 1.217 - # version of the runtime library (MSVCRTD.DLL), as does -MDd. 1.218 - # We cannot re-distribute this debug runtime. 1.219 - MS_RUNTIME_OPTION=-MDd 1.220 - endif 1.221 - MS_RUNTIME_DEBUG_OPTION= -D_DEBUG 1.222 - MS_RC_DEBUG_OPTION= -d _DEBUG 1.223 -endif 1.224 - 1.225 -# Always add _STATIC_CPPLIB definition 1.226 -STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB 1.227 -MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION) 1.228 - 1.229 -ifeq ($(CC_VERSION),msvc) 1.230 - # VS2003 compiler option definitions: 1.231 - # -Zi Cause *.pdb file to be created, full debug information 1.232 - # -Z7 Full debug inside the .obj, no .pdb 1.233 - # -Zd Basic debug, no local variables? In the .obj 1.234 - # -Zl Don't add runtime library name to obj file? 1.235 - # -Od Turns off optimization and speeds compilation 1.236 - # -YX -Fp/.../foobar.pch Use precompiled headers (try someday?) 1.237 - # -nologo Don't print out startup message 1.238 - # /D _STATIC_CPPLIB 1.239 - # Use static link for the C++ runtime (so msvcpnn.dll not needed) 1.240 - # 1.241 - CFLAGS_COMMON += -Zi -nologo 1.242 - CFLAGS_OPT = $(POPT) 1.243 - CFLAGS_DBG = -Od $(MS_RUNTIME_DEBUG_OPTION) 1.244 - 1.245 - # Starting from VS2005 the wchar_t is handled as a built-in C/C++ data type 1.246 - # by default. However, we expect the wchar_t to be a typedef to the 1.247 - # unsigned short data type. The -Zc:wchar_t- option restores the old 1.248 - # behavior (as seen in VS2003) to avoid massive code modifications. 1.249 - # When/if our code will be "C/C++ Standard"-compliant (at least in the area 1.250 - # of handling the wchar_t type), the option won't be necessary. 1.251 - ifeq ($(ARCH_DATA_MODEL), 32) 1.252 - CFLAGS_VS2005 += -Zc:wchar_t- 1.253 - else 1.254 - # The 64bit Platform SDK we use (April 2005) doesn't like this option 1.255 - ifneq ($(CC_VER), 14.00.40310.41) 1.256 - CFLAGS_VS2005 += -Zc:wchar_t- 1.257 - endif 1.258 - endif 1.259 - 1.260 - # All builds get the same runtime setting 1.261 - CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION)) 1.262 - 1.263 - 1.264 - LDEBUG = /debug 1.265 - 1.266 - ifeq ($(VTUNE_SUPPORT), true) 1.267 - OTHER_CFLAGS = -Z7 -Ox 1.268 - LDEBUG += /pdb:NONE 1.269 - endif 1.270 - 1.271 - # The new Platform SDK and VS2005 has /GS as a default and requires 1.272 - # bufferoverflowU.lib on the link command line, otherwise 1.273 - # we get missing __security_check_cookie externals at link time. 1.274 - BUFFEROVERFLOWLIB = bufferoverflowU.lib 1.275 - # Always add bufferoverflowU.lib to VS2005 link commands (pack uses LDDFLAGS) 1.276 - LFLAGS_VS2005 = $(BUFFEROVERFLOWLIB) 1.277 - 1.278 - # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file 1.279 - BASELFLAGS = -nologo /opt:REF /incremental:no 1.280 - LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION)) 1.281 - LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION)) 1.282 - 1.283 -endif 1.284 - 1.285 -# 1.286 -# Preprocessor macro definitions 1.287 -# 1.288 -CPPFLAGS_COMMON = -DWIN32 -DIAL -D_LITTLE_ENDIAN 1.289 -ifeq ($(ARCH), amd64) 1.290 - CPPFLAGS_COMMON += -D_AMD64_ -Damd64 1.291 -else 1.292 - CPPFLAGS_COMMON += -DWIN32 -D_X86_ -Dx86 1.293 -endif 1.294 -CPPFLAGS_COMMON += -DWIN32_LEAN_AND_MEAN 1.295 - 1.296 -# 1.297 -# Output options (use specific filenames to avoid parallel compile errors) 1.298 -# 1.299 -CFLAGS_COMMON += -Fd$(OBJDIR)/$(basename $(@F)).pdb -Fm$(OBJDIR)/$(basename $(@F)).map 1.300 - 1.301 -# 1.302 -# Add warnings and extra on 64bit issues 1.303 -# 1.304 -ifeq ($(ARCH_DATA_MODEL), 64) 1.305 - CFLAGS_COMMON += -Wp64 1.306 -endif 1.307 -CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL) 1.308 - 1.309 -# 1.310 -# Treat compiler warnings as errors, if requested 1.311 -# 1.312 -ifeq ($(COMPILER_WARNINGS_FATAL),true) 1.313 - CFLAGS_COMMON += -WX 1.314 -endif 1.315 - 1.316 -CPPFLAGS_OPT = 1.317 -CPPFLAGS_DBG = -DDEBUG -DLOGGING 1.318 - 1.319 -CXXFLAGS_COMMON = $(CFLAGS_COMMON) 1.320 -CXXFLAGS_OPT = $(CFLAGS_OPT) 1.321 -CXXFLAGS_DBG = $(CFLAGS_DBG) 1.322 - 1.323 -ifneq ($(LIBRARY),fdlibm) 1.324 - EXTRA_LIBS += advapi32.lib 1.325 -endif 1.326 - 1.327 -# 1.328 -# Path and option to link against the VM, if you have to. 1.329 -# 1.330 -JVMLIB = $(BOOTDIR)/lib/jvm.lib 1.331 -JAVALIB = 1.332 - 1.333 -ifeq ($(CC_VERSION), msvc) 1.334 - CC_DEPEND = -FD 1.335 - CC_DEPEND_FILTER = 1.336 -else # CC_VERSION 1.337 -# not supported, but left for historical reference... 1.338 - CC_DEPEND = -MM 1.339 - CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)&!g' 1.340 -endif # CC_VERSION 1.341 - 1.342 -LIBRARY_SUFFIX = dll 1.343 -LIB_SUFFIX = lib 1.344 - 1.345 -# Settings for the VERSIONINFO tap on windows. 1.346 -VERSIONINFO_RESOURCE = $(TOPDIR)/src/windows/resource/version.rc 1.347 - 1.348 -RC_FLAGS = /l 0x409 /r 1.349 - 1.350 -ifeq ($(VARIANT), OPT) 1.351 - RC_FLAGS += -d NDEBUG 1.352 -else 1.353 - RC_FLAGS += $(MS_RC_DEBUG_OPTION) 1.354 -endif 1.355 - 1.356 -ifndef COPYRIGHT_YEAR 1.357 - COPYRIGHT_YEAR = 2007 1.358 -endif 1.359 - 1.360 -RC_FLAGS += -d "JDK_BUILD_ID=$(FULL_VERSION)" \ 1.361 - -d "JDK_COMPANY=$(COMPANY_NAME)" \ 1.362 - -d "JDK_COMPONENT=$(PRODUCT_NAME) Platform SE binary" \ 1.363 - -d "JDK_VER=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)" \ 1.364 - -d "JDK_COPYRIGHT=Copyright \xA9 $(COPYRIGHT_YEAR)" \ 1.365 - -d "JDK_NAME=$(PRODUCT_NAME) Platform SE $(JDK_MINOR_VERSION) $(JDK_UPDATE_META_TAG)" \ 1.366 - -d "JDK_FVER=$(JDK_VERSION)"