summaryrefslogtreecommitdiff
path: root/python3
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2013-03-21 18:20:01 +0200
committerTor Lillqvist <tlillqvist@suse.com>2013-03-21 20:21:30 +0200
commit8b79f292fb7f41f424c4f02900082a5c9a71c0f4 (patch)
tree984363e70164adc51f6719c9d7f0d935b3519902 /python3
parent3c61c08757208fb9735814dd62ac80f23cf51b86 (diff)
Fix x64 Windows build of python3 (no idea if it works)
Change-Id: If8075a459acf4901ef451b24e54d88a8b68393f9
Diffstat (limited to 'python3')
-rw-r--r--python3/ExternalPackage_python3.mk43
-rw-r--r--python3/ExternalProject_python3.mk4
-rw-r--r--python3/python-3.3.0-msvc-x64.patch.1133
3 files changed, 158 insertions, 22 deletions
diff --git a/python3/ExternalPackage_python3.mk b/python3/ExternalPackage_python3.mk
index 6c3c4485df29..1e83e3fc9aa8 100644
--- a/python3/ExternalPackage_python3.mk
+++ b/python3/ExternalPackage_python3.mk
@@ -12,27 +12,30 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,python3,python3))
$(eval $(call gb_ExternalPackage_use_external_project,python3,python3))
ifeq ($(OS)-$(COM),WNT-MSC)
-$(eval $(call gb_ExternalPackage_add_file,python3,bin/python.exe,LO_lib/python.exe))
-$(eval $(call gb_ExternalPackage_add_file,python3,bin/python$(PYTHON_VERSION_MAJOR).dll,LO_lib/python$(PYTHON_VERSION_MAJOR).dll))
-$(eval $(call gb_ExternalPackage_add_file,python3,bin/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR).dll,LO_lib/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR).dll))
-$(eval $(call gb_ExternalPackage_add_file,python3,lib/python$(PYTHON_VERSION_MAJOR).lib,LO_lib/python$(PYTHON_VERSION_MAJOR).lib))
-$(eval $(call gb_ExternalPackage_add_file,python3,lib/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR).lib,LO_lib/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR).lib))
+ifeq ($(CPUNAME),X86_64)
+python_arch_subdir=amd64/
+endif
+$(eval $(call gb_ExternalPackage_add_file,python3,bin/python.exe,LO_lib/$(python_arch_subdir)python.exe))
+$(eval $(call gb_ExternalPackage_add_file,python3,bin/python$(PYTHON_VERSION_MAJOR).dll,LO_lib/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR).dll))
+$(eval $(call gb_ExternalPackage_add_file,python3,bin/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR).dll,LO_lib/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR).dll))
+$(eval $(call gb_ExternalPackage_add_file,python3,lib/python$(PYTHON_VERSION_MAJOR).lib,LO_lib/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR).lib))
+$(eval $(call gb_ExternalPackage_add_file,python3,lib/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR).lib,LO_lib/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR).lib))
$(eval $(call gb_ExternalPackage_add_files,python3,lib/python,\
- LO_lib/_ctypes.pyd \
- LO_lib/_ctypes_test.pyd \
- LO_lib/_decimal.pyd \
- LO_lib/_elementtree.pyd \
- LO_lib/_msi.pyd \
- LO_lib/_multiprocessing.pyd \
- LO_lib/_socket.pyd \
- LO_lib/_ssl.pyd \
- LO_lib/_testbuffer.pyd \
- LO_lib/_testcapi.pyd \
- LO_lib/pyexpat.pyd \
- LO_lib/select.pyd \
- LO_lib/unicodedata.pyd \
- LO_lib/winsound.pyd \
- LO_lib/xxlimited.pyd \
+ LO_lib/$(python_arch_subdir)_ctypes.pyd \
+ LO_lib/$(python_arch_subdir)_ctypes_test.pyd \
+ LO_lib/$(python_arch_subdir)_decimal.pyd \
+ LO_lib/$(python_arch_subdir)_elementtree.pyd \
+ LO_lib/$(python_arch_subdir)_msi.pyd \
+ LO_lib/$(python_arch_subdir)_multiprocessing.pyd \
+ LO_lib/$(python_arch_subdir)_socket.pyd \
+ LO_lib/$(python_arch_subdir)_ssl.pyd \
+ LO_lib/$(python_arch_subdir)_testbuffer.pyd \
+ LO_lib/$(python_arch_subdir)_testcapi.pyd \
+ LO_lib/$(python_arch_subdir)pyexpat.pyd \
+ LO_lib/$(python_arch_subdir)select.pyd \
+ LO_lib/$(python_arch_subdir)unicodedata.pyd \
+ LO_lib/$(python_arch_subdir)winsound.pyd \
+ LO_lib/$(python_arch_subdir)xxlimited.pyd \
))
else ifeq ($(OS),WNT) # MinGW
# TODO how are C modules called on this platform?
diff --git a/python3/ExternalProject_python3.mk b/python3/ExternalProject_python3.mk
index 11635ea0da3d..cc417c35d420 100644
--- a/python3/ExternalProject_python3.mk
+++ b/python3/ExternalProject_python3.mk
@@ -29,13 +29,13 @@ ifeq ($(OS)$(COM),WNTMSC)
$(call gb_ExternalProject_get_state_target,python3,build) :
ifeq ($(VCVER),110)
$(call gb_ExternalProject_run,build,\
- MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build /p:Configuration=Release /p:PlatformToolset=v110 /p:VisualStudioVersion=11.0 \
+ MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build /p:Configuration=Release /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) /p:PlatformToolset=v110 /p:VisualStudioVersion=11.0 \
&& cd $(EXTERNAL_WORKDIR) \
&& ln -s PCbuild LO_lib \
,PCBuild)
else ifeq ($(VCVER),100)
$(call gb_ExternalProject_run,build,\
- MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build /p:Configuration=Release /ToolsVersion:4.0 \
+ MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build /p:Configuration=Release /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64" /ToolsVersion:4.0 \
&& cd $(EXTERNAL_WORKDIR) \
&& ln -s PCbuild LO_lib \
,PCBuild)
diff --git a/python3/python-3.3.0-msvc-x64.patch.1 b/python3/python-3.3.0-msvc-x64.patch.1
index b23c04d86664..7071573c04ac 100644
--- a/python3/python-3.3.0-msvc-x64.patch.1
+++ b/python3/python-3.3.0-msvc-x64.patch.1
@@ -227,3 +227,136 @@ diff -ru python3/PCbuild/pcbuild.sln python3.new/PCbuild/pcbuild.sln
{19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|Win32.ActiveCfg = Release|Win32
{19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|x64.ActiveCfg = Release|x64
EndGlobalSection
+--- python3/PCbuild/make_buildinfo.vcxproj
++++ python3/PCbuild/make_buildinfo.vcxproj
+@@ -5,6 +5,10 @@
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
++ <ProjectConfiguration Include="Release|x64">
++ <Configuration>Release</Configuration>
++ <Platform>x64</Platform>
++ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C73F0EC1-358B-4177-940F-0846AC8B04CD}</ProjectGuid>
+@@ -16,6 +20,10 @@
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>NotSet</CharacterSet>
+ </PropertyGroup>
++ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
++ <ConfigurationType>Application</ConfigurationType>
++ <CharacterSet>NotSet</CharacterSet>
++ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+@@ -24,17 +32,38 @@
+ <Import Project="pyproject.props" />
+ <Import Project="release.props" />
+ </ImportGroup>
++ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
++ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
++ <Import Project="pyproject.props" />
++ <Import Project="x64.props" />
++ <Import Project="release.props" />
++ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
++ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
++ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
++ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
++ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
++ </ClCompile>
++ <Link>
++ <OutputFile>$(OutDir)make_buildinfo.exe</OutputFile>
++ <SubSystem>Console</SubSystem>
++ </Link>
++ </ItemDefinitionGroup>
++ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
++ <ClCompile>
++ <Optimization>Disabled</Optimization>
++ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+--- python3/PCbuild/make_versioninfo.vcxproj
++++ python3/PCbuild/make_versioninfo.vcxproj
+@@ -114,24 +114,25 @@
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <CustomBuildStep>
+ <Message>Build PC/pythonnt_rc(_d).h</Message>
+ <Command>cd $(SolutionDir)
+-make_versioninfo.exe &gt; ..\PC\pythonnt_rc.h
++amd64\make_versioninfo.exe &gt; ..\PC\pythonnt_rc.h
+ </Command>
+ <Outputs>$(SolutionDir)..\PC\pythonnt_rc.h;%(Outputs)</Outputs>
+ </CustomBuildStep>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+- <OutputFile>$(SolutionDir)make_versioninfo.exe</OutputFile>
++ <OutputFile>$(SolutionDir)amd64\make_versioninfo.exe</OutputFile>
++ <SubSystem>Console</SubSystem>
+ </Link>
+ <PostBuildEvent>
+ <Command>cd $(SolutionDir)
+-make_versioninfo.exe &gt; ..\PC\python_nt.h
++amd64\make_versioninfo.exe &gt; ..\PC\python_nt.h
+ </Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+--- python3/PCbuild/pythoncore.vcxproj
++++ python3/PCbuild/pythoncore.vcxproj
+@@ -185,35 +185,35 @@
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>..\Python;..\Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <PreLinkEvent>
+ <Message>Generate build information...</Message>
+- <Command>"$(SolutionDir)make_buildinfo.exe" Release "$(IntDir)"</Command>
++ <Command>"$(SolutionDir)amd64\make_buildinfo.exe" Release "$(IntDir)"</Command>
+ </PreLinkEvent>
+ <Link>
+ <AdditionalDependencies>$(IntDir)getbuildinfo.o;%(AdditionalDependencies)</AdditionalDependencies>
+ <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <BaseAddress>0x1e000000</BaseAddress>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <InlineFunctionExpansion>Default</InlineFunctionExpansion>
+ <IntrinsicFunctions>false</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>..\Python;..\Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ </ClCompile>