thrift: fix m68k uclinux compile
authorWaldemar Brodkorb <wbx@openadk.org>
Mon, 8 Aug 2016 04:47:48 +0000 (06:47 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 8 Aug 2016 21:47:46 +0000 (23:47 +0200)
The GCC manual suggest when getting:
relocation truncated to fit: R_68K_GOT16O foobar
to use -mxgot.

The failures happens after gnuplot compiles.

Fixes:
  http://autobuild.buildroot.net/results/d1e030c42f43f49575f36ecc82e9dd9018ca4f73/

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

index a40ddadb15635819eeaa3c2618b6febb669bc040..185e1ec1c3a6f6944b26e7effc2759bb26f4c0bd 100644 (file)
@@ -25,6 +25,11 @@ THRIFT_AUTORECONF_OPTS = -I $(HOST_DIR)/usr/share/autoconf-archive
 THRIFT_LICENSE = Apache-2.0
 THRIFT_LICENSE_FILES = LICENSE
 
+# relocation truncated to fit: R_68K_GOT16O
+ifeq ($(BR2_m68k_cf),y)
+THRIFT_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -mxgot"
+endif
+
 ifeq ($(BR2_STATIC_LIBS),y)
 # openssl uses zlib, so we need to explicitly link with it when static
 THRIFT_CONF_ENV += LIBS=-lz