adtools
adtools copied to clipboard
Support for aarch64/arm64
Hi,
I tried to build the ppc-amigaos-gcc crosscompiler on my Raspberry Pi running Raspberry OS (Debian Bullseye aarch64). But it seems that at least for the binutils config.guess and/or config.sub are too old:
...
touch includes-done
make -C ../binutils-build SRC_DIR=../binutils/repo PREFIX=/tmp/adtools/native-build/root-cross CROSS_BUILD_DIR=/tmp/adtools/native-build/binutils-cross-build-2.23.2
make[1]: Entering directory '/tmp/adtools/binutils-build'
mkdir -p /tmp/adtools/native-build/binutils-cross-build-2.23.2
cd /tmp/adtools/native-build/binutils-cross-build-2.23.2; CFLAGS="-Wno-switch -Wno-unused" /tmp/adtools/binutils/repo/configure \
--enable-plugins \
--target=ppc-amigaos \
--prefix=/tmp/adtools/native-build/root-cross
checking build system type... /tmp/adtools/binutils/repo/config.guess: unable to guess system type
This script, last modified 2011-06-03, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run (/tmp/adtools/binutils/repo/config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <[email protected]> in order to provide the needed
information to handle your system.
config.guess timestamp = 2011-06-03
uname -m = aarch64
uname -r = 5.15.32-v8+
uname -s = Linux
uname -v = #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022
/usr/bin/uname -p =
/bin/uname -X =
hostinfo =
/bin/universe =
/usr/bin/arch -k =
/bin/arch =
/usr/bin/oslevel =
/usr/convex/getsysinfo =
UNAME_MACHINE = aarch64
UNAME_RELEASE = 5.15.32-v8+
UNAME_SYSTEM = Linux
UNAME_VERSION = #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022
configure: error: cannot guess build type; you must specify one
make[1]: Leaving directory '/tmp/adtools/binutils-build'
make[1]: *** [Makefile:20: cross] Error 1
make: Leaving directory '/tmp/adtools/native-build'
make: *** [makefile:92: binutils-cross-build-done-2.23.2] Error 2
The command '/bin/sh -c make -C native-build' returned a non-zero code: 2
This is my Dockerfile for building:
FROM debian:bullseye-slim
RUN apt-get update && apt-get -y upgrade
RUN apt-get -y install libgmp-dev libmpc-dev libmpfr-dev lhasa git build-essential python2.7 wget texinfo texi2html flex bison
RUN git config --global user.email "[email protected]"
RUN git config --global user.name "Josef Wegner"
RUN git clone https://github.com/sba1/adtools.git /tmp/adtools
WORKDIR /tmp/adtools
RUN git submodule init && git submodule update && bin/gild clone && bin/gild checkout binutils 2.23.2 && bin/gild checkout coreutils 5.2 && bin/gild checkout gcc 8
ADD config.guess /tmp/adtools/binutils/repo/
ADD config.sub /tmp/adtools/binutils/repo/
RUN make -C native-build gcc-cross CROSS_PREFIX=/opt/adtools -j4
Would it make sense to add patches with newer config.guess and config.sub? Or would this break other stuff?
You can submit patches, but of course, they should not break other stuff.
I tested this patch on Debian Bullseye ARM64 and Ubuntu 20.04 LTS (ARM64/WSL2). It worked fine on both systems.