-
Notifications
You must be signed in to change notification settings - Fork 82
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
Specify the correct cross-compiling toochain for aarch64 in the docs #153
Comments
Static EmuTLS implementation for aarch64-none-elfDue to the reasons documented here, we would like to use the bare-metal toolchain (aarch64-none-elf) instead of the Linux one (aarch64-none-linux-gnu). Unfortunately, in that toolchain, gcc is configured with Basically all accesses to the TLS are replace with a call to
Unfortunately the libgcc implementation uses dynamic memory allocation and thread keys, and brakes Unikraft assumptions about the TLS layout. Fortunately, overriding the First idea for implementation:
|
Quick-fix based on https://github.com/unikraft/unikraft/issues/319 aarch64-none-elf has the TLS disabled in the gcc configuration, so aarch64-none-linux-gnu needs to be used for TLS support. In case it is decided to implement a static version of emutls, the patch can be reverted to enable the use of the bare-metal toolchain. Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Quick-fix based on https://github.com/unikraft/unikraft/issues/319 aarch64-none-elf has the TLS disabled in the gcc configuration, so aarch64-none-linux-gnu needs to be used for TLS support. In case it is decided to implement a static version of emutls, the patch can be reverted to enable the use of the bare-metal toolchain. Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Quick-fix based on https://github.com/unikraft/unikraft/issues/319 aarch64-none-elf has the TLS disabled in the gcc configuration, so aarch64-none-linux-gnu needs to be used for TLS support. In case it is decided to implement a static version of emutls, the patch can be reverted to enable the use of the bare-metal toolchain. Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Quick-fix based on https://github.com/unikraft/unikraft/issues/319 aarch64-none-elf has the TLS disabled in the gcc configuration, so aarch64-none-linux-gnu needs to be used for TLS support. In case it is decided to implement a static version of emutls, the patch can be reverted to enable the use of the bare-metal toolchain. Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Quick-fix based on https://github.com/unikraft/unikraft/issues/319 aarch64-none-elf has the TLS disabled in the gcc configuration, so aarch64-none-linux-gnu needs to be used for TLS support. In case it is decided to implement a static version of emutls, the patch can be reverted to enable the use of the bare-metal toolchain. Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Quick-fix based on https://github.com/unikraft/unikraft/issues/319 aarch64-none-elf has the TLS disabled in the gcc configuration, so aarch64-none-linux-gnu needs to be used for TLS support. In case it is decided to implement a static version of emutls, the patch can be reverted to enable the use of the bare-metal toolchain. Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Quick-fix based on https://github.com/unikraft/unikraft/issues/319 aarch64-none-elf has the TLS disabled in the gcc configuration, so aarch64-none-linux-gnu needs to be used for TLS support. In case it is decided to implement a static version of emutls, the patch can be reverted to enable the use of the bare-metal toolchain. Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Quick-fix based on https://github.com/unikraft/unikraft/issues/319 aarch64-none-elf has the TLS disabled in the gcc configuration, so aarch64-none-linux-gnu needs to be used for TLS support. In case it is decided to implement a static version of emutls, the patch can be reverted to enable the use of the bare-metal toolchain. Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Quick-fix based on https://github.com/unikraft/unikraft/issues/319 aarch64-none-elf has the TLS disabled in the gcc configuration, so aarch64-none-linux-gnu needs to be used for TLS support. In case it is decided to implement a static version of emutls, the patch can be reverted to enable the use of the bare-metal toolchain. Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Quick-fix based on https://github.com/unikraft/unikraft/issues/319 aarch64-none-elf has the TLS disabled in the gcc configuration, so aarch64-none-linux-gnu needs to be used for TLS support. In case it is decided to implement a static version of emutls, the patch can be reverted to enable the use of the bare-metal toolchain. Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Quick-fix based on https://github.com/unikraft/unikraft/issues/319 aarch64-none-elf has the TLS disabled in the gcc configuration, so aarch64-none-linux-gnu needs to be used for TLS support. In case it is decided to implement a static version of emutls, the patch can be reverted to enable the use of the bare-metal toolchain. Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Feature request summary
This one is related to future changes in the docs: https://github.com/unikraft/unikraft/tree/staging/doc/guides
Specifically, when adding instructions for cross-compiling unikraft for AArch64, make sure to specify the bare-metal toolchain variant (
aarch66-none-elf
), as it is common for people to use a linux toolchain (egaarch-none-linux
) and end up having problems with the build.Describe alternatives
No response
Related architectures
Arm, AArch64
Related platforms
No response
Additional context
The cross-compiling toolchains provided by Arm come in different variants (
arm-none-eabi
,arm-none-linux-gnueabihf
,aarch64-none-elf
,aarch64-none-linux
). Choosing the wrong one can cause problems.Example: libgcc of gcc >= 10.1 expects that the
__getauxval
symbol is provided by glibc. Trying to build Unikraft withaarch64-none-linux
will result into gcc emmitting the following error:Although this issue could be easily fixed by adding
-wno-outline-atomics
toARCHFLAGS
, this would not be the correct way to address the issue. Instead, one should be using the baremetal variant (aarch64-none-elf
) for building Unikraft.The text was updated successfully, but these errors were encountered: