Skip to content

Commit c92104a

Browse files
authored
Update cross compile info
1 parent e1eef56 commit c92104a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,17 @@ build options you plan to set.
6767
### Cross compile
6868

6969
Set `CC` and `FC` to point to the cross toolchains, and set `HOSTCC` to your host C compiler.
70-
The target must be specified explicitly when cross compiling.
70+
The target must be specified explicitly when cross compiling. The `CROSS=1` flag should be specified.
7171

7272
Examples:
7373

7474
* On an x86 box, compile this library for a loongson3a CPU:
7575
```sh
76-
make BINARY=64 CC=mips64el-unknown-linux-gnu-gcc FC=mips64el-unknown-linux-gnu-gfortran HOSTCC=gcc TARGET=LOONGSON3A
76+
make BINARY=64 CC=mips64el-unknown-linux-gnu-gcc FC=mips64el-unknown-linux-gnu-gfortran HOSTCC=gcc TARGET=LOONGSON3A CROSS=1
7777
```
7878
or same with the newer mips-crosscompiler put out by Loongson that defaults to the 32bit ABI:
7979
```sh
80-
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
80+
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
8181
```
8282

8383
* On an x86 box, compile this library for a loongson3a CPU with loongcc (based on Open64) compiler:

0 commit comments

Comments
 (0)