Por si a alguien le interesa usar CPCtelera sin Docker ni Rosetta2, aquí tenéis los pasos:
xcode-select --install
brew install cmake bison flex boost texinfo gputils wget automake freeimage
export PATH="/opt/homebrew/opt/bison/bin:/opt/homebrew/opt/flex/bin:$PATH"
git clone
https://github.com/lronaldo/cpctelera.gitcd cpctelera
# Se copia el config.guess y config.sub de automake a cpctelera tools
G=$(ls /opt/homebrew/share/automake-*/config.guess | tail -1)
S=$(ls /opt/homebrew/share/automake-*/config.sub | tail -1)
find cpctelera/tools -name config.guess -exec cp "$G" {} \;
find cpctelera/tools -name config.sub -exec cp "$S" {} \;
# Enlaces simbólicos de boost y freeimage
sudo mkdir -p /usr/local/include
sudo ln -s /opt/homebrew/include/boost /usr/local/include/boost
sudo ln -s /opt/homebrew/include/FreeImage.h /usr/local/include/FreeImage.h
# Exportar variables de entorno
export CPATH=/opt/homebrew/include
export LIBRARY_PATH=/opt/homebrew/lib
export CPLUS_INCLUDE_PATH=/opt/homebrew/include
export C_INCLUDE_PATH=/opt/homebrew/include
export LDFLAGS="-L/opt/homebrew/lib"
# config.bfd
cd cpctelera/tools/sdcc-3.6.8-r9946/src/support/sdbinutils/bfd
cp config.bfd config.bfd.orig
sed -i '' 's/^\([[:space:]]*\)z80-\*-\*)/\1z80-*-* | aarch64-*-darwin* | arm64-*-darwin*)/' config.bfd
grep -n "aarch64-\*-darwin" config.bfd
# Crear un wraper para gcc y g++
cat > ~/cc-wrap/gcc <<'EOF'
#!/bin/sh
exec /usr/bin/clang -Wno-implicit-function-declaration -Wno-int-conversion -Wno-incompatible-function-pointer-types "$@" -Wno-error -Wno-deprecated-declarations
EOF
cat > ~/cc-wrap/g++ <<'EOF'
#!/bin/sh
exec /usr/bin/clang++ "$@" -Wno-error -Wno-deprecated-declarations
EOF
cp ~/cc-wrap/gcc ~/cc-wrap/cc
chmod +x ~/cc-wrap/gcc ~/cc-wrap/cc ~/cc-wrap/g++
export PATH="$HOME/cc-wrap:$PATH"
which g++
# Lanzar el setup.sh
cd ~/cpctelera
./setup.sh 2>&1 | tee setup.log