libxml2: fix m68k uclinux compile
authorWaldemar Brodkorb <wbx@openadk.org>
Wed, 10 Aug 2016 19:37:48 +0000 (21:37 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 10 Aug 2016 22:02:03 +0000 (00:02 +0200)
The GCC manual suggest when getting:
relocation truncated to fit: R_68K_GOT16O foobar
to use -mxgot.

Fixes:
  http://autobuild.buildroot.net/results/8a4e26bb1c0c64759e3914eced0a36baa0967f0b/

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libxml2/libxml2.mk

index ed6f9af49b3603c8878932fc84f07f2780ccdc3a..2a7153ad17f4651bd3cf1b842d95b653693e80e2 100644 (file)
@@ -11,6 +11,11 @@ LIBXML2_LICENSE = MIT
 LIBXML2_LICENSE_FILES = COPYING
 LIBXML2_CONFIG_SCRIPTS = xml2-config
 
+# relocation truncated to fit: R_68K_GOT16O
+ifeq ($(BR2_m68k_cf),y)
+LIBXML2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -mxgot"
+endif
+
 LIBXML2_CONF_OPTS = --with-gnu-ld --without-python --without-debug
 
 HOST_LIBXML2_DEPENDENCIES = host-pkgconf