8043492: ad_x86_64_misc.obj : error LNK2011: precompiled object not linked in; image may not run
Added _build_pch_file.obj to LD_FLAGS and cleaned up support for older Visual Studio versions Reviewed-by: twisti, lfoltan, sla, kvn
This commit is contained in:
parent
8dc26f1a17
commit
71b76d4073
hotspot
make/windows
src/share/vm/runtime
@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
REM Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
REM
|
||||
REM This code is free software; you can redistribute it and/or modify it
|
||||
@ -81,33 +81,8 @@ REM figure out MSC version
|
||||
for /F %%i in ('sh %HotSpotWorkSpace%/make/windows/get_msc_ver.sh') do set %%i
|
||||
|
||||
echo **************************************************************
|
||||
set ProjectFile=%HotSpotBuildSpace%\jvm.vcproj
|
||||
echo MSC_VER = "%MSC_VER%"
|
||||
if "%MSC_VER%" == "1200" (
|
||||
set ProjectFile=%HotSpotBuildSpace%\jvm.dsp
|
||||
echo Will generate VC6 project {unsupported}
|
||||
) else (
|
||||
if "%MSC_VER%" == "1400" (
|
||||
echo Will generate VC8 {Visual Studio 2005}
|
||||
) else (
|
||||
if "%MSC_VER%" == "1500" (
|
||||
echo Will generate VC9 {Visual Studio 2008}
|
||||
) else (
|
||||
if "%MSC_VER%" == "1600" (
|
||||
echo Will generate VC10 {Visual Studio 2010}
|
||||
set ProjectFile=%HotSpotBuildSpace%\jvm.vcxproj
|
||||
) else (
|
||||
if "%MSC_VER%" == "1700" (
|
||||
echo Will generate VC10 {compatible with Visual Studio 2012}
|
||||
echo After opening in VS 2012, click "Update" when prompted.
|
||||
set ProjectFile=%HotSpotBuildSpace%\jvm.vcxproj
|
||||
) else (
|
||||
echo Will generate VC7 project {Visual Studio 2003 .NET}
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
echo %ProjectFile%
|
||||
echo **************************************************************
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -63,28 +63,20 @@ CXX_FLAGS=$(CXX_FLAGS) /Zi
|
||||
# Based on BUILDARCH we add some flags and select the default compiler name
|
||||
!if "$(BUILDARCH)" == "ia64"
|
||||
MACHINE=IA64
|
||||
DEFAULT_COMPILER_NAME=VS2003
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "CC_INTERP" /D "_LP64" /D "IA64"
|
||||
!endif
|
||||
|
||||
!if "$(BUILDARCH)" == "amd64"
|
||||
MACHINE=AMD64
|
||||
DEFAULT_COMPILER_NAME=VS2005
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "_LP64" /D "AMD64"
|
||||
LP64=1
|
||||
!endif
|
||||
|
||||
!if "$(BUILDARCH)" == "i486"
|
||||
MACHINE=I386
|
||||
DEFAULT_COMPILER_NAME=VS2003
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "IA32"
|
||||
!endif
|
||||
|
||||
# Sanity check, this is the default if not amd64, ia64, or i486
|
||||
!ifndef DEFAULT_COMPILER_NAME
|
||||
CXX=ARCH_ERROR
|
||||
!endif
|
||||
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "WIN32" /D "_WINDOWS"
|
||||
# Must specify this for sharedRuntimeTrig.cpp
|
||||
CXX_FLAGS=$(CXX_FLAGS) /D "VM_LITTLE_ENDIAN"
|
||||
@ -112,6 +104,7 @@ CXX_FLAGS=$(CXX_FLAGS) /D TARGET_COMPILER_visCPP
|
||||
# 1500 is for VS2008
|
||||
# 1600 is for VS2010
|
||||
# 1700 is for VS2012
|
||||
# 1800 is for VS2013
|
||||
# Do not confuse this MSC_VER with the predefined macro _MSC_VER that the
|
||||
# compiler provides, when MSC_VER==1399, _MSC_VER will be 1400.
|
||||
# Normally they are the same, but a pre-release of the VS2005 compilers
|
||||
@ -119,35 +112,6 @@ CXX_FLAGS=$(CXX_FLAGS) /D TARGET_COMPILER_visCPP
|
||||
# closer to VS2003 in terms of option spellings, so we use 1399 for that
|
||||
# 1400 version that really isn't 1400.
|
||||
# See the file get_msc_ver.sh for more info.
|
||||
!if "x$(MSC_VER)" == "x"
|
||||
COMPILER_NAME=$(DEFAULT_COMPILER_NAME)
|
||||
!else
|
||||
!if "$(MSC_VER)" == "1200"
|
||||
COMPILER_NAME=VC6
|
||||
!endif
|
||||
!if "$(MSC_VER)" == "1300"
|
||||
COMPILER_NAME=VS2003
|
||||
!endif
|
||||
!if "$(MSC_VER)" == "1310"
|
||||
COMPILER_NAME=VS2003
|
||||
!endif
|
||||
!if "$(MSC_VER)" == "1399"
|
||||
# Compiler might say 1400, but if it's 14.00.30701, it isn't really VS2005
|
||||
COMPILER_NAME=VS2003
|
||||
!endif
|
||||
!if "$(MSC_VER)" == "1400"
|
||||
COMPILER_NAME=VS2005
|
||||
!endif
|
||||
!if "$(MSC_VER)" == "1500"
|
||||
COMPILER_NAME=VS2008
|
||||
!endif
|
||||
!if "$(MSC_VER)" == "1600"
|
||||
COMPILER_NAME=VS2010
|
||||
!endif
|
||||
!if "$(MSC_VER)" == "1700"
|
||||
COMPILER_NAME=VS2012
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# By default, we do not want to use the debug version of the msvcrt.dll file
|
||||
# but if MFC_DEBUG is defined in the environment it will be used.
|
||||
@ -165,60 +129,6 @@ MS_RUNTIME_OPTION = $(MS_RUNTIME_OPTION) $(STATIC_CPPLIB_OPTION)
|
||||
!endif
|
||||
CXX_FLAGS=$(CXX_FLAGS) $(MS_RUNTIME_OPTION)
|
||||
|
||||
# How /GX option is spelled
|
||||
GX_OPTION = /GX
|
||||
|
||||
# Optimization settings for various versions of the compilers and types of
|
||||
# builds. Three basic sets of settings: product, fastdebug, and debug.
|
||||
# These get added into CXX_FLAGS as needed by other makefiles.
|
||||
!if "$(COMPILER_NAME)" == "VC6"
|
||||
PRODUCT_OPT_OPTION = /Ox /Os /Gy /GF
|
||||
FASTDEBUG_OPT_OPTION = /Ox /Os /Gy /GF
|
||||
DEBUG_OPT_OPTION = /Od
|
||||
!endif
|
||||
|
||||
!if "$(COMPILER_NAME)" == "VS2003"
|
||||
PRODUCT_OPT_OPTION = /O2 /Oy-
|
||||
FASTDEBUG_OPT_OPTION = /O2 /Oy-
|
||||
DEBUG_OPT_OPTION = /Od
|
||||
SAFESEH_FLAG = /SAFESEH
|
||||
!endif
|
||||
|
||||
!if "$(COMPILER_NAME)" == "VS2005"
|
||||
PRODUCT_OPT_OPTION = /O2 /Oy-
|
||||
FASTDEBUG_OPT_OPTION = /O2 /Oy-
|
||||
DEBUG_OPT_OPTION = /Od
|
||||
GX_OPTION = /EHsc
|
||||
# This VS2005 compiler has /GS as a default and requires bufferoverflowU.lib
|
||||
# on the link command line, otherwise we get missing __security_check_cookie
|
||||
# externals at link time. Even with /GS-, you need bufferoverflowU.lib.
|
||||
# NOTE: Currently we decided to not use /GS-
|
||||
BUFFEROVERFLOWLIB = bufferoverflowU.lib
|
||||
LD_FLAGS = /manifest $(LD_FLAGS) $(BUFFEROVERFLOWLIB)
|
||||
# Manifest Tool - used in VS2005 and later to adjust manifests stored
|
||||
# as resources inside build artifacts.
|
||||
!if "x$(MT)" == "x"
|
||||
MT=mt.exe
|
||||
!endif
|
||||
SAFESEH_FLAG = /SAFESEH
|
||||
!endif
|
||||
|
||||
!if "$(COMPILER_NAME)" == "VS2008"
|
||||
PRODUCT_OPT_OPTION = /O2 /Oy-
|
||||
FASTDEBUG_OPT_OPTION = /O2 /Oy-
|
||||
DEBUG_OPT_OPTION = /Od
|
||||
GX_OPTION = /EHsc
|
||||
LD_FLAGS = /manifest $(LD_FLAGS)
|
||||
MP_FLAG = /MP
|
||||
# Manifest Tool - used in VS2005 and later to adjust manifests stored
|
||||
# as resources inside build artifacts.
|
||||
!if "x$(MT)" == "x"
|
||||
MT=mt.exe
|
||||
!endif
|
||||
SAFESEH_FLAG = /SAFESEH
|
||||
!endif
|
||||
|
||||
!if "$(COMPILER_NAME)" == "VS2010"
|
||||
PRODUCT_OPT_OPTION = /O2 /Oy-
|
||||
FASTDEBUG_OPT_OPTION = /O2 /Oy-
|
||||
DEBUG_OPT_OPTION = /Od
|
||||
@ -233,26 +143,6 @@ MT=mt.exe
|
||||
!if "$(BUILDARCH)" == "i486"
|
||||
LD_FLAGS = /SAFESEH $(LD_FLAGS)
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!if "$(COMPILER_NAME)" == "VS2012"
|
||||
PRODUCT_OPT_OPTION = /O2 /Oy-
|
||||
FASTDEBUG_OPT_OPTION = /O2 /Oy-
|
||||
DEBUG_OPT_OPTION = /Od
|
||||
GX_OPTION = /EHsc
|
||||
LD_FLAGS = /manifest $(LD_FLAGS)
|
||||
MP_FLAG = /MP
|
||||
# Manifest Tool - used in VS2005 and later to adjust manifests stored
|
||||
# as resources inside build artifacts.
|
||||
!if "x$(MT)" == "x"
|
||||
MT=mt.exe
|
||||
!endif
|
||||
SAFESEH_FLAG = /SAFESEH
|
||||
!endif
|
||||
|
||||
!if "$(BUILDARCH)" == "i486"
|
||||
LD_FLAGS = $(SAFESEH_FLAG) $(LD_FLAGS)
|
||||
!endif
|
||||
|
||||
CXX_FLAGS = $(CXX_FLAGS) $(MP_FLAG)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -49,35 +49,8 @@ BOOT_TARGET_CLASS_VERSION=6
|
||||
JAVAC_FLAGS=-g -encoding ascii
|
||||
BOOTSTRAP_JAVAC_FLAGS=$(JAVAC_FLAGS) -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
|
||||
|
||||
ProjectFile=jvm.vcproj
|
||||
|
||||
!if "$(MSC_VER)" == "1200"
|
||||
|
||||
VcVersion=VC6
|
||||
ProjectFile=jvm.dsp
|
||||
|
||||
!elseif "$(MSC_VER)" == "1400"
|
||||
|
||||
VcVersion=VC8
|
||||
|
||||
!elseif "$(MSC_VER)" == "1500"
|
||||
|
||||
VcVersion=VC9
|
||||
|
||||
!elseif "$(MSC_VER)" == "1600"
|
||||
|
||||
VcVersion=VC10
|
||||
ProjectFile=jvm.vcxproj
|
||||
|
||||
!elseif "$(MSC_VER)" == "1700"
|
||||
# This is VS2012, but it loads VS10 projects just fine (and will
|
||||
# VS2012 and VS2013 loads VS10 projects just fine (and will
|
||||
# upgrade them automatically to VS2012 format).
|
||||
|
||||
VcVersion=VC10
|
||||
ProjectFile=jvm.vcxproj
|
||||
|
||||
!else
|
||||
|
||||
VcVersion=VC7
|
||||
|
||||
!endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -85,14 +85,9 @@ checkAndBuildSA:: $(SAWINDBG)
|
||||
# will be useful to have the assertion checks in place
|
||||
|
||||
!if "$(BUILDARCH)" == "ia64"
|
||||
SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -Od -D "WIN32" -D "WIN64" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -YX -FD -c
|
||||
SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -Od -D "WIN32" -D "WIN64" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -FD -c
|
||||
!elseif "$(BUILDARCH)" == "amd64"
|
||||
SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -Od -D "WIN32" -D "WIN64" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -YX -FD -c
|
||||
!if "$(COMPILER_NAME)" == "VS2005"
|
||||
# On amd64, VS2005 compiler requires bufferoverflowU.lib on the link command line,
|
||||
# otherwise we get missing __security_check_cookie externals at link time.
|
||||
SA_LD_FLAGS = bufferoverflowU.lib
|
||||
!endif
|
||||
SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -Od -D "WIN32" -D "WIN64" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -FD -c
|
||||
!else
|
||||
SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -Od -D "WIN32" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -FD -RTC1 -c
|
||||
!if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,9 +27,9 @@
|
||||
all: checkCL checkLink
|
||||
|
||||
checkCL:
|
||||
@ if "$(MSC_VER)" NEQ "1310" if "$(MSC_VER)" NEQ "1399" if "$(MSC_VER)" NEQ "1400" if "$(MSC_VER)" NEQ "1500" if "$(MSC_VER)" NEQ "1600" if "$(MSC_VER)" NEQ "1700" \
|
||||
echo *** WARNING *** unrecognized cl.exe version $(MSC_VER) ($(RAW_MSC_VER)). Use FORCE_MSC_VER to override automatic detection.
|
||||
@ if "$(MSC_VER)" NEQ "1600" if "$(MSC_VER)" NEQ "1700" if "$(MSC_VER)" NEQ "1800" \
|
||||
echo *** WARNING *** Unsupported cl.exe version detected: $(MSC_VER) ($(RAW_MSC_VER)), only 1600/1700/1800 (Visual Studio 2010/2012/2013) are supported.
|
||||
|
||||
checkLink:
|
||||
@ if "$(LD_VER)" NEQ "710" if "$(LD_VER)" NEQ "800" if "$(LD_VER)" NEQ "900" if "$(LD_VER)" NEQ "1000" if "$(LD_VER)" NEQ "1100" \
|
||||
echo *** WARNING *** unrecognized link.exe version $(LD_VER) ($(RAW_LD_VER)). Use FORCE_LD_VER to override automatic detection.
|
||||
@ if "$(LD_VER)" NEQ "1000" if "$(LD_VER)" NEQ "1100" if "$(LD_VER)" NEQ "1200" \
|
||||
echo *** WARNING *** Unsupported link.exe version detected: $(LD_VER) ($(RAW_LD_VER)), only 1000/1100/1200 (Visual Studio 2010/2012/2013) are supported.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -132,7 +132,7 @@ CXX_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER
|
||||
|
||||
!if "$(USE_PRECOMPILED_HEADER)" != "0"
|
||||
CXX_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp"
|
||||
!if "$(COMPILER_NAME)" == "VS2012"
|
||||
!if "$(MSC_VER)" > "1600"
|
||||
# VS2012 requires this object file to be listed:
|
||||
LD_FLAGS=$(LD_FLAGS) _build_pch_file.obj
|
||||
!endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -120,7 +120,6 @@ ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -def
|
||||
ProjectCreatorIDEOptions = $(ProjectCreatorIDEOptions) $(ReleaseOptions)
|
||||
|
||||
$(HOTSPOTBUILDSPACE)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class
|
||||
@if "$(MSC_VER)"=="1500" echo Make sure you have VS2008 SP1 or later, or you may see 'expanded command line too long'
|
||||
@$(RUN_JAVA) -Djava.class.path="$(HOTSPOTBUILDSPACE)/classes" ProjectCreator WinGammaPlatform$(VcVersion) $(ProjectCreatorIDEOptions)
|
||||
|
||||
clean:
|
||||
|
@ -222,20 +222,12 @@ const char* Abstract_VM_Version::internal_vm_info_string() {
|
||||
|
||||
#ifndef HOTSPOT_BUILD_COMPILER
|
||||
#ifdef _MSC_VER
|
||||
#if _MSC_VER == 1100
|
||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 5.0"
|
||||
#elif _MSC_VER == 1200
|
||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 6.0"
|
||||
#elif _MSC_VER == 1310
|
||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 7.1 (VS2003)"
|
||||
#elif _MSC_VER == 1400
|
||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 8.0 (VS2005)"
|
||||
#elif _MSC_VER == 1500
|
||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 9.0 (VS2008)"
|
||||
#elif _MSC_VER == 1600
|
||||
#if _MSC_VER == 1600
|
||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 10.0 (VS2010)"
|
||||
#elif _MSC_VER == 1700
|
||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 11.0 (VS2012)"
|
||||
#elif _MSC_VER == 1800
|
||||
#define HOTSPOT_BUILD_COMPILER "MS VC++ 12.0 (VS2013)"
|
||||
#else
|
||||
#define HOTSPOT_BUILD_COMPILER "unknown MS VC++:" XSTR(_MSC_VER)
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user