[lapack] 01/01: using arch-specific compilers, binutils
Sébastien Villemot
sebastien at debian.org
Mon Aug 28 14:39:33 UTC 2017
This is an automated email from the git hooks/post-receive script.
sebastien pushed a commit to branch master
in repository lapack.
commit 3a8f2cfec68a78152d2315d6a859b0edde41d371
Author: Dima Kogan <dkogan at debian.org>
Date: Tue Aug 22 17:54:36 2017 -0700
using arch-specific compilers, binutils
---
debian/rules | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/debian/rules b/debian/rules
index ec49c0e..7846aae 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,11 +9,21 @@ SO:=3
BUILDFLAGS_ENV:=DEB_LDFLAGS_MAINT_STRIP="-Wl,-Bsymbolic-functions"
LDFLAGS:=$(shell $(BUILDFLAGS_ENV) dpkg-buildflags --get LDFLAGS)
-F77:=gfortran
+# if F77 isn't explicitly set (default or undefined), set it to the compiler for
+# our host architecture. This may be a cross compiler
+ifneq ($(filter default undefined,$(origin F77)),)
+F77 := /usr/bin/$(DEB_HOST_GNU_TYPE)-gfortran
+endif
+
FFLAGS:=$(shell dpkg-buildflags --get FFLAGS)
FFLAGS_NOOPT:=$(shell DEB_BUILD_OPTIONS=noopt dpkg-buildflags --get FFLAGS)
-CC:=/usr/bin/cc
+# if CC isn't explicitly set (default or undefined), set it to the compiler for
+# our host architecture. This may be a cross compiler
+ifneq ($(filter default undefined,$(origin CC)),)
+CC := /usr/bin/$(DEB_HOST_GNU_TYPE)-gcc
+endif
+
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
@@ -50,10 +60,14 @@ endif
dh $@
make.inc: INSTALL/make.inc.gfortran
- sed -e "s,\(^CC *=\).*,\1 /usr/bin/cc,1" \
+ sed -e "s,\(^CC *=\).*,\1 $(CC),1" \
+ -e "s,\(^FORTRAN *=\).*,\1 $(F77),1" \
-e "s,\(^NOOPT *=\).*,\1 \$$(PICOPTS) $(FFLAGS_NOOPT),1" \
-e "s,\(^OPTS *=\).*,\1 \$$(PICOPTS) $(FFLAGS),1" \
+ -e "s,\(^LOADER *=\).*,\1 $(F77),1" \
-e "s/\(^LOADOPTS *=\).*/\1 $(LDFLAGS)/1" \
+ -e "s,\(^ARCH *=\).*,\1 /usr/bin/$(DEB_HOST_GNU_TYPE)-ar,1" \
+ -e "s,\(^RANLIB *=\).*,\1 /usr/bin/$(DEB_HOST_GNU_TYPE)-ranlib,1" \
-e "s,\(^CFLAGS *=\).*,\1 $(CPPFLAGS) \$$(PICOPTS) $(CFLAGS),1" \
< $< > $@
# Build deprecated routines (see #810143)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/lapack.git
More information about the debian-science-commits
mailing list