Unverified Commit 8d2846ed authored by Elias Naur's avatar Elias Naur Committed by GitHub
Browse files

gcc: only disable aligned_alloc for darwin build/host/target platforms (#226290)

Before this change a Darwin gcc would output binaries that avoid
aligned_alloc, regardless of target platform. That's fine for Darwin
targets, but not for non-darwin targets such as pkgsCross.raspberryPi.

This change replaces the single configure flag with a flag for
each of build, host, target.

Idea by @trofi.
parent ab2aea35
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -77,8 +77,12 @@ in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
#  - If GCC allowed implicit declaration of symbols, it would not fail during
#    compilation even if the configure scripts did not check header presence.
#
+ lib.optionalString (hostPlatform.isDarwin) ''
  export ac_cv_func_aligned_alloc=no
+ lib.optionalString (buildPlatform.isDarwin) ''
    export build_configargs=ac_cv_func_aligned_alloc=no
'' + lib.optionalString (hostPlatform.isDarwin) ''
    export host_configargs=ac_cv_func_aligned_alloc=no
'' + lib.optionalString (targetPlatform.isDarwin) ''
    export target_configargs=ac_cv_func_aligned_alloc=no
''

# In order to properly install libgccjit on macOS Catalina, strip(1)