Tidy up CLAPACK patches (#862)

This commit is contained in:
Dexter Chua 2020-12-15 01:04:02 +08:00 committed by GitHub
parent 3dbb4ebff3
commit 1a0a474f94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 89 additions and 112 deletions

View File

@ -32,3 +32,4 @@ $(SRC)/Makefile:
cd $(SRC); \
(cat ../patches/*.patch | patch -p1) \
)
cp make.inc $(SRC)

View File

@ -1,2 +0,0 @@
CFLAGS_OPT=-Os -s INLINING_LIMIT=5
LDFLAGS_OPT=-Os -s INLINING_LIMIT=5

81
packages/CLAPACK/make.inc Normal file
View File

@ -0,0 +1,81 @@
# -*- Makefile -*-
####################################################################
# LAPACK make include file. #
# LAPACK, Version 3.2.1 #
# June 2009 #
####################################################################
#
# See the INSTALL/ directory for more examples.
#
SHELL = /bin/sh
#
# The machine (platform) identifier to append to the library names
#
# WA for WebAssembly
PLAT = _WA
#
# Modify the FORTRAN and OPTS definitions to refer to the
# compiler and desired compiler options for your machine. NOOPT
# refers to the compiler options desired when NO OPTIMIZATION is
# selected. Define LOADER and LOADOPTS to refer to the loader
# and desired load options for your machine.
#
#######################################################
# This is used to compile C libary
#CC = gcc # inherit $CC from emmake
# if no wrapping of the blas library is needed, uncomment next line
#CC = gcc -DNO_BLAS_WRAP
CFLAGS = -O3 -I$(TOPDIR)/INCLUDE -fPIC -DNO_BLAS_WRAP
LDFLAGS = -O3
LOADER = $(CC)
LOADOPTS =
NOOPT = -O0 -I$(TOPDIR)/INCLUDE
DRVCFLAGS = $(CFLAGS)
F2CCFLAGS = $(CFLAGS)
#######################################################################
#
# Timer for the SECOND and DSECND routines
#
# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
# TIMER = EXT_ETIME
# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
# TIMER = EXT_ETIME_
# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
# TIMER = INT_ETIME
# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
# SECOND and DSECND will use a call to the Fortran standard INTERNAL FUNCTION CPU_TIME
TIMER = INT_CPU_TIME
# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
# TIMER = NONE
#
# The archiver and the flag(s) to use when building archive (library)
# If you system has no ranlib, set RANLIB = echo.
#
ARCH = ar
ARCHFLAGS= cr
RANLIB = ranlib
#
# The location of BLAS library for linking the testing programs.
# The target's machine-specific, optimized BLAS library should be
# used whenever possible.
#
BLASLIB = ../../blas$(PLAT).bc
#
# Location of the extended-precision BLAS (XBLAS) Fortran library
# used for building and testing extended-precision routines. The
# relevant routines will be compiled and XBLAS will be linked only if
# USEXBLAS is defined.
#
# USEXBLAS = Yes
XBLASLIB =
# XBLASLIB = -lxblas
#
# Names of generated libraries.
#
LAPACKLIB = lapack$(PLAT).bc
F2CLIB = ../../F2CLIBS/libf2c.bc
TMGLIB = tmglib$(PLAT).bc
EIGSRCLIB = eigsrc$(PLAT).bc
LINSRCLIB = linsrc$(PLAT).bc

View File

@ -1,4 +1,4 @@
commit 59d50b7beb0f004f3ce690bac9ccbe7b558ee296
commit 423fe1e36498c0e42508d7d92521f4a4665c60ab
Author: Adrian Bauer <agbauer@gmail.com>
Date: Tue Sep 19 13:30:49 2017 -0700
@ -7,7 +7,7 @@ Date: Tue Sep 19 13:30:49 2017 -0700
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
diff --git a/BLAS/SRC/Makefile b/BLAS/SRC/Makefile
index 4835fd2..a062032 100644
index 4835fd2..e52e4ed 100644
--- a/BLAS/SRC/Makefile
+++ b/BLAS/SRC/Makefile
@@ -139,8 +139,7 @@ ALLOBJ=$(SBLAS1) $(SBLAS2) $(SBLAS3) $(DBLAS1) $(DBLAS2) $(DBLAS3) \
@ -186,89 +186,3 @@ index 223f4da..7491963 100644
single: $(SLASRC) $(ALLAUX) $(SCLAUX)
$(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(ALLAUX) \
diff --git a/make.inc b/make.inc
new file mode 100644
index 0000000..41020d9
--- /dev/null
+++ b/make.inc
@@ -0,0 +1,80 @@
+# -*- Makefile -*-
+####################################################################
+# LAPACK make include file. #
+# LAPACK, Version 3.2.1 #
+# June 2009 #
+####################################################################
+#
+# See the INSTALL/ directory for more examples.
+#
+SHELL = /bin/sh
+#
+# The machine (platform) identifier to append to the library names
+#
+# WA for WebAssembly
+PLAT = _WA
+#
+# Modify the FORTRAN and OPTS definitions to refer to the
+# compiler and desired compiler options for your machine. NOOPT
+# refers to the compiler options desired when NO OPTIMIZATION is
+# selected. Define LOADER and LOADOPTS to refer to the loader
+# and desired load options for your machine.
+#
+#######################################################
+# This is used to compile C libary
+#CC = gcc # inherit $CC from emmake
+# if no wrapping of the blas library is needed, uncomment next line
+#CC = gcc -DNO_BLAS_WRAP
+CFLAGS = -O3 -I$(TOPDIR)/INCLUDE -fPIC -DNO_BLAS_WRAP
+LDFLAGS = -O3
+LOADER = $(CC)
+LOADOPTS =
+NOOPT = -O0 -I$(TOPDIR)/INCLUDE
+DRVCFLAGS = $(CFLAGS)
+F2CCFLAGS = $(CFLAGS)
+#######################################################################
+
+#
+# Timer for the SECOND and DSECND routines
+#
+# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
+# TIMER = EXT_ETIME
+# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
+# TIMER = EXT_ETIME_
+# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
+# TIMER = INT_ETIME
+# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
+# SECOND and DSECND will use a call to the Fortran standard INTERNAL FUNCTION CPU_TIME
+TIMER = INT_CPU_TIME
+# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
+# TIMER = NONE
+#
+# The archiver and the flag(s) to use when building archive (library)
+# If you system has no ranlib, set RANLIB = echo.
+#
+ARCH = ar
+ARCHFLAGS= cr
+RANLIB = ranlib
+#
+# The location of BLAS library for linking the testing programs.
+# The target's machine-specific, optimized BLAS library should be
+# used whenever possible.
+#
+BLASLIB = ../../blas$(PLAT).bc
+#
+# Location of the extended-precision BLAS (XBLAS) Fortran library
+# used for building and testing extended-precision routines. The
+# relevant routines will be compiled and XBLAS will be linked only if
+# USEXBLAS is defined.
+#
+# USEXBLAS = Yes
+XBLASLIB =
+# XBLASLIB = -lxblas
+#
+# Names of generated libraries.
+#
+LAPACKLIB = lapack$(PLAT).bc
+F2CLIB = ../../F2CLIBS/libf2c.bc
+TMGLIB = tmglib$(PLAT).bc
+EIGSRCLIB = eigsrc$(PLAT).bc
+LINSRCLIB = linsrc$(PLAT).bc

View File

@ -1,26 +1,9 @@
From 8aae131e7bf4cfe3979edbbdce21803e1c5f9ac1 Mon Sep 17 00:00:00 2001
From: Roman Yurchak <rth.yurchak@pm.me>
Date: Thu, 25 Oct 2018 11:50:14 +0200
Subject: [PATCH 3/3] Remove redundant symbols
commit 75c2ad0e2f981805b55eef6a8b69e502c07da2bf
Author: Roman Yurchak <rth.yurchak@pm.me>
Date: Thu Oct 25 11:50:14 2018 +0200
---
Makefile | 9 +++++++++
SRC/Makefile | 30 ++++++++++++++++++++----------
make.inc | 6 +-----
3 files changed, 30 insertions(+), 15 deletions(-)
Remove redundant symbols
diff --git a/Makefile b/Makefile
index b3467a6..83baba5 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@
#
include make.inc
+include ../Makefile.envs
all: f2clib lib
#all: f2clib lapack_install lib lapack_testing blas_testing variants_testing
diff --git a/SRC/Makefile b/SRC/Makefile
index 7491963..0cc1cda 100644
--- a/SRC/Makefile