Merge branch 'galak-macosx'

This commit is contained in:
Chris Packham 2020-11-23 19:38:07 +13:00
commit 3c177b39d2
2 changed files with 85 additions and 9 deletions

View File

@ -6,15 +6,32 @@ on:
jobs:
crosstool:
runs-on: ubuntu-latest
runs-on: ${{ matrix.host }}
strategy:
matrix:
host: [
"ubuntu-latest",
"macos-10.15",
]
steps:
- name: "clone"
uses: actions/checkout@v2
- name: "prereq"
- name: "prereq Linux"
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y gperf help2man libtool-bin
- name: "prereq macOS"
if: ${{ runner.os == 'macOS' }}
run: |
brew install autoconf automake bash binutils gawk gnu-sed \
gnu-tar help2man ncurses
- name: "build ct-ng"
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
export PATH="$PATH:/usr/local/opt/binutils/bin"
export CPPFLAGS="-I/usr/local/opt/ncurses/include -I/usr/local/opt/gettext/include"
export LDFLAGS="-L/usr/local/opt/ncurses/lib -L/usr/local/opt/gettext/lib"
fi
./bootstrap
./configure --prefix=$PWD/.local/
make
@ -23,20 +40,24 @@ jobs:
- name: "upload ct-ng"
uses: actions/upload-artifact@v2
with:
name: crosstool
name: crosstool.${{ matrix.host }}
path: ct-ng.tar
- name: "upload config.log"
uses: actions/upload-artifact@v2
with:
name: config.log
name: config.log.${{ matrix.host }}
path: config.log
if: ${{ always() }}
toolchains:
needs: crosstool
runs-on: ubuntu-latest
runs-on: ${{ matrix.host }}
strategy:
matrix:
host: [
"ubuntu-latest",
"macos-10.15",
]
sample: [
"aarch64-unknown-linux-gnu",
"arc-multilib-linux-uclibc",
@ -56,19 +77,40 @@ jobs:
"x86_64-multilib-linux-uclibc",
"xtensa-fsf-linux-uclibc"
]
exclude:
# Exclude mips64-*-linux-gnu because of <byteswap.h> usage in
# elf-entry.c for linux kernel headers. <byteswap.h> is a GNU
# extension and doesn't exist on MacOS X
- host: "macos-10.15"
sample: "mips64-unknown-linux-gnu"
steps:
- name: Create case sensitive workspace volume for macOS
if: ${{ runner.os == 'macOS' }}
run: |
cd ..
rmdir crosstool-ng
hdiutil create ${HOME}/Workspace.sparseimage -volname crosstool-ng -type SPARSE -size 20g -fs HFSX
hdiutil mount ${HOME}/Workspace.sparseimage -mountroot /Users/runner/work/crosstool-ng
cd crosstool-ng
- name: "download ct-ng"
uses: actions/download-artifact@v2
with:
name: crosstool
name: crosstool.${{ matrix.host }}
- name: "extract ct-ng"
run: |
tar -xf ct-ng.tar
- name: "prereq"
- name: "prereq Linux"
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y gperf help2man libtool-bin
echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH
- name: "build ${{ matrix.sample }}"
- name: "prereq macOS"
if: ${{ runner.os == 'macOS' }}
run: |
brew install autoconf automake bash binutils gawk gnu-sed \
gnu-tar help2man ncurses pkg-config
echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH
- name: "build ${{ matrix.sample }} for ${{ matrix.host }}"
run: |
mkdir -p src
ct-ng ${{ matrix.sample }}
@ -79,7 +121,7 @@ jobs:
- name: "upload log"
uses: actions/upload-artifact@v2
with:
name: "${{ matrix.sample }}.log"
name: "${{ matrix.sample }}.${{ matrix.host }}.log"
path: |
build.log
.config

View File

@ -0,0 +1,34 @@
From 8ae8c6bba601ce9ae8a3d54776ef934fb0a7986d Mon Sep 17 00:00:00 2001
From: Kumar Gala <kumar.gala@linaro.org>
Date: Wed, 11 Nov 2020 08:09:50 -0600
Subject: [PATCH] [AArch64] Fix build issue with aarch64-builtins.c on MacOS X
host
When building w/clang on MacOS X we get the following error:
gcc/config/aarch64/aarch64-builtins.c:1231:3: error: expected expression
AARCH64_INIT_MEMTAG_BUILTINS_DECL (IRG, irg, irg, fntype);
Fix this by adding '-std=gnu++11' to the compile line.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
---
gcc/config/aarch64/t-aarch64 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/aarch64/t-aarch64 b/gcc/config/aarch64/t-aarch64
index 11d20b7be14..d4c3154cf40 100644
--- a/gcc/config/aarch64/t-aarch64
+++ b/gcc/config/aarch64/t-aarch64
@@ -41,7 +41,7 @@ aarch64-builtins.o: $(srcdir)/config/aarch64/aarch64-builtins.c $(CONFIG_H) \
$(srcdir)/config/aarch64/aarch64-simd-builtins.def \
$(srcdir)/config/aarch64/aarch64-simd-builtin-types.def \
aarch64-builtin-iterators.h
- $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ $(COMPILER) -std=gnu++11 -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(srcdir)/config/aarch64/aarch64-builtins.c
aarch64-sve-builtins.o: $(srcdir)/config/aarch64/aarch64-sve-builtins.cc \
--
2.25.4