diff options
-rw-r--r-- | meta-oe/recipes-devtools/suitesparse/suitesparse/makefile-quoting.patch | 32 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/suitesparse/suitesparse_5.10.1.bb | 17 |
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 @@ | |||
1 | OE's CC and CXX contain spaces and extra options which is incompatible with | ||
2 | cmake way of handling them. Remove passing the compiler options this way in | ||
3 | favour of our normal cmake toolchain files added elsewhere. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Index: 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 \ | ||
20 | Index: 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 | " |
8 | SRCREV = "538273cfd53720a10e34a3d80d3779b607e1ac26" | 9 | SRCREV = "538273cfd53720a10e34a3d80d3779b607e1ac26" |
9 | 10 | ||
@@ -14,25 +15,17 @@ DEPENDS = "cmake-native lapack gmp mpfr chrpath-native" | |||
14 | PROVIDES = "mongoose graphblas" | 15 | PROVIDES = "mongoose graphblas" |
15 | RPROVIDES:${PN} = "mongoose graphblas" | 16 | RPROVIDES:${PN} = "mongoose graphblas" |
16 | 17 | ||
17 | # The values of $CC, $CXX, and $LD that Bitbake uses have spaces in them which | 18 | inherit 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. | ||
22 | CFLAGS:prepend := "${@" ".join(d.getVar('CC').split()[1:])} " | ||
23 | export CC := "${@d.getVar('CC').split()[0]}" | ||
24 | 19 | ||
25 | CXXFLAGS:prepend := "${@" ".join(d.getVar('CXX').split()[1:])} " | 20 | B = "${S}" |
26 | export CXX := "${@d.getVar('CXX').split()[0]}" | ||
27 | |||
28 | LDFLAGS:prepend := "${@" ".join(d.getVar('LD').split()[1:])} " | ||
29 | export LD := "${@d.getVar('LD').split()[0]}" | ||
30 | 21 | ||
31 | export CMAKE_OPTIONS = " \ | 22 | export 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 | ||
27 | OECMAKE_SOURCEPATH = "${S}/Mongoose ${S}/metis-5.1.0 ${S}/GraphBLAS" | ||
28 | |||
36 | do_compile () { | 29 | do_compile () { |
37 | oe_runmake library | 30 | oe_runmake library |
38 | } | 31 | } |