From 2f6326a630f074489e8dcc0a53afce88fc800151 Mon Sep 17 00:00:00 2001 From: River Dillon Date: Sat, 10 Jul 2021 00:36:07 -0700 Subject: [PATCH 1/6] Remove --- driver/others/memory.c | 1 - 1 file changed, 1 deletion(-) diff --git a/driver/others/memory.c b/driver/others/memory.c index 63fa6a566..6e654ccf2 100644 --- a/driver/others/memory.c +++ b/driver/others/memory.c @@ -1702,7 +1702,6 @@ inline int atoi(const char *str) { return 0; } #include #include #include -#include #include #include #include From 220f6a1c556a5cc94eb7bc230e64074bdc0a6d04 Mon Sep 17 00:00:00 2001 From: River Dillon Date: Sat, 10 Jul 2021 00:38:02 -0700 Subject: [PATCH 2/6] Add feature test macro for proper inclusion of --- openblas_config_template.h | 1 + 1 file changed, 1 insertion(+) diff --git a/openblas_config_template.h b/openblas_config_template.h index 858b8c5cb..1e17c9a16 100644 --- a/openblas_config_template.h +++ b/openblas_config_template.h @@ -99,5 +99,6 @@ typedef int blasint; /* Inclusion of Linux-specific header is needed for definition of cpu_set_t. */ #ifdef OPENBLAS_OS_LINUX +#define _GNU_SOURCE #include #endif From cecc2c65aad40f8f4a261ae503b92936c0b147f4 Mon Sep 17 00:00:00 2001 From: River Dillon Date: Sat, 10 Jul 2021 00:39:52 -0700 Subject: [PATCH 3/6] Add test of installed --- Makefile | 10 ++++++++-- test_install/Makefile | 15 +++++++++++++++ test_install/test_sched_include.c | 5 +++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 test_install/Makefile create mode 100644 test_install/test_sched_include.c diff --git a/Makefile b/Makefile index 555d1c467..d31cc9c83 100644 --- a/Makefile +++ b/Makefile @@ -34,9 +34,9 @@ endif LAPACK_NOOPT := $(filter-out -O0 -O1 -O2 -O3 -Ofast,$(LAPACK_FFLAGS)) -SUBDIRS_ALL = $(SUBDIRS) test ctest utest exports benchmark ../laswp ../bench cpp_thread_test +SUBDIRS_ALL = $(SUBDIRS) test ctest utest test_install exports benchmark ../laswp ../bench cpp_thread_test -.PHONY : all libs netlib $(RELA) test ctest shared install +.PHONY : all libs netlib $(RELA) test ctest test_install shared install .NOTPARALLEL : all libs $(RELA) prof lapack-test install blas-test all :: libs netlib $(RELA) tests shared @@ -155,6 +155,11 @@ endif endif endif +test_install : + mkdir -p install + PREFIX=install $(MAKE) install + $(MAKE) -C test_install all + libs : ifeq ($(CORE), UNKNOWN) $(error OpenBLAS: Detecting CPU failed. Please set TARGET explicitly, e.g. make TARGET=your_cpu_target. Please read README for the detail.) @@ -399,4 +404,5 @@ endif @$(MAKE) -C relapack clean @rm -f *.grd Makefile.conf_last config_last.h @(cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out testing_results.txt) + @rm -rf install @echo Done. diff --git a/test_install/Makefile b/test_install/Makefile new file mode 100644 index 000000000..29cd81322 --- /dev/null +++ b/test_install/Makefile @@ -0,0 +1,15 @@ +# +# tests of installed headers and libs +# + +INSTALLDIR = ../install + +.PHONY: all +all: test_sched_include + +test_sched_include: test_sched_include.c + $(CC) -c -I$(INSTALLDIR)/include $< + +.PHONY: clean +clean: + rm -f *.o diff --git a/test_install/test_sched_include.c b/test_install/test_sched_include.c new file mode 100644 index 000000000..aea35680d --- /dev/null +++ b/test_install/test_sched_include.c @@ -0,0 +1,5 @@ +// tests that inclusion of openblas_config.h works with musl + +#include + +cpu_set_t* cpu_set = NULL; From ddb6cee0d542464cef38c4b6532b4928df8807cc Mon Sep 17 00:00:00 2001 From: River Dillon Date: Sat, 10 Jul 2021 01:34:47 -0700 Subject: [PATCH 4/6] Contribution note --- CONTRIBUTORS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index be9a32a7c..6be41960c 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -194,3 +194,6 @@ In chronological order: * PingTouGe Semiconductor Co., Ltd. * [2020-10] Add RISC-V Vector (0.7.1) support. Optimize BLAS kernels for Xuantie C910 + +* River Dillon + * [2021-07-10] fix compilation with musl libc From 836c7fb9f5dc52402dad37ef7db8ff47d3870bda Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sun, 11 Jul 2021 14:37:38 +0200 Subject: [PATCH 5/6] Revert addition of test_install target --- Makefile | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index d31cc9c83..555d1c467 100644 --- a/Makefile +++ b/Makefile @@ -34,9 +34,9 @@ endif LAPACK_NOOPT := $(filter-out -O0 -O1 -O2 -O3 -Ofast,$(LAPACK_FFLAGS)) -SUBDIRS_ALL = $(SUBDIRS) test ctest utest test_install exports benchmark ../laswp ../bench cpp_thread_test +SUBDIRS_ALL = $(SUBDIRS) test ctest utest exports benchmark ../laswp ../bench cpp_thread_test -.PHONY : all libs netlib $(RELA) test ctest test_install shared install +.PHONY : all libs netlib $(RELA) test ctest shared install .NOTPARALLEL : all libs $(RELA) prof lapack-test install blas-test all :: libs netlib $(RELA) tests shared @@ -155,11 +155,6 @@ endif endif endif -test_install : - mkdir -p install - PREFIX=install $(MAKE) install - $(MAKE) -C test_install all - libs : ifeq ($(CORE), UNKNOWN) $(error OpenBLAS: Detecting CPU failed. Please set TARGET explicitly, e.g. make TARGET=your_cpu_target. Please read README for the detail.) @@ -404,5 +399,4 @@ endif @$(MAKE) -C relapack clean @rm -f *.grd Makefile.conf_last config_last.h @(cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out testing_results.txt) - @rm -rf install @echo Done. From eba2cd951e5851060dfbf1a2843b967b657b393f Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sun, 11 Jul 2021 14:38:49 +0200 Subject: [PATCH 6/6] Revert addition of test_install --- test_install/Makefile | 15 --------------- test_install/test_sched_include.c | 5 ----- 2 files changed, 20 deletions(-) delete mode 100644 test_install/Makefile delete mode 100644 test_install/test_sched_include.c diff --git a/test_install/Makefile b/test_install/Makefile deleted file mode 100644 index 29cd81322..000000000 --- a/test_install/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# -# tests of installed headers and libs -# - -INSTALLDIR = ../install - -.PHONY: all -all: test_sched_include - -test_sched_include: test_sched_include.c - $(CC) -c -I$(INSTALLDIR)/include $< - -.PHONY: clean -clean: - rm -f *.o diff --git a/test_install/test_sched_include.c b/test_install/test_sched_include.c deleted file mode 100644 index aea35680d..000000000 --- a/test_install/test_sched_include.c +++ /dev/null @@ -1,5 +0,0 @@ -// tests that inclusion of openblas_config.h works with musl - -#include - -cpu_set_t* cpu_set = NULL;