Forums - Example from PDF not compiling

1 post / 0 new
Example from PDF not compiling
prokascc
Join Date: 2 Apr 24
Posts: 1
Posted: Tue, 2024-04-02 13:13

Hello. I downloaded sdllvm 17.0.2 I am looking at use guide in one of the included PDF documents and when i make simple file it doesn't compile:

user@machine:~/qcom$ ./sdllvm/bin/clang test.c -o test -target aarch64-linux-gnu --sysroot=sdllvm/aarch64-linux-gnu/libc -fuse-ld=qcld Fatal: cannot read file crtbeginS.o

Fatal: Linking had errors.

clang: error: linker command failed with exit code 1 (use -v to see invocation)

 

Do I need to download something else? By the way i am also intending to build linux with LLVM=1 passed and i get missing header file error

 

 

EDIT: solved. I had to pass -nostdlib

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.