bootstrap-tools: Patch TargetConditionals.h
`TargetConditionals.h` was missing several definitions, like `TARGET_OS_TV` that are part of SDK 10.12 at least. And one that doesn't seem to occur in any SDK afaict, `TARGET_OS_EMBEDDED_OTHER`. I added the definitions from SDK 10.12 verbatim and defined `TARGET_OS_EMBEDDED_OTHER` to be equal to `0`. This is a modified version of a patch to avoid a stdenv rebuild.
This commit is contained in:
parent
fa49e70c1b
commit
336d82617f
1 changed files with 39 additions and 1 deletions
|
@ -33,9 +33,47 @@ in rec {
|
|||
curl_ = curlMinimal.override (args: { gssSupport = false; http2Support = false; });
|
||||
|
||||
# Avoid stdenv rebuild.
|
||||
Libsystem_ = darwin.Libsystem.override (args:
|
||||
Libsystem_ = (darwin.Libsystem.override (args:
|
||||
{ xnu = darwin.xnu.overrideAttrs (oldAttrs:
|
||||
{ patches = [ ./fixed-xnu-python3.patch ]; });
|
||||
})).overrideAttrs (oldAttrs:
|
||||
{ installPhase = oldAttrs.installPhase + ''
|
||||
cat <<EOF > $out/include/TargetConditionals.h
|
||||
#ifndef __TARGETCONDITIONALS__
|
||||
#define __TARGETCONDITIONALS__
|
||||
#define TARGET_OS_MAC 1
|
||||
#define TARGET_OS_WIN32 0
|
||||
#define TARGET_OS_UNIX 0
|
||||
#define TARGET_OS_OSX 1
|
||||
#define TARGET_OS_IPHONE 0
|
||||
#define TARGET_OS_IOS 0
|
||||
#define TARGET_OS_WATCH 0
|
||||
#define TARGET_OS_BRIDGE 0
|
||||
#define TARGET_OS_TV 0
|
||||
#define TARGET_OS_SIMULATOR 0
|
||||
#define TARGET_OS_EMBEDDED 0
|
||||
#define TARGET_OS_EMBEDDED_OTHER 0 /* Used in configd */
|
||||
#define TARGET_IPHONE_SIMULATOR TARGET_OS_SIMULATOR /* deprecated */
|
||||
#define TARGET_OS_NANO TARGET_OS_WATCH /* deprecated */
|
||||
|
||||
#define TARGET_CPU_PPC 0
|
||||
#define TARGET_CPU_PPC64 0
|
||||
#define TARGET_CPU_68K 0
|
||||
#define TARGET_CPU_X86 0
|
||||
#define TARGET_CPU_X86_64 1
|
||||
#define TARGET_CPU_ARM 0
|
||||
#define TARGET_CPU_ARM64 0
|
||||
#define TARGET_CPU_MIPS 0
|
||||
#define TARGET_CPU_SPARC 0
|
||||
#define TARGET_CPU_ALPHA 0
|
||||
#define TARGET_RT_MAC_CFM 0
|
||||
#define TARGET_RT_MAC_MACHO 1
|
||||
#define TARGET_RT_LITTLE_ENDIAN 1
|
||||
#define TARGET_RT_BIG_ENDIAN 0
|
||||
#define TARGET_RT_64_BIT 1
|
||||
#endif /* __TARGETCONDITIONALS__ */
|
||||
EOF
|
||||
'';
|
||||
});
|
||||
|
||||
build = stdenv.mkDerivation {
|
||||
|
|
Loading…
Reference in a new issue