[Libreoffice-commits] core.git: external/postgresql
Thorsten Behrens (via logerrit)
logerrit at kemper.freedesktop.org
Sun Mar 14 17:30:47 UTC 2021
external/postgresql/UnpackedTarball_postgresql.mk | 3 +
external/postgresql/arm64.patch.1 | 53 ++++++++++++++++++++++
2 files changed, 56 insertions(+)
New commits:
commit db8fb941ecc4c6e0279b47e4560b4b285339a17f
Author: Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Sun Mar 14 02:24:59 2021 +0100
Commit: Thorsten Behrens <thorsten.behrens at allotropia.de>
CommitDate: Sun Mar 14 18:29:58 2021 +0100
Fix ARM64 build after postgres upgrade to 13.1
Change-Id: I12bdda6aedd9b7b15423f997fe8c6910d9c9e9d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112464
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
diff --git a/external/postgresql/UnpackedTarball_postgresql.mk b/external/postgresql/UnpackedTarball_postgresql.mk
index c189b10dcb4b..b941de56822e 100644
--- a/external/postgresql/UnpackedTarball_postgresql.mk
+++ b/external/postgresql/UnpackedTarball_postgresql.mk
@@ -17,8 +17,11 @@ $(eval $(call gb_UnpackedTarball_add_patches,postgresql, \
external/postgresql/windows.patch.0 \
external/postgresql/postgresql.exit.patch.0 \
external/postgresql/postgres-msvc-build.patch.1 \
+ $(if $(filter WNT_ARM64,$(OS)_$(CPUNAME)), external/postgresql/arm64.patch.1) \
))
+ifeq ($(CROSS_COMPILING),)
$(eval $(call gb_UnpackedTarball_add_file,postgresql,src/tools/msvc/config.pl,external/postgresql/config.pl))
+endif
# vim: set noet sw=4 ts=4:
diff --git a/external/postgresql/arm64.patch.1 b/external/postgresql/arm64.patch.1
new file mode 100644
index 000000000000..7f8f2d6e4137
--- /dev/null
+++ b/external/postgresql/arm64.patch.1
@@ -0,0 +1,53 @@
+diff -ur postgresql.org/src/tools/msvc/Mkvcbuild.pm postgresql/src/tools/msvc/Mkvcbuild.pm
+--- postgresql.org/src/tools/msvc/Mkvcbuild.pm 2021-03-14 02:09:15.288060770 +0100
++++ postgresql/src/tools/msvc/Mkvcbuild.pm 2021-03-14 02:12:22.351726582 +0100
+@@ -107,13 +107,6 @@
+
+ push(@pgportfiles, 'strtof.c') if ($vsVersion < '14.00');
+
+- if ($vsVersion >= '9.00')
+- {
+- push(@pgportfiles, 'pg_crc32c_sse42_choose.c');
+- push(@pgportfiles, 'pg_crc32c_sse42.c');
+- push(@pgportfiles, 'pg_crc32c_sb8.c');
+- }
+- else
+ {
+ push(@pgportfiles, 'pg_crc32c_sb8.c');
+ }
+diff -ur postgresql.org/src/tools/msvc/MSBuildProject.pm postgresql/src/tools/msvc/MSBuildProject.pm
+--- postgresql.org/src/tools/msvc/MSBuildProject.pm 2021-03-14 02:09:15.288060770 +0100
++++ postgresql/src/tools/msvc/MSBuildProject.pm 2021-03-14 02:12:22.351726582 +0100
+@@ -307,8 +307,7 @@
+ : ($self->{type} eq "dll" ? 'DynamicLibrary' : 'StaticLibrary');
+ my $libs = $self->GetAdditionalLinkerDependencies($cfgname, ';');
+
+- my $targetmachine =
+- $self->{platform} eq 'Win32' ? 'MachineX86' : 'MachineX64';
++ my $targetmachine = "MachineARM64";
+
+ my $includes = $self->{includes};
+ unless ($includes eq '' or $includes =~ /;$/)
+@@ -347,7 +347,6 @@
+ <ProgramDatabaseFile>.\\$cfgname\\$self->{name}\\$self->{name}.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>.\\$cfgname\\$self->{name}\\$self->{name}.map</MapFileName>
+- <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <!-- Permit links to MinGW-built, 32-bit DLLs (default before VS2012). -->
+ <ImageHasSafeExceptionHandlers/>
+ <SubSystem>Console</SubSystem>
+diff -ur postgresql.org/src/tools/msvc/Solution.pm postgresql/src/tools/msvc/Solution.pm
+--- postgresql.org/src/tools/msvc/Solution.pm 2021-03-14 02:09:15.288060770 +0100
++++ postgresql/src/tools/msvc/Solution.pm 2021-03-14 02:12:22.351726582 +0100
+@@ -62,10 +62,7 @@
+ if (1) #($^O eq "MSWin32")
+ {
+ # Examine CL help output to determine if we are in 32 or 64-bit mode.
+- my $output = `cl /? 2>&1`;
+- $? >> 8 == 0 or die "cl command not found";
+- $self->{platform} =
+- ($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : 'Win32';
++ $self->{platform} = 'ARM64';
+ }
+ else
+ {
More information about the Libreoffice-commits
mailing list