Skip to content
Merged
10 changes: 6 additions & 4 deletions .github/workflows/cpp-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ on:

env:
# Packaging prerequisites
# Binutils 2.35.1 released Sep 19, 2020
binutilsVer: "2.35.1"
# Demumble 1.1.0 released Nov 13, 2018
demumbleVer: "1.1.0"
# Use SHA256 for hashing files.
Expand Down Expand Up @@ -67,8 +65,12 @@ jobs:
include:
- os: ubuntu-latest
tools_platform: linux
# Binutils 2.35.1 released Sep 19, 2020
binutils_version: "2.35.1"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I've learned you can't use env substitution in matrix definitions, so I had to move the version numbers directly into here.

- os: macos-latest
tools_platform: darwin
# On Mac, use an older Binutils to avoid corrupted libraries.
binutils_version: "2.28.1"
steps:
- name: setup Xcode version (macos)
if: runner.os == 'macOS'
Expand All @@ -81,13 +83,13 @@ jobs:
# Github runners.
for retry in {1..10} error; do
if [[ $retry == "error" ]]; then exit 5; fi
curl -L https://ftpmirror.gnu.org/binutils/binutils-${{ env.binutilsVer }}.tar.xz --output binutils.tar.xz && break
curl -L https://ftpmirror.gnu.org/binutils/binutils-${{ matrix.binutils_version }}.tar.xz --output binutils.tar.xz && break
sleep 300
done
set -e

tar -xf binutils.tar.xz
mv ./binutils-${{ env.binutilsVer }} ./binutils-src
mv ./binutils-${{ matrix.binutils_version }} ./binutils-src
cd binutils-src
./configure --enable-targets=all --prefix=/tmp/binutils
make
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ if(DESKTOP)

add_external_library(uWebSockets)

set(websockets_additional_defines "")
# Binutils on Mac doesn't support thread-local storage (required by
# websockets), but because we only use websockets via the scheduler,
# we don't need it.

set(websockets_additional_defines "-D__thread=")

# uWebSockets does not come with a CMakeLists file, so define the target.
# Note that since it depends on OpenSSL, only do so if that was found.
Expand Down