diff --git a/Makefile.system b/Makefile.system index 526be236d..fa952b2f4 100644 --- a/Makefile.system +++ b/Makefile.system @@ -678,6 +678,11 @@ endif ifeq ($(ARCH), mips64) DYNAMIC_CORE = LOONGSON3R3 LOONGSON3R4 MIPS64_GENERIC +ifdef DYNAMIC_LIST +override DYNAMIC_CORE = MIPS64_GENERIC $(DYNAMIC_LIST) +XCCOMMON_OPT = -DDYNAMIC_LIST -DDYN_MIPS64_GENERIC +XCCOMMON_OPT += $(foreach dcore,$(DYNAMIC_LIST),-DDYN_$(dcore)) +endif endif ifeq ($(ARCH), loongarch64) diff --git a/driver/others/dynamic_mips64.c b/driver/others/dynamic_mips64.c index 7a1d5228c..7fc347b0c 100644 --- a/driver/others/dynamic_mips64.c +++ b/driver/others/dynamic_mips64.c @@ -47,9 +47,23 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif #endif +#ifdef DYNAMIC_LIST +extern gotoblas_t gotoblas_MIPS64_GENERIC; +#ifdef DYN_LOONGSON3R3 +extern gotoblas_t gotoblas_LOONGSON3R3; +#else +#define gotoblas_LOONGSON3R3 gotoblas_MIPS64_GENERIC +#endif +#ifdef DYN_LOONGSON3R4 +extern gotoblas_t gotoblas_LOONGSON3R4; +#else +#define gotoblas_LOONGSON3R4 gotoblas_MIPS64_GENERIC +#endif +#else extern gotoblas_t gotoblas_LOONGSON3R3; extern gotoblas_t gotoblas_LOONGSON3R4; extern gotoblas_t gotoblas_MIPS64_GENERIC; +#endif extern void openblas_warning(int verbose, const char * msg);