From 29255471d67077ac6f4ff8f06391e851e6451db7 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Thu, 17 Dec 2015 16:13:33 -0500 Subject: [PATCH] Only run export-check.pl in maintainer mode Cross compilation environments might not be using the default nm command. Rather than try to communicate the correct value to util/export-check.pl, only run export-check.pl in maintainer mode. ticket: 8329 (new) --- src/config/pre.in | 6 ++++++ src/config/shlib.conf | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/config/pre.in b/src/config/pre.in index b0d9015a8c..e74a89792f 100644 --- a/src/config/pre.in +++ b/src/config/pre.in @@ -561,6 +561,12 @@ SHLIB_EXPORT_FILE=$(srcdir)/$(LIBPREFIX)$(LIBBASE).exports # it to another, intermediate form for the linker. SHLIB_EXPORT_FILE_DEP=@SHLIB_EXPORT_FILE_DEP@ +# Export file checker to run when building in maintainer mode on +# Linux. This gets included in LDCOMBINE_TAIL. +EXPORT_CHECK_CMD = && $(PERL) -w $(top_srcdir)/util/export-check.pl \ + $(SHLIB_EXPORT_FILE) $@ +EXPORT_CHECK = @MAINT@ $(EXPORT_CHECK_CMD) + # Command to run to build a shared library. # In systems that require multiple commands, like AIX, it may need # to change to rearrange where the various parameters fit in. diff --git a/src/config/shlib.conf b/src/config/shlib.conf index 9dcf7972ab..f5eb6e3d05 100644 --- a/src/config/shlib.conf +++ b/src/config/shlib.conf @@ -423,8 +423,8 @@ mips-*-netbsd*) # Linux ld doesn't default to stuffing the SONAME field... # Use objdump -x to examine the fields of the library LDCOMBINE='$(CC) -shared -fPIC -Wl,-h,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT),--no-undefined' - # - LDCOMBINE_TAIL='-Wl,--version-script binutils.versions && $(PERL) -w $(top_srcdir)/util/export-check.pl $(SHLIB_EXPORT_FILE) $@' + # $(EXPORT_CHECK) runs export-check.pl when in maintainer mode. + LDCOMBINE_TAIL='-Wl,--version-script binutils.versions $(EXPORT_CHECK)' SHLIB_EXPORT_FILE_DEP=binutils.versions RPATH_FLAG='-Wl,--enable-new-dtags -Wl,-rpath -Wl,' # For cases where we do have dependencies on other libraries -- 2.47.2