summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Dh_Lib.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Debian/Debhelper/Dh_Lib.pm')
-rw-r--r--Debian/Debhelper/Dh_Lib.pm15
1 files changed, 14 insertions, 1 deletions
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index fb83480b..9b6118e9 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -17,7 +17,8 @@ use vars qw(@ISA @EXPORT %dh);
&is_udeb &udeb_filename &debhelper_script_subst &escape_shell
&inhibit_log &load_log &write_log &dpkg_architecture_value
&sourcepackage
- &is_make_jobserver_unavailable &clean_jobserver_makeflags);
+ &is_make_jobserver_unavailable &clean_jobserver_makeflags
+ &cross_command);
my $max_compat=8;
@@ -858,4 +859,16 @@ sub clean_jobserver_makeflags {
}
}
+# If cross-compiling, returns appropriate cross version of command.
+sub cross_command {
+ my $command=shift;
+ if (dpkg_architecture_value("DEB_BUILD_GNU_TYPE")
+ ne dpkg_architecture_value("DEB_HOST_GNU_TYPE")) {
+ return dpkg_architecture_value("DEB_HOST_GNU_TYPE")."-$command";
+ }
+ else {
+ return $command;
+ }
+}
+
1