Skip to content

Commit

Permalink
main/gcc: disable gdc on 32-bit architectures
Browse files Browse the repository at this point in the history
On 32-bit arches, gdc fails to compile any software with an arithmetic
error. This is a known upstream bug, there is a patch but it is not yet
merged and requires some tinkering to apply cleanly for GCC 12.X.

See:

* dlang/druntime#3383
* https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/36469#note_248077
  • Loading branch information
nmeum authored and kaniini committed Aug 11, 2022
1 parent 8acb21b commit 4b3952f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main/gcc/APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,15 @@ else
_builddir="$srcdir/build"
fi

case "$CARCH" in
# GDC hasn't been ported to PowerPC
# See libphobos/configure.tgt in GCC sources for supported targets
# riscv fails with: error: static assert "unimplemented"
case "$CARCH" in
ppc64le|riscv64) LANG_D=false ;;
# GDC does currently not work on 32-bit musl architectures.
# This is a known upstream issue.
# See: https://github.com/dlang/druntime/pull/3383
armhf|armv7|x86) LANG_D=false ;;
esac

# libitm has TEXTRELs in ARM build, so disable for now
Expand Down

0 comments on commit 4b3952f

Please sign in to comment.