Add --n64align
flag (#12)
#34
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.TARGET.OS }} | |
strategy: | |
fail-fast: false | |
matrix: | |
TARGET: | |
- { | |
OS: 'ubuntu-latest', | |
CFLAGS: '-static -fno-stack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0', | |
HOST: 'i386-pc-linux', | |
ARCHIVE_NAME: 'binutils-2.6-linux.tar.gz' | |
} | |
- { | |
OS: 'macos-latest', | |
CFLAGS: '-DDARWIN -Wno-return-type -Wno-error -Wno-implicit-function-declaration -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0', | |
HOST: 'i386-apple-darwin', | |
ARCHIVE_NAME: 'binutils-2.6-mac.tar.gz' | |
} | |
name: Building binutils for ${{ matrix.TARGET.OS }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies (Ubuntu) | |
shell: bash | |
if: matrix.TARGET.OS == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential bison file gperf | |
- name: Configure for mips | |
shell: bash | |
run: | | |
./configure --target=mips-kmc-elf --prefix=/opt/cross --disable-gprof --disable-gdb --disable-werror --host=${{ matrix.TARGET.HOST }} --build=${{ matrix.TARGET.HOST }} | |
- name: Make | |
shell: bash | |
run: | | |
make -C bfd CFLAGS="${{ matrix.TARGET.CFLAGS }}" | |
make -C opcodes CFLAGS="${{ matrix.TARGET.CFLAGS }}" | |
make -C libiberty CFLAGS="${{ matrix.TARGET.CFLAGS }}" | |
make -C gas CFLAGS="${{ matrix.TARGET.CFLAGS }}" | |
make -C binutils CFLAGS="${{ matrix.TARGET.CFLAGS }}" | |
- name: Test for file | |
shell: bash | |
run: | | |
test -f binutils/ar | |
file binutils/ar | |
- name: Create release archive | |
shell: bash | |
run: | | |
cp binutils/ar ar | |
cp gas/as.new as | |
cp binutils/strip.new strip | |
cp binutils/objcopy objcopy | |
cp binutils/c++filt c++filt | |
strip ar | |
strip as | |
strip strip | |
strip objcopy | |
strip c++filt | |
chmod +x ar | |
chmod +x as | |
chmod +x strip | |
chmod +x objcopy | |
chmod +x c++filt | |
tar -czf ${{ matrix.TARGET.ARCHIVE_NAME }} ar as strip objcopy c++filt | |
- name: Upload archive | |
uses: actions/upload-artifact@v2 | |
with: | |
name: binutils-2.6-${{ matrix.TARGET.OS }} | |
path: | | |
${{ matrix.TARGET.ARCHIVE_NAME }} | |
- name: Publish release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ${{ matrix.TARGET.ARCHIVE_NAME }} |