Update everything to reference the simpler tool autodetection

This commit is contained in:
Hamish Coleman 2023-06-22 10:57:14 +01:00
parent 4bbee2c3b5
commit 1581b74027
3 changed files with 2 additions and 10 deletions

View File

@ -386,8 +386,6 @@ jobs:
run: | run: |
# This will warn about CC, but we cannot set CC until we run it :-S # This will warn about CC, but we cannot set CC until we run it :-S
HOST_TRIPLET=$(dpkg-architecture -a${{ matrix.arch }} -q DEB_HOST_GNU_TYPE) HOST_TRIPLET=$(dpkg-architecture -a${{ matrix.arch }} -q DEB_HOST_GNU_TYPE)
export CC=$HOST_TRIPLET-gcc
export AR=$HOST_TRIPLET-ar
./autogen.sh ./autogen.sh
./configure --host $HOST_TRIPLET ./configure --host $HOST_TRIPLET
cd packages/debian/ cd packages/debian/
@ -598,7 +596,6 @@ jobs:
# this is a hack! it assumes the default SDK is the 'right' one # this is a hack! it assumes the default SDK is the 'right' one
export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
./autogen.sh ./autogen.sh
export CC=clang
export CFLAGS="-target ${{ matrix.arch }}" export CFLAGS="-target ${{ matrix.arch }}"
export LDFLAGS="-target ${{ matrix.arch }}" export LDFLAGS="-target ${{ matrix.arch }}"
./configure --host=${{ matrix.arch }} ./configure --host=${{ matrix.arch }}
@ -647,7 +644,6 @@ jobs:
# this is a hack! it assumes the default SDK is the 'right' one # this is a hack! it assumes the default SDK is the 'right' one
export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
./autogen.sh ./autogen.sh
export CC=clang
export CFLAGS="-arch x86_64 -arch arm64" export CFLAGS="-arch x86_64 -arch arm64"
export LDFLAGS="-arch x86_64 -arch arm64" export LDFLAGS="-arch x86_64 -arch arm64"
./configure ./configure
@ -703,9 +699,6 @@ jobs:
shell: bash shell: bash
run: | run: |
./autogen.sh ./autogen.sh
export CC=${{ matrix.arch }}-gcc
export AR=${{ matrix.arch }}-ar
export WINDRES=${{ matrix.arch }}-windres
./configure --host ${{ matrix.arch }} ./configure --host ${{ matrix.arch }}
make make

View File

@ -103,7 +103,7 @@ See `edge.exe --help` and `supernode.exe --help` for a full list of supported op
The Makefiles are all setup to allow cross compiling of this code. You The Makefiles are all setup to allow cross compiling of this code. You
will need to have the cross compiler, binutils and any additional libraries will need to have the cross compiler, binutils and any additional libraries
desired installed for the target architecture. Then you can run the `./configure` desired installed for the target architecture. Then you can run the `./configure`
with the appropriate CC and AR environment and the right `--host` option. with the appropriate `--host` option.
If compiling on Debian or Ubuntu, this can be as simple as the following example: If compiling on Debian or Ubuntu, this can be as simple as the following example:
@ -111,8 +111,6 @@ If compiling on Debian or Ubuntu, this can be as simple as the following example
HOST_TRIPLET=arm-linux-gnueabi HOST_TRIPLET=arm-linux-gnueabi
sudo apt-get install binutils-$HOST_TRIPLET gcc-$HOST_TRIPLET sudo apt-get install binutils-$HOST_TRIPLET gcc-$HOST_TRIPLET
./autogen.sh ./autogen.sh
export CC=$HOST_TRIPLET-gcc
export AR=$HOST_TRIPLET-ar
./configure --host $HOST_TRIPLET ./configure --host $HOST_TRIPLET
make make
``` ```

View File

@ -6,6 +6,7 @@
cat >config.mak <<EOF cat >config.mak <<EOF
CC=gcc CC=gcc
AR=ar AR=ar
WINDRES=windres
CFLAGS=$CFLAGS -g -O2 -I./include CFLAGS=$CFLAGS -g -O2 -I./include
LDFLAGS=$LDFLAGS -L. LDFLAGS=$LDFLAGS -L.
LDLIBS_EXTRA=$LDLIBS LDLIBS_EXTRA=$LDLIBS