GCC first build unknown architecture aarch64 cross-compiling for Raspberry Pi 4
by amb85 from LinuxQuestions.org on (#5EQBE)
I'm going to be slightly heretical and ask a Cross-compiled Linux From Scratch question. My target device is a Raspberry Pi 4B.
At the first build of gcc 6.2.0, the build fails at `make all-gcc all-target-libgcc` with the following error:
Code:...
checking whether sigaltstack is declared... yes
checking for struct tms... yes
checking for clock_t... yes
checking for F_SETLKW... yes
checking if mkdir takes one argument... no
Unknown arch used in --with-arch=aarch64
make: *** [Makefile:4070: configure-gcc] Error 1I get this same error irrespective of whether I set the architecture as `aarch64`, `armv8` and `arm64`.
My `env`:
Code:clfs@ubuntu-focal:/mnt/clfs/sources/gcc-build$ env
CLFS_FLOAT=hard
PWD=/mnt/clfs/sources/gcc-build
CLFS_TARGET=aarch64-linux-musleabihf
CLFS_FPU=neon-fp-armv8
HOME=/home/clfs
CLFS_ARCH=arm64
CLFS_ARM_ARCH=arm64
CLFS=/mnt/clfs
TERM=xterm-256color
SHLVL=1
PS1=${debian_chroot:+($debian_chroot)}\u@\h:\w\$
CLFS_HOST=x86_64-cross-linux-gnu
LC_ALL=POSIX
PATH=/mnt/clfs/cross-tools/bin:/bin:/usr/bin
OLDPWD=/mnt/clfs/sources/gcc-6.2.0
_=/bin/envWhat architecture do I need to specify to build gcc for 64-bit ARM for the Raspberry Pi 4B?


At the first build of gcc 6.2.0, the build fails at `make all-gcc all-target-libgcc` with the following error:
Code:...
checking whether sigaltstack is declared... yes
checking for struct tms... yes
checking for clock_t... yes
checking for F_SETLKW... yes
checking if mkdir takes one argument... no
Unknown arch used in --with-arch=aarch64
make: *** [Makefile:4070: configure-gcc] Error 1I get this same error irrespective of whether I set the architecture as `aarch64`, `armv8` and `arm64`.
My `env`:
Code:clfs@ubuntu-focal:/mnt/clfs/sources/gcc-build$ env
CLFS_FLOAT=hard
PWD=/mnt/clfs/sources/gcc-build
CLFS_TARGET=aarch64-linux-musleabihf
CLFS_FPU=neon-fp-armv8
HOME=/home/clfs
CLFS_ARCH=arm64
CLFS_ARM_ARCH=arm64
CLFS=/mnt/clfs
TERM=xterm-256color
SHLVL=1
PS1=${debian_chroot:+($debian_chroot)}\u@\h:\w\$
CLFS_HOST=x86_64-cross-linux-gnu
LC_ALL=POSIX
PATH=/mnt/clfs/cross-tools/bin:/bin:/usr/bin
OLDPWD=/mnt/clfs/sources/gcc-6.2.0
_=/bin/envWhat architecture do I need to specify to build gcc for 64-bit ARM for the Raspberry Pi 4B?