diff options
author | Guillem Jover <guillem@debian.org> | 2017-12-05 01:56:15 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2018-01-16 11:24:34 +0100 |
commit | 797ed78bd87c77b6fa9c3867d0fefa90bb21014c (patch) | |
tree | d61349eaacae6b485003f34601cb0d02234f2735 | |
parent | b29058ea75ce28f95b373b0c36deffd4b57d466b (diff) | |
download | dpkg-797ed78bd87c77b6fa9c3867d0fefa90bb21014c.tar.gz |
scripts/mk: Add new buildtools variables
This adds support for AS, STRIP, OBJCOPY, OBJDUMP, NM, AR and RANLIB.
Prompted-by: Helmut Grohne <helmut@subdivi.de>
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | scripts/mk/buildtools.mk | 14 | ||||
-rw-r--r-- | scripts/t/mk.t | 7 | ||||
-rw-r--r-- | scripts/t/mk/buildtools.mk | 14 |
4 files changed, 37 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 820135a0f..9b6533fc9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,8 @@ dpkg (1.19.1) UNRELEASED; urgency=medium * Fix directory traversal with dpkg-deb --raw-extract, by guaranteeing that the DEBIAN pathname does not exist. Closes: #879982 Reported by Jakub Wilk <jwilk@jwilk.net>. + * Add new AS, STRIP, OBJCOPY, OBJDUMP, NM, AR and RANLIB buildtools + variables to buildtools.mk. Prompted by Helmut Grohne <helmut@subdivi.de>. * Perl modules: - Check that $tarname is defined before use in Dpkg::Source::Package::V1. Thanks to Christoph Biedl <debian.axhn@manchmal.in-ulm.de>. diff --git a/scripts/mk/buildtools.mk b/scripts/mk/buildtools.mk index d5638f50e..c3b44bb8a 100644 --- a/scripts/mk/buildtools.mk +++ b/scripts/mk/buildtools.mk @@ -1,5 +1,6 @@ # This Makefile snippet defines the following variables for host tools: # +# AS: assembler # CPP: C preprocessor # CC: C compiler # CXX: C++ compiler @@ -9,6 +10,12 @@ # F77: Fortran 77 compiler # FC: Fortran 9x compiler # LD: linker +# STRIP: strip objects +# OBJCOPY: copy objects +# OBJDUMP: dump objects +# NM: names lister +# AR: archiver +# RANLIB: archive index generator # PKG_CONFIG: pkg-config tool # # All the above variables have a counterpart variable for the build tool, @@ -44,6 +51,7 @@ export $(1)_FOR_BUILD endif endef +$(eval $(call dpkg_buildtool_setvar,AS,as)) $(eval $(call dpkg_buildtool_setvar,CPP,gcc -E)) $(eval $(call dpkg_buildtool_setvar,CC,gcc)) $(eval $(call dpkg_buildtool_setvar,CXX,g++)) @@ -53,4 +61,10 @@ $(eval $(call dpkg_buildtool_setvar,GCJ,gcj)) $(eval $(call dpkg_buildtool_setvar,F77,f77)) $(eval $(call dpkg_buildtool_setvar,FC,f77)) $(eval $(call dpkg_buildtool_setvar,LD,ld)) +$(eval $(call dpkg_buildtool_setvar,STRIP,strip)) +$(eval $(call dpkg_buildtool_setvar,OBJCOPY,objcopy)) +$(eval $(call dpkg_buildtool_setvar,OBJDUMP,objdump)) +$(eval $(call dpkg_buildtool_setvar,NM,nm)) +$(eval $(call dpkg_buildtool_setvar,AR,ar)) +$(eval $(call dpkg_buildtool_setvar,RANLIB,ranlib)) $(eval $(call dpkg_buildtool_setvar,PKG_CONFIG,pkg-config)) diff --git a/scripts/t/mk.t b/scripts/t/mk.t index 7eaf40cc8..0062e993c 100644 --- a/scripts/t/mk.t +++ b/scripts/t/mk.t @@ -82,6 +82,7 @@ $ENV{"TEST_$_"} = $buildflag{$_} foreach keys %buildflag; test_makefile('buildflags.mk'); my %buildtools = ( + AS => 'as', CPP => 'gcc -E', CC => 'gcc', CXX => 'g++', @@ -91,6 +92,12 @@ my %buildtools = ( F77 => 'f77', FC => 'f77', LD => 'ld', + STRIP => 'strip', + OBJCOPY => 'objcopy', + OBJDUMP => 'objdump', + NM => 'nm', + AR => 'ar', + RANLIB => 'ranlib', PKG_CONFIG => 'pkg-config', ); diff --git a/scripts/t/mk/buildtools.mk b/scripts/t/mk/buildtools.mk index 8bba96430..0077791b5 100644 --- a/scripts/t/mk/buildtools.mk +++ b/scripts/t/mk/buildtools.mk @@ -1,6 +1,8 @@ include $(srcdir)/mk/buildtools.mk test: + test "$(AS)" = "$(TEST_AS)" + test "$(AS_FOR_BUILD)" = "$(TEST_AS_FOR_BUILD)" test "$(CC)" = "$(TEST_CC)" test "$(CC_FOR_BUILD)" = "$(TEST_CC_FOR_BUILD)" test "$(CXX)" = "$(TEST_CXX)" @@ -17,5 +19,17 @@ test: test "$(FC_FOR_BUILD)" = "$(TEST_FC_FOR_BUILD)" test "$(LD)" = "$(TEST_LD)" test "$(LD_FOR_BUILD)" = "$(TEST_LD_FOR_BUILD)" + test "$(STRIP)" = "$(TEST_STRIP)" + test "$(STRIP_FOR_BUILD)" = "$(TEST_STRIP_FOR_BUILD)" + test "$(OBJCOPY)" = "$(TEST_OBJCOPY)" + test "$(OBJCOPY_FOR_BUILD)" = "$(TEST_OBJCOPY_FOR_BUILD)" + test "$(OBJDUMP)" = "$(TEST_OBJDUMP)" + test "$(OBJDUMP_FOR_BUILD)" = "$(TEST_OBJDUMP_FOR_BUILD)" + test "$(NM)" = "$(TEST_NM)" + test "$(NM_FOR_BUILD)" = "$(TEST_NM_FOR_BUILD)" + test "$(AR)" = "$(TEST_AR)" + test "$(AR_FOR_BUILD)" = "$(TEST_AR_FOR_BUILD)" + test "$(RANLIB)" = "$(TEST_RANLIB)" + test "$(RANLIB_FOR_BUILD)" = "$(TEST_RANLIB_FOR_BUILD)" test "$(PKG_CONFIG)" = "$(TEST_PKG_CONFIG)" test "$(PKG_CONFIG_FOR_BUILD)" = "$(TEST_PKG_CONFIG_FOR_BUILD)" |