-
-
Notifications
You must be signed in to change notification settings - Fork 750
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
Unrecognised emulation mode when building simple yasm project #962
Comments
Can you let me see the whole configuration command and output. xmake f --toolchain=yasm
xmake -rv It works fine for me. $ xmake f -c --toolchain=yasm
checking for architecture ... x86_64
$ xmake -rv
[ 40%]: ccache compiling.release src/main.S
/usr/bin/yasm -I/usr/local/include -I/usr/include -f elf64 -o build/.objs/test/linux/x86_64/release/src/main.S.o src/main.S
[ 60%]: ccache compiling.release src/stub.c
/usr/bin/ccache /usr/bin/gcc -c -I/usr/local/include -I/usr/include -m64 -o build/.objs/test/linux/x86_64/release/src/stub.c.o src/stub.c
[ 80%]: linking.release test
/usr/bin/g++ -o build/linux/x86_64/release/test build/.objs/test/linux/x86_64/release/src/main.S.o build/.objs/test/linux/x86_64/release/src/stub.c.o -L/usr/local/lib -L/usr/lib -m64
[100%]: build ok! |
Fixed with : |
But when we use linux |
Please do not directly set ld as the ld of xmake, xmake only uses g++/clang++ as the linker by default. If you want to modify the actual ld, you can use -fuse-ld=gold/lld to switch the internal ld linker |
Describe the problem details
I'm trying to build simple
Hello world
program, then$ xmake build -v
ld -o build/linux/x86_64/release/yasm build/.objs/yasm/linux/x86_64/release/main.s.o --dynamic-linker /lib/ld-linux-x86-64.so.2 -lc -m elf_x86_64 -s -L/usr/local/lib -L/usr/lib
-m64
error: ld: unrecognised emulation mode: 64
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om i386pep i386pe
Question: Why
-m64
is passed by default to linker (unrecognised) and how to remove them.The text was updated successfully, but these errors were encountered: