xcode: Drop use of weak_import on enumerators.

GCC doesn't support attributes on enumerators, which could pose a
problem but fortunately not in this case. Here a
__attribute__((weak_import)) is used, which doesn't make much sense for
enumerators anyway (noone will die because the corresponding enumerator
won't be referenced either in older OS X versions).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig
2014-03-12 10:00:49 +01:00
parent 5eb3dd8a1b
commit a6621202af
2 changed files with 23 additions and 3 deletions
+10 -3
View File
@@ -1,6 +1,10 @@
{ stdenv, requireFile, xpwn }:
stdenv.mkDerivation rec {
with stdenv.lib;
let
osxVersion = "10.9";
in stdenv.mkDerivation rec {
name = "xcode-${version}";
version = "5.0.2";
@@ -10,9 +14,10 @@ stdenv.mkDerivation rec {
sha256 = "0mrligqkfqwx8cy883pxm4w5w7a17nfh227zdspfll23r9agf32k";
};
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
phases = [ "unpackPhase" "patchPhase" "installPhase" "fixupPhase" ];
outputs = [ "out" "toolchain" ];
unpackCmd = let
basePath = "Xcode.app/Contents/Developer/Platforms/MacOSX.platform";
sdkPath = "${basePath}/Developer/SDKs";
@@ -21,7 +26,9 @@ stdenv.mkDerivation rec {
${xpwn}/bin/hfsplus main.hfs extractall "${sdkPath}" > /dev/null
'';
setSourceRoot = "sourceRoot=MacOSX10.9.sdk";
setSourceRoot = "sourceRoot=MacOSX${osxVersion}.sdk";
patches = optional (osxVersion == "10.9") ./gcc-fix-enum-attributes.patch;
installPhase = ''
ensureDir "$out/share/sysroot"