diff options
author | Sam bobroff <sam.bobroff@au1.ibm.com> | 2016-11-28 16:11:39 +1100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-12-05 22:51:17 +0100 |
commit | 41444d7f892b44c87d3b08e7ba1824b9cb9ee9a8 (patch) | |
tree | 49e20d888f52436848ed1e7d27c7dfaeafb023b8 /package/pkg-autotools.mk | |
parent | 00810e0ea3976c5b26a7fd264870f15e17a2eaa2 (diff) |
pkg-autotools: generic configure fix for powerpc64
Many (100+) packages supported by buildroot contain old configure
scripts (or build them from old versions of autotools) that are unable
to determine how to link shared libraries on powerpc64 and
powerpc64le. This causes that test to erroneously fail on toolchains
that are not "bi-endian" (which is the case for toolchains built by
buildroot), which causes configure to build static libraries instead
of dynamic ones. Although these builds succeed, they tend to cause
linker failures in binaries later linked against them.
Because affected configure files can be discovered automatically, this
patch introduces a hook (enabled only when building for powerpc64 and
powerpc64le) that uses a script to scan and fix each package.
Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/pkg-autotools.mk')
-rw-r--r-- | package/pkg-autotools.mk | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk index d1cdb89fb..00822e2a9 100644 --- a/package/pkg-autotools.mk +++ b/package/pkg-autotools.mk @@ -79,6 +79,15 @@ define LIBTOOL_PATCH_HOOK endef # +# Hook to patch common issue with configure on powerpc64{,le} failing +# to detect shared library support: +# +define CONFIGURE_FIX_POWERPC64_HOOK + @$(call MESSAGE,"Checking configure (powerpc64/powerpc64le)") + support/scripts/fix-configure-powerpc64.sh $($(PKG)_DIR) +endef + +# # Hook to gettextize the package if needed # define GETTEXTIZE_HOOK @@ -255,6 +264,13 @@ endif endif +# Append a configure hook if building for a powerpc64 (or powerpc64le) arch. +# Must be added after other pre-configure hooks that might regenerate the +# configure script and overwrite the changes made here. +ifneq ($$(filter powerpc64%,$$(if $$(filter target,$(4)),$$(ARCH),$$(HOSTARCH))),) +$(2)_PRE_CONFIGURE_HOOKS += CONFIGURE_FIX_POWERPC64_HOOK +endif + # # Build step. Only define it if not already defined by the package .mk # file. |