Comments (6)
clang
is multi-targeted by default unlike GCC, so it builds code for both the host and cross architectures through the --target
flag.
from tc-build.
Yes, but Linux cross-compile cmdline looks like make -j8 O=out ARCH=arm64 CC=clang CROSS_COMPILE=aarch64-linux-gnu- CC=clang READELF=llvm-readelf OBJCOPY=llvm-objcopy AS=llvm-as LD=ld.lld NM=llvm-nm OBJDUMP=llvm-objdump STRIP=llvm-strip CROSS_COMPILE_ARM32=arm-linux-gnueabi- LLVM=1
without CROSS_COMPILE
it won't build vDSO. Is aarch64-linux-gnu-*
thing called binutils?
from tc-build.
Is
aarch64-linux-gnu-*
thing called binutils?
Yes.
CROSS_COMPILE
has two meanings depending on the age of the kernel tree. It is used to prefix as
, gcc
, ld
, etc but it is also used as the value for --target
prior to commit ddc72c9659b5 ("kbuild: clang: do not use CROSS_COMPILE for target triple") (same with CROSS_COMPILE_ARM32
but for the 32-bit vDSO). Since you have specified all the make variables that would have been prefixed with CROSS_COMPILE
, you would think that you could drop it, but it is still being used for --target
. You don't need the aarch64-linux-gnu-
tools as a result.
Two additional comments about your build command:
LLVM=1
is the same thing asAR=llvm-ar CC=clang LD=ld.lld NM=llvm-nm OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump READELF=llvm-readelf STRIP=llvm-strip
, you don't need to specify both.AS=llvm-as
is incorrect, as$(AS)
does not exist after commit aa824e0c962b ("kbuild: remove AS variable") and even if it did,llvm-as
is the LLVM IR to bitcode assembler. You are looking forLLVM_IAS=1
if you want to use the integrated assembler.
from tc-build.
I see, should I use build-binutils.py
for that? Or there's another way for binutils?
CROSS_COMPILE
has two meanings depending on the age of the kernel tree.
Kernel is really old (4.14), due vendor issues it won't be bumped to at least 4.19
You don't need the
aarch64-linux-gnu-
tools as a result.
Without that it probably uses x86 clang (message about broken assembly or smth)
Two additional comments about your build command
Thanks!
from tc-build.
Yes, that is why build-binutils.py
exists, you can get the aarch64-linux-gnu
tools via build-binutils.py -t aarch64
(see -h
for more options if you need them).
from tc-build.
Thanks! For someone who will find that: I prefixed them with ./build-binutils.py -i target_dir -t aarch64
and binutils will be in target_dir/bin/
from tc-build.
Related Issues (20)
- Kernel building script not working for ARM64 HOT 2
- question: how to find out why a linking error happens? HOT 2
- [BOLT] Minimum hardware requirements? HOT 10
- download llvm from tarball's rather than shallow clone? HOT 1
- Ability to specify llvm sha HOT 1
- Building kernels: Show Linux version (when passing -L option) HOT 3
- Use sccache to speed up builds HOT 5
- Bump binutils to version 2.39
- Good revision broken on arm64 HOT 4
- Display total build-time HOT 6
- build-binutils.py: Do not build texinfo docs HOT 3
- Print total disc-usage in MiB HOT 4
- Alpine/Musl segfault when building BOLT in stage 3 HOT 7
- ld.gold and ld.bfd HOT 1
- ld.bfd ld.gold missing and build_binutils problem HOT 22
- build-binutils.py: don't assume -mtune == -march HOT 2
- Could not find LLVM_VERSION_MAJOR in CMakeLists.txt HOT 3
- objtool warning HOT 1
- BOLT's stage system requirements HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tc-build.