Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions projects/gnu.org/gcc/libstdcxx/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,40 @@ versions:
strip: /^releases\/gcc-/

dependencies:
gnu.org/binutils: '*' # linker needs `as`
gnu.org/gmp: '>=4.2'
gnu.org/mpfr: '>=2.4.0'
gnu.org/mpc: '>=0.8.0'
gnu.org/binutils: "*" # linker needs `as`
gnu.org/gmp: ">=4.2"
gnu.org/mpfr: ">=2.4.0"
gnu.org/mpc: ">=0.8.0"
zlib.net: ^1.3

build:
dependencies:
linux:
gnu.org/gcc: '*'
gnu.org/make: '*'
perl.org: '^5.6.1'
gnu.org/patch: '*'
curl.se: '*'
github.com/westes/flex: '*'
gnu.org/gcc: "*"
gnu.org/make: "*"
perl.org: "^5.6.1"
gnu.org/patch: "*"
curl.se: "*"
github.com/westes/flex: "*"
darwin/x86-64: # since 15.1.0
libisl.sourceforge.io: ^0
working-directory: build
script:
# Applying ians patches on x86-64 too, since he sometimes gets fixes in faster, like:
# https://github.com/orgs/Homebrew/discussions/5216
# If we have a patch, apply it
- run: |
if test -n "$PATCH{{version.major}}{{version.minor}}"; then
curl "$PATCH{{version.major}}{{version.minor}}" | patch -p1
fi
- run:
- if test -n "$PATCH{{version.major}}{{version.minor}}"; then
- curl "$PATCH{{version.major}}{{version.minor}}" | patch -p1
- fi
if: darwin
working-directory: ..

# if there's no diff yet, unpack iains' source over ours
- run: |
if test -n "$BRANCH{{version.major}}{{version.minor}}"; then
curl -L "$BRANCH{{version.major}}{{version.minor}}" | tar xz --strip-components=1
fi
- run:
- if test -n "$BRANCH{{version.major}}{{version.minor}}"; then
- curl -L "$BRANCH{{version.major}}{{version.minor}}" | tar xz --strip-components=1
- fi
if: darwin
working-directory: ..

Expand All @@ -55,9 +55,9 @@ build:
- make install-target-libstdc++-v3 install-target-libgcc

# On Linux, we need to move the libraries to the lib directory.
- run: |
mv lib64/* lib/
rmdir lib64
- run:
- mv lib64/* lib/
- rmdir lib64
if: linux
working-directory: ${{prefix}}

Expand All @@ -70,6 +70,9 @@ build:
PATCH122: https://raw.githubusercontent.com/Homebrew/formula-patches/1d184289/gcc/gcc-12.2.0-arm.diff
# https://github.com/iains/gcc-darwin-arm64
PATCH131: https://raw.githubusercontent.com/Homebrew/formula-patches/master/gcc/gcc-13.1.0.diff
# Homebrew patching with the 15.1.0 diff; we don't want to unpack the 15.1.0 branch,
# since that'll just be a complete overwrite.
PATCH152: https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/gcc/gcc-15.1.0.diff
BRANCH105: https://github.com/iains/gcc-10-branch/archive/refs/heads/gcc-10-5Dr0-pre-0.tar.gz
BRANCH114: https://github.com/iains/gcc-11-branch/archive/refs/tags/gcc-11.4-darwin-r0.tar.gz
BRANCH115: https://github.com/iains/gcc-11-branch/archive/refs/tags/gcc-11.5-darwin-r0.tar.gz
Expand Down Expand Up @@ -106,6 +109,7 @@ build:
- -fPIC
- -fPIE
darwin:
LDFLAGS: $LDFLAGS -Wl,-headerpad_max_install_names
ARGS:
# Reliance on CLT hard path is yuck.
- --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
Expand Down
66 changes: 35 additions & 31 deletions projects/gnu.org/gcc/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,40 @@ versions:
strip: /^releases\/gcc-/

dependencies:
gnu.org/binutils: '*' # linker needs `as`
gnu.org/gmp: '>=4.2'
gnu.org/mpfr: '>=2.4.0'
gnu.org/mpc: '>=0.8.0'
gnu.org/binutils: "*" # linker needs `as`
gnu.org/gmp: ">=4.2"
gnu.org/mpfr: ">=2.4.0"
gnu.org/mpc: ">=0.8.0"
zlib.net: ^1.3

build:
dependencies:
linux:
gnu.org/gcc: '*'
gnu.org/make: '*'
perl.org: '^5.6.1'
gnu.org/patch: '*'
curl.se: '*'
github.com/westes/flex: '*'
gnu.org/gcc: "*"
gnu.org/make: "*"
perl.org: "^5.6.1"
gnu.org/patch: "*"
curl.se: "*"
github.com/westes/flex: "*"
darwin/x86-64: # since 15.1.0
libisl.sourceforge.io: ^0
working-directory: build
script:
# Applying ians patches on x86-64 too, since he sometimes gets fixes in faster, like:
# https://github.com/orgs/Homebrew/discussions/5216
# If we have a patch, apply it
- run: |
if test -n "$PATCH{{version.major}}{{version.minor}}"; then
curl "$PATCH{{version.major}}{{version.minor}}" | patch -p1
fi
- run:
- if test -n "$PATCH{{version.major}}{{version.minor}}"; then
- curl "$PATCH{{version.major}}{{version.minor}}" | patch -p1
- fi
if: darwin
working-directory: ..

# if there's no diff yet, unpack iains' source over ours
- run: |
if test -n "$BRANCH{{version.major}}{{version.minor}}"; then
curl -L "$BRANCH{{version.major}}{{version.minor}}" | tar xz --strip-components=1
fi
- run:
- if test -n "$BRANCH{{version.major}}{{version.minor}}"; then
- curl -L "$BRANCH{{version.major}}{{version.minor}}" | tar xz --strip-components=1
- fi
if: darwin
working-directory: ..

Expand All @@ -60,20 +60,20 @@ build:
working-directory: ${{prefix}}/bin

# On Linux, we need to move the libraries to the lib directory.
- run: |
mv lib64/* lib/
rmdir lib64
- run:
- mv lib64/* lib/
- rmdir lib64
if: linux
working-directory: ${{prefix}}

# other tools simply expect these symlinks and often fail without them
# NOTE forcing symlinks because we build with ourselves and sometimes that
# means we're building with the exact same version FIXME
- run: |
ln -sf gcc cc
ln -sf ../../../binutils/v\*/bin/ar ar
ln -sf ../../../binutils/v\*/bin/nm nm
ln -sf ../../../binutils/v\*/bin/ranlib ranlib
- run:
- ln -sf gcc cc
- ln -sf ../../../binutils/v\*/bin/ar ar
- ln -sf ../../../binutils/v\*/bin/nm nm
- ln -sf ../../../binutils/v\*/bin/ranlib ranlib
working-directory: ${{prefix}}/bin

# .la archives aren't relocatable
Expand All @@ -86,6 +86,9 @@ build:
PATCH122: https://raw.githubusercontent.com/Homebrew/formula-patches/1d184289/gcc/gcc-12.2.0-arm.diff
# https://github.com/iains/gcc-darwin-arm64
PATCH131: https://raw.githubusercontent.com/Homebrew/formula-patches/master/gcc/gcc-13.1.0.diff
# Homebrew patching with the 15.1.0 diff; we don't want to unpack the 15.1.0 branch,
# since that'll just be a complete overwrite.
PATCH152: https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/gcc/gcc-15.1.0.diff
BRANCH105: https://github.com/iains/gcc-10-branch/archive/refs/heads/gcc-10-5Dr0-pre-0.tar.gz
BRANCH114: https://github.com/iains/gcc-11-branch/archive/refs/tags/gcc-11.4-darwin-r0.tar.gz
BRANCH115: https://github.com/iains/gcc-11-branch/archive/refs/tags/gcc-11.5-darwin-r0.tar.gz
Expand Down Expand Up @@ -124,6 +127,7 @@ build:
- -fPIC
- -fPIE
darwin:
LDFLAGS: $LDFLAGS -Wl,-headerpad_max_install_names
ARGS:
# Reliance on CLT hard path is yuck.
- --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
Expand All @@ -150,11 +154,11 @@ test:
- gcc -print-multiarch
- gcc -dumpspecs
# gha mac runners have broken SDKs...
- run: |
if ! test -f /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/AvailabilityInternalLegacy.h; then
echo "Missing SDK; skipping remaining tests"
exit 0
fi
- run:
- if ! test -f /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/AvailabilityInternalLegacy.h; then
- echo "Missing SDK; skipping remaining tests"
- exit 0
- fi
if: darwin
- gcc -o test1 test.c -lgmp
- ./test1
Expand Down
Loading