From c92104a6058775f64c677ff3cea3768e2e4f097a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20Nikoli=C4=87?= Date: Fri, 5 Jul 2024 12:32:58 -0700 Subject: [PATCH 1/2] Update cross compile info --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b52e48564..578ab209a 100644 --- a/README.md +++ b/README.md @@ -67,17 +67,17 @@ build options you plan to set. ### Cross compile Set `CC` and `FC` to point to the cross toolchains, and set `HOSTCC` to your host C compiler. -The target must be specified explicitly when cross compiling. +The target must be specified explicitly when cross compiling. The `CROSS=1` flag should be specified. Examples: * On an x86 box, compile this library for a loongson3a CPU: ```sh - make BINARY=64 CC=mips64el-unknown-linux-gnu-gcc FC=mips64el-unknown-linux-gnu-gfortran HOSTCC=gcc TARGET=LOONGSON3A + make BINARY=64 CC=mips64el-unknown-linux-gnu-gcc FC=mips64el-unknown-linux-gnu-gfortran HOSTCC=gcc TARGET=LOONGSON3A CROSS=1 ``` or same with the newer mips-crosscompiler put out by Loongson that defaults to the 32bit ABI: ```sh - make HOSTCC=gcc CC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gcc -mabi=64' FC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gfortran -mabi=64' TARGET=LOONGSON3A + make HOSTCC=gcc CC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gcc -mabi=64' FC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gfortran -mabi=64' TARGET=LOONGSON3A CROSS=1 ``` * On an x86 box, compile this library for a loongson3a CPU with loongcc (based on Open64) compiler: From 2d84ed7e76cb6533d28d3c54f2443727ae4e9fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20Nikoli=C4=87?= Date: Wed, 14 Aug 2024 14:31:35 -0700 Subject: [PATCH 2/2] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 578ab209a..e250be626 100644 --- a/README.md +++ b/README.md @@ -67,17 +67,17 @@ build options you plan to set. ### Cross compile Set `CC` and `FC` to point to the cross toolchains, and set `HOSTCC` to your host C compiler. -The target must be specified explicitly when cross compiling. The `CROSS=1` flag should be specified. +The target must be specified explicitly when cross compiling. Examples: * On an x86 box, compile this library for a loongson3a CPU: ```sh - make BINARY=64 CC=mips64el-unknown-linux-gnu-gcc FC=mips64el-unknown-linux-gnu-gfortran HOSTCC=gcc TARGET=LOONGSON3A CROSS=1 + make BINARY=64 CC=mips64el-unknown-linux-gnu-gcc FC=mips64el-unknown-linux-gnu-gfortran HOSTCC=gcc TARGET=LOONGSON3A ``` or same with the newer mips-crosscompiler put out by Loongson that defaults to the 32bit ABI: ```sh - make HOSTCC=gcc CC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gcc -mabi=64' FC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gfortran -mabi=64' TARGET=LOONGSON3A CROSS=1 + make HOSTCC=gcc CC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gcc -mabi=64' FC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gfortran -mabi=64' TARGET=LOONGSON3A ``` * On an x86 box, compile this library for a loongson3a CPU with loongcc (based on Open64) compiler: @@ -85,6 +85,8 @@ Examples: make CC=loongcc FC=loongf95 HOSTCC=gcc TARGET=LOONGSON3A CROSS=1 CROSS_SUFFIX=mips64el-st-linux-gnu- NO_LAPACKE=1 NO_SHARED=1 BINARY=32 ``` +When compiling for a more modern CPU TARGET of the same architecture, e.g. TARGET=SKYLAKEX on a HASWELL host, option "CROSS=1" can be used to suppress the automatic invocation of the tests at the end of the build. + ### Debug version A debug version can be built using `make DEBUG=1`.