Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loongarch64 cross compile failed! #780

Open
Linkcy97 opened this issue May 28, 2023 · 1 comment
Open

loongarch64 cross compile failed! #780

Linkcy97 opened this issue May 28, 2023 · 1 comment

Comments

@Linkcy97
Copy link

System Details

2k1000la

loongarch64-linux-gnu-2021-12-10-vector

Problems Description

root@linkcy-virtual-machine:/home/linkcy/Desktop/cross/libffi-3.4.3-target# make && make install
MAKE x86_64-pc-linux-gnu : 0 * all-all
make[1]: 进入目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu”
make all-recursive
make[2]: 进入目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu”
Making all in include
make[3]: 进入目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu/include”
make[3]: 对“all”无需做任何事。
make[3]: 离开目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu/include”
Making all in testsuite
make[3]: 进入目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu/testsuite”
make[3]: 对“all”无需做任何事。
make[3]: 离开目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu/testsuite”
Making all in man
make[3]: 进入目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu/man”
make[3]: 对“all”无需做任何事。
make[3]: 离开目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu/man”
Making all in doc
make[3]: 进入目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu/doc”
make[3]: 对“all”无需做任何事。
make[3]: 离开目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu/doc”
make[3]: 进入目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu”
depbase=echo src/prep_cif.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||';
/bin/bash ./libtool --tag=CC --mode=compile loongarch64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -Wall -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -fexceptions -MT src/prep_cif.lo -MD -MP -MF $depbase.Tpo -c -o src/prep_cif.lo ../src/prep_cif.c &&
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: loongarch64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -Wall -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -fexceptions -MT src/prep_cif.lo -MD -MP -MF src/.deps/prep_cif.Tpo -c ../src/prep_cif.c -fPIC -DPIC -o src/.libs/prep_cif.o
In file included from include/ffi.h:84,
from ../src/prep_cif.c:27:
include/ffitarget.h:63:2: error: #error unsupported LoongArch floating-point ABI
#error unsupported LoongArch floating-point ABI
^~~~~
make[3]: *** [Makefile:1319:src/prep_cif.lo] 错误 1
make[3]: 离开目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu”
make[2]: *** [Makefile:1396:all-recursive] 错误 1
make[2]: 离开目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu”
make[1]: *** [Makefile:624:all] 错误 2
make[1]: 离开目录“/home/linkcy/Desktop/cross/libffi-3.4.3-target/loongarch64-unknown-linux-gnu”
make: *** [Makefile:593:all-all] 错误 2

@inkydragon
Copy link

include/ffitarget.h:63:2: error: #error unsupported LoongArch floating-point ABI
#error unsupported LoongArch floating-point ABI
^~~~~

#if defined(__loongarch_soft_float)
FFI_DEFAULT_ABI = FFI_LP64S
#elif defined(__loongarch_single_float)
FFI_DEFAULT_ABI = FFI_LP64F
#elif defined(__loongarch_double_float)
FFI_DEFAULT_ABI = FFI_LP64D
#else
#error unsupported LoongArch floating-point ABI
#endif

You may not properly set the default ABI.

If possible also try to ask in the LoongArch community, as probably most people don't have a working environment to reproduce the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants