Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before I forget, here is the rationale for each change. They've been gathered from several places but I haven't copied the patches verbatim, only what I seemed to need.
With this patch I've been able to build GNAT 9.4.0 targeting x86_64-linux-musl on Alpine Linux 3.12 with just the
build-base
andgcc-gnat
packages as prerequisites.Removed
calloc
frompragma GCC poison
This is actually the only thing that prevented GCC from building, the other patches fix runtime errors. I found the cure in an old email thread from the musl mailing list
Prevent compilation of
s-tsmona__linux.adb
Origin: https://gitlab.alpinelinux.org/alpine/aports/-/blob/fbd708d54ad9ec01f3927e760ef241f3a436b6fb/main/gcc/0027-ada-musl-support-fixes.patch
This fixes an undefined reference to the
_r_debug
symbol that happens at runtime when executing even the simplest hello world Ada program.Remove bindings to
pthread_mutexattr_setprioceiling
andpthread_rwlockattr_setkind_np
Origin: https://gitlab.alpinelinux.org/alpine/aports/-/blob/fbd708d54ad9ec01f3927e760ef241f3a436b6fb/main/gcc/0026-ada-libgnarl-compatibility-for-musl.patch
pthread_rwlockattr_setkind_np
is not defined in musl andpthread_mutexattr_setprioceiling
hasn't exactly the same layout as glibc or something. I got undefined references to these symbols at link time while attempting to build GPRBuild. The original patch was precisely created for GPRBuild