summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-devtools/suitesparse/suitesparse/makefile-quoting.patch32
-rw-r--r--meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb17
2 files changed, 37 insertions, 12 deletions
diff --git a/meta-oe/recipes-devtools/suitesparse/suitesparse/makefile-quoting.patch b/meta-oe/recipes-devtools/suitesparse/suitesparse/makefile-quoting.patch
new file mode 100644
index 0000000000..6bd2ffbb55
--- /dev/null
+++ b/meta-oe/recipes-devtools/suitesparse/suitesparse/makefile-quoting.patch
@@ -0,0 +1,32 @@
1OE's CC and CXX contain spaces and extra options which is incompatible with
2cmake way of handling them. Remove passing the compiler options this way in
3favour of our normal cmake toolchain files added elsewhere.
4
5Upstream-Status: Pending
6
7Index: git/Makefile
8===================================================================
9--- git.orig/Makefile
10+++ git/Makefile
11@@ -282,7 +282,7 @@ metis: include/metis.h
12 # hardcoded below.
13 include/metis.h:
14 ifeq (,$(MY_METIS_LIB))
15- - ( cd metis-5.1.0 && $(MAKE) config shared=1 prefix=$(SUITESPARSE) cc=$(CC) )
16+ - ( cd metis-5.1.0 && $(MAKE) config shared=1 prefix=$(SUITESPARSE) )
17 - ( cd metis-5.1.0 && $(MAKE) )
18 - ( cd metis-5.1.0 && $(MAKE) install )
19 - $(SO_INSTALL_NAME) $(SUITESPARSE)/lib/libmetis.dylib \
20Index: git/SuiteSparse_config/SuiteSparse_config.mk
21===================================================================
22--- git.orig/SuiteSparse_config/SuiteSparse_config.mk
23+++ git/SuiteSparse_config/SuiteSparse_config.mk
24@@ -146,7 +146,7 @@ SUITESPARSE_VERSION = 5.10.1
25 endif
26 endif
27
28- CMAKE_OPTIONS += -DCMAKE_CXX_COMPILER=$(CXX) -DCMAKE_C_COMPILER=$(CC)
29+ #CMAKE_OPTIONS += -DCMAKE_CXX_COMPILER=$(CXX) -DCMAKE_C_COMPILER=$(CC)
30
31 #---------------------------------------------------------------------------
32 # CFLAGS for the C/C++ compiler
diff --git a/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb b/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb
index 13e6fd066c..29f114a9dc 100644
--- a/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb
+++ b/meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb
@@ -4,6 +4,7 @@ SRC_URI = "git://github.com/DrTimothyAldenDavis/SuiteSparse;protocol=https;branc
4 file://0001-Preserve-CXXFLAGS-from-environment-in-Mongoose.patch \ 4 file://0001-Preserve-CXXFLAGS-from-environment-in-Mongoose.patch \
5 file://0002-Preserve-links-when-installing-libmetis.patch \ 5 file://0002-Preserve-links-when-installing-libmetis.patch \
6 file://0003-Add-version-information-to-libmetis.patch \ 6 file://0003-Add-version-information-to-libmetis.patch \
7 file://makefile-quoting.patch \
7 " 8 "
8SRCREV = "538273cfd53720a10e34a3d80d3779b607e1ac26" 9SRCREV = "538273cfd53720a10e34a3d80d3779b607e1ac26"
9 10
@@ -14,25 +15,17 @@ DEPENDS = "cmake-native lapack gmp mpfr chrpath-native"
14PROVIDES = "mongoose graphblas" 15PROVIDES = "mongoose graphblas"
15RPROVIDES:${PN} = "mongoose graphblas" 16RPROVIDES:${PN} = "mongoose graphblas"
16 17
17# The values of $CC, $CXX, and $LD that Bitbake uses have spaces in them which 18inherit cmake
18# causes problems when the SuiteSparse Makefiles try to pass these values on
19# the command line. To get around this problem, set these variables to only the
20# program name and prepend the rest of the value onto the corresponding FLAGS
21# variable.
22CFLAGS:prepend := "${@" ".join(d.getVar('CC').split()[1:])} "
23export CC := "${@d.getVar('CC').split()[0]}"
24 19
25CXXFLAGS:prepend := "${@" ".join(d.getVar('CXX').split()[1:])} " 20B = "${S}"
26export CXX := "${@d.getVar('CXX').split()[0]}"
27
28LDFLAGS:prepend := "${@" ".join(d.getVar('LD').split()[1:])} "
29export LD := "${@d.getVar('LD').split()[0]}"
30 21
31export CMAKE_OPTIONS = " \ 22export CMAKE_OPTIONS = " \
32 -DCMAKE_INSTALL_PREFIX=${D}${prefix} \ 23 -DCMAKE_INSTALL_PREFIX=${D}${prefix} \
33 -DCMAKE_INSTALL_LIBDIR=${baselib} \ 24 -DCMAKE_INSTALL_LIBDIR=${baselib} \
34" 25"
35 26
27OECMAKE_SOURCEPATH = "${S}/Mongoose ${S}/metis-5.1.0 ${S}/GraphBLAS"
28
36do_compile () { 29do_compile () {
37 oe_runmake library 30 oe_runmake library
38} 31}