crossdev --target aarch64-unknown-linux-gnu is giving an error for emerging cross-glibc
Need help cross compiling to aarch64-unknown-linux-gnu
cross-compiling to aarch64-unknown-linux-gnu uses wrong linker
[Solved] Cross compile to aarch64 from windows10
I tried to set up a crossdev for a Raspbery Pi 4 on a desktop machine I had. It worked (sort of) but I had to make a bunch of changes to where now today when I tried to update cross-glibc failed. So I tried to just reset back to a stage3 tarball and redo it but it is still failing.
/var/log/portage/cross-aarch64-unknown-linux-gnu-info.log:
https://0x0.st/8XgU.log
/var/log/portage/cross-aarch64-unknown-linux-gnu-glibc.log:
https://0x0.st/8XgD.log
It compiles that I'm trying to compile glibc without optimisations but I have
cat /usr/aarch64-unknown-linux-gnu/etc/portage/make.conf |grep FLAGS
CFLAGS="-mcpu=cortex-a72 -O2 -pipe"
CXXFLAGS="${CFLAGS}"I tried searching on bugs.gentoo.org but I couldn't find anything. Not sure where the problem is. Any suggestions?
Edit:
emerge -pqv '=cross-aarch64-unknown-linux-gnu/glibc-2.40-r8::crossdev' [ebuild N ] cross-aarch64-unknown-linux-gnu/glibc-2.40-r8 USE="caps gd multiarch perl ssp static-libs systemd -audit (-cet) -compile-locales -custom-cflags -doc -hash-sysv-compat -headers-only (-multilib) -multilib-bootstrap -nscd -profile (-selinux) -stack-realign -suid -systemtap -test -vanilla"
I've been trying to learn ARM assembly for my m1 MBA by following along with this book and accompanying GitHub page updating it for Apple silicone. Unfortunately, I am running into the error "unknown AArch64 fixup kind!" when I try to use ADR or ADRP (LDR is not allowed on Apple silicone afik). So, If anyone knows why this error is popping and/or how to fix it, that would be awesome.
The Code:
.global _start
.align 2 //needed for mac os
_start: mov x0,#1 //stdout = 1
adr x1, helloworld //string to output
mov x2, #16 //length of string
mov x16, #4 //write sys call value
svc 0 //syscall
//exit the program
mov x0, #0
mov x16, #1
svc 0
.data
helloworld: .ascii "Hello World!\n"command to replicate the output:
as -o HelloWorld.o HelloWorld.s