Browse Source

Update everything to reference the simpler tool autodetection

pull/1124/head
Hamish Coleman 1 year ago
parent
commit
1581b74027
  1. 7
      .github/workflows/tests.yml
  2. 4
      doc/Building.md
  3. 1
      scripts/hack_fakeautoconf.sh

7
.github/workflows/tests.yml

@ -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

4
doc/Building.md

@ -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
``` ```

1
scripts/hack_fakeautoconf.sh

@ -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

Loading…
Cancel
Save