[tbb] 02/06: Fix FTCBFS: Pass build configuration to make. Targets: #837179
Steven Capper
capper-guest at moszumanska.debian.org
Sun Jul 23 18:01:50 UTC 2017
This is an automated email from the git hooks/post-receive script.
capper-guest pushed a commit to branch steve-staging
in repository tbb.
commit f91fe4bc529f3a706281f4ad70e6f53d4c484c28
Author: Helmut Grohne <helmut at subdivi.de>
Date: Sun Jul 23 15:17:02 2017 +0100
Fix FTCBFS: Pass build configuration to make. Targets: #837179
---
debian/patches/cross.patch | 33 +++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 39 ++++++++++++++++++++++++++++++++++++++-
3 files changed, 72 insertions(+), 1 deletion(-)
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch
new file mode 100644
index 0000000..88f81a2
--- /dev/null
+++ b/debian/patches/cross.patch
@@ -0,0 +1,33 @@
+From: Helmut Grohne <helmut at subdivi.de>
+Subject: have tbb honour $(CC) and $(CXX)
+
+Index: tbb-4.3~20150611/build/FreeBSD.gcc.inc
+===================================================================
+--- tbb-4.3~20150611.orig/build/FreeBSD.gcc.inc
++++ tbb-4.3~20150611/build/FreeBSD.gcc.inc
+@@ -28,8 +28,8 @@
+ DYLIB_KEY = -shared
+ WARNING_SUPPRESS = -Wno-parentheses
+
+-CPLUS = g++
+-CONLY = gcc
++CPLUS = $(CXX)
++CONLY = $(CC)
+ LIB_LINK_FLAGS = -shared
+ LIBS = -lpthread
+ C_FLAGS = $(CPLUS_FLAGS)
+Index: tbb-4.3~20150611/build/linux.gcc.inc
+===================================================================
+--- tbb-4.3~20150611.orig/build/linux.gcc.inc
++++ tbb-4.3~20150611/build/linux.gcc.inc
+@@ -32,8 +32,8 @@
+ EXPORT_KEY = -Wl,--version-script,
+ LIBDL = -ldl
+
+-CPLUS = g++
+-CONLY = gcc
++CPLUS = $(CXX)
++CONLY = $(CC)
+ LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
+ LIBS += -lpthread -lrt
+ LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
diff --git a/debian/patches/series b/debian/patches/series
index 9011036..31f15dd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ gcc-atomic-detection.patch
gcc-atomic-always.patch
tweak-64bits-s390-hppa.patch
removejsquery.patch
+cross.patch
diff --git a/debian/rules b/debian/rules
index 43b8be1..d694657 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,9 +5,46 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
+include /usr/share/dpkg/architecture.mk
CFLAGS+=$(CPPFLAGS)
CXXFLAGS+=$(CPPFLAGS)
+ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
+
+# Provide OS=
+OS_MAP_linux = Linux
+OS_MAP_kfreebsd = GNU/kFreeBSD
+OS_MAP_hurd = GNU
+ifneq ($(OS_MAP_$(DEB_HOST_ARCH_OS)),)
+BUILD_FLAGS += OS=$(OS_MAP_$(DEB_HOST_ARCH_OS))
+endif
+
+# Provide compiler information
+BUILD_FLAGS += compiler=gcc
+BUILD_FLAGS += CC=$(DEB_HOST_GNU_TYPE)-gcc
+BUILD_FLAGS += CXX=$(DEB_HOST_GNU_TYPE)-g++
+
+# Provide arch=
+arch_MAP_amd64 = intel64
+arch_MAP_i386 = ia32
+arch_MAP_mips64el = mips64
+arch_MAP_powerpc = ppc32
+arch_MAP_ppc64 = ppc64
+arch_MAP_ppc64el = ppc64le
+ifneq ($(arch_MAP_$(DEB_HOST_ARCH_CPU)),)
+BUILD_FLAGS += arch=$(arch_MAP_$(DEB_HOST_ARCH_CPU))
+else
+ifeq ($(DEB_HOST_ARCH),armhf)
+BUILD_FLAGS += arch=armv7
+else
+# covers arm64, ia64, mips, sparc64, etc.
+BUILD_FLAGS += arch=$(DEB_HOST_GNU_CPU)
+endif
+endif
+
+endif
+
+
%:
dh $@ --parallel --dbg-package=libtbb2-dbg
@@ -20,7 +57,7 @@ override_dh_auto_build:
sed -e"s/@VERSION@/$(VERSION)/g;s/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g" \
debian/tbb.pc.in > debian/tbb.pc
- dh_auto_build
+ dh_auto_build -- $(BUILD_FLAGS)
# Makefiles should not be compressed (tbb-examples)
override_dh_compress-indep:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/tbb.git
More information about the debian-science-commits
mailing list