summaryrefslogtreecommitdiff
path: root/external/postgresql/arm64.patch.1
blob: 357a94952c39c0c29ce5a6848bd65cfc01c560aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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 +346,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
@@ -65,10 +65,7 @@
 	if (1) #($^O eq "MSWin32")
 	{
 		# Examine CL help output to determine if we are in 32 or 64-bit mode.
-		my $output = `cl /help 2>&1`;
-		$? >> 8 == 0 or die "cl command not found";
-		$self->{platform} =
-		  ($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : 'Win32';
+		$self->{platform} = 'ARM64';
 	}
 	else
 	{