summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2018-11-10 20:38:56 +0000
committerNiels Thykier <niels@thykier.net>2018-11-10 20:38:56 +0000
commitad9e3a97499987062404c8b5a9df38bc5fd2a243 (patch)
tree4810feaf5143245cf868e31b4843242b9eab289c
parent8e8aea6365b619e9f677b1a62628a70cab39c89a (diff)
downloaddebhelper-ad9e3a97499987062404c8b5a9df38bc5fd2a243.tar.gz
cmake: Pass correct CMAKE_SYSTEM_PROCESSOR for ppc64el
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r--debian/changelog8
-rw-r--r--lib/Debian/Debhelper/Buildsystem/cmake.pm11
2 files changed, 18 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 2478565e..9fe3025d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debhelper (11.5.3) UNRELEASED; urgency=medium
+
+ [ Helmut Grohne ]
+ * cmake.pm: Pass the usual CMAKE_SYSTEM_PROCESSOR for ppc64el
+ when cross compiling. (Closes: #913425)
+
+ -- Niels Thykier <niels@thykier.net> Sat, 10 Nov 2018 20:36:59 +0000
+
debhelper (11.5.2) unstable; urgency=medium
[ Luca Boccassi ]
diff --git a/lib/Debian/Debhelper/Buildsystem/cmake.pm b/lib/Debian/Debhelper/Buildsystem/cmake.pm
index 37f82c6c..ee8abb26 100644
--- a/lib/Debian/Debhelper/Buildsystem/cmake.pm
+++ b/lib/Debian/Debhelper/Buildsystem/cmake.pm
@@ -26,6 +26,10 @@ my %DEB_HOST2CMAKE_SYSTEM = (
'hurd' => 'GNU',
);
+my %GNU_CPU2SYSTEM_PROCESSOR = (
+ 'powerpc64le' => 'ppc64le',
+);
+
my %TARGET_BUILD_SYSTEM2CMAKE_GENERATOR = (
'makefile' => 'Unix Makefiles',
'ninja' => 'Ninja',
@@ -101,7 +105,12 @@ sub configure {
} else {
error("Cannot cross-compile - CMAKE_SYSTEM_NAME not known for ${deb_host}");
}
- push @flags, "-DCMAKE_SYSTEM_PROCESSOR=" . dpkg_architecture_value("DEB_HOST_GNU_CPU");
+ my $gnu_cpu = dpkg_architecture_value("DEB_HOST_GNU_CPU");
+ if (exists($GNU_CPU2SYSTEM_PROCESSOR{$gnu_cpu})) {
+ push @flags, "-DCMAKE_SYSTEM_PROCESSOR=" . $GNU_CPU2SYSTEM_PROCESSOR{$gnu_cpu};
+ } else {
+ push @flags, "-DCMAKE_SYSTEM_PROCESSOR=${gnu_cpu}";
+ }
if (not $ENV{CC}) {
push @flags, "-DCMAKE_C_COMPILER=" . dpkg_architecture_value("DEB_HOST_GNU_TYPE") . "-gcc";
}