Tags: patch

Hi,

As James proposed I added -mxgot to the cxx flags for mips64el.

With attached patch I was able to build iwyu successfully for mips64el.

Thanks,
Daniel
--- debian/rules	2016-10-06 06:06:05.000000000 +0000
+++ debian/rules	2016-10-06 05:33:16.000000000 +0000
@@ -6,12 +6,18 @@
 
 TARGET_BUILD=iwyu-build
 VERSION=$(shell dpkg-parsechangelog |grep "^Version:"|sed -e "s|Version: \(.*\)|\1|")
+DEB_BUILD_ARCH?=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
+ADDITIONAL_CXX_FLAGS=""
+
+ifneq (,$(filter $(DEB_BUILD_ARCH),mips64el))
+	ADDITIONAL_CXX_FLAGS += -mxgot
+endif
 
 %:
 	dh $@ --buildsystem=cmake --builddirectory=$(TARGET_BUILD)
 
 override_dh_auto_configure:
-	dh_auto_configure -- -DLLVM_PATH=/usr/lib/llvm-3.8/
+	dh_auto_configure -- -DLLVM_PATH=/usr/lib/llvm-3.8/ -DCMAKE_CXX_FLAGS="$(ADDITIONAL_CXX_FLAGS)"
 
 override_dh_auto_build:
 	dh_auto_build

Reply via email to