diff --git a/Changelog.txt b/Changelog.txt index cc90ee198..9089096e5 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -19,6 +19,7 @@ common: * Fixed #25 a wrong result of rotmg. * Fixed a bug about detecting underscore prefix in c_check. * Print the wall time (cycles) with enabling FUNCTION_PROFILE + * Fixed #35 a build bug with NO_LAPACK=1 & DYNAMIC_ARCH=1 x86/x86_64: * Fixed #28 a wrong result of dsdot on x86_64. diff --git a/Makefile.system b/Makefile.system index 6fb0ec86f..7686c938b 100644 --- a/Makefile.system +++ b/Makefile.system @@ -515,6 +515,10 @@ ifeq ($(DYNAMIC_ARCH), 1) CCOMMON_OPT += -DDYNAMIC_ARCH endif +ifeq ($(NO_LAPACK), 1) +CCOMMON_OPT += -DNO_LAPACK +endif + ifdef SMP CCOMMON_OPT += -DSMP_SERVER diff --git a/kernel/Makefile b/kernel/Makefile index 6084cbc3f..a3a32de81 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -53,6 +53,11 @@ SBLASOBJS += setparam$(TSUFFIX).$(SUFFIX) CCOMMON_OPT += -DTS=$(TSUFFIX) endif +KERNEL_INTERFACE = ../common_level1.h ../common_level2.h ../common_level3.h +ifneq ($(NO_LAPACK), 1) +KERNEL_INTERFACE += ../common_lapack.h +endif + ifeq ($(ARCH), x86) COMMONOBJS += cpuid.$(SUFFIX) endif @@ -88,9 +93,10 @@ setparam$(TSUFFIX).$(SUFFIX): setparam$(TSUFFIX).c kernel$(TSUFFIX).h setparam$(TSUFFIX).c : setparam-ref.c sed 's/TS/$(TSUFFIX)/g' $< > $(@F) -kernel$(TSUFFIX).h : ../common_level1.h ../common_level2.h ../common_level3.h ../common_lapack.h +kernel$(TSUFFIX).h : $(KERNEL_INTERFACE) sed 's/\ *(/$(TSUFFIX)(/g' $^ > $(@F) + cpuid.$(SUFFIX): $(KERNELDIR)/cpuid.S $(CC) -c $(CFLAGS) $< -o $(@F) diff --git a/kernel/setparam-ref.c b/kernel/setparam-ref.c index 0ab57f3b3..73df7625a 100644 --- a/kernel/setparam-ref.c +++ b/kernel/setparam-ref.c @@ -101,7 +101,11 @@ gotoblas_t TABLE_NAME = { #endif ssymm_outcopyTS, ssymm_oltcopyTS, +#ifndef NO_LAPACK sneg_tcopyTS, slaswp_ncopyTS, +#else + NULL,NULL, +#endif 0, 0, 0, DGEMM_DEFAULT_UNROLL_M, DGEMM_DEFAULT_UNROLL_N, MAX(DGEMM_DEFAULT_UNROLL_M, DGEMM_DEFAULT_UNROLL_N), @@ -147,7 +151,11 @@ gotoblas_t TABLE_NAME = { #endif dsymm_outcopyTS, dsymm_oltcopyTS, +#ifndef NO_LAPACK dneg_tcopyTS, dlaswp_ncopyTS, +#else + NULL, NULL, +#endif #ifdef EXPRECISION @@ -286,7 +294,11 @@ gotoblas_t TABLE_NAME = { chemm3m_oucopyrTS, chemm3m_olcopyrTS, chemm3m_oucopyiTS, chemm3m_olcopyiTS, +#ifndef NO_LAPACK cneg_tcopyTS, claswp_ncopyTS, +#else + NULL, NULL, +#endif 0, 0, 0, ZGEMM_DEFAULT_UNROLL_M, ZGEMM_DEFAULT_UNROLL_N, MAX(ZGEMM_DEFAULT_UNROLL_M, ZGEMM_DEFAULT_UNROLL_N), @@ -375,7 +387,11 @@ gotoblas_t TABLE_NAME = { zhemm3m_oucopyrTS, zhemm3m_olcopyrTS, zhemm3m_oucopyiTS, zhemm3m_olcopyiTS, +#ifndef NO_LAPACK zneg_tcopyTS, zlaswp_ncopyTS, +#else + NULL, NULL, +#endif #ifdef EXPRECISION