Merge pull request #73721 from virusdave/dnicponski/scratch/update_darwin_cctools
darwin.cctools: 895 -> 927.0.2
This commit is contained in:
commit
9d56a06ff9
@ -1,22 +0,0 @@
|
|||||||
diff --git a/cctools/ld64/src/ld/OutputFile.cpp b/cctools/ld64/src/ld/OutputFile.cpp
|
|
||||||
index 8859882..158c7d2 100644
|
|
||||||
--- a/cctools/ld64/src/ld/OutputFile.cpp
|
|
||||||
+++ b/cctools/ld64/src/ld/OutputFile.cpp
|
|
||||||
@@ -2786,7 +2786,7 @@ void OutputFile::writeOutputFile(ld::Internal& state)
|
|
||||||
#ifdef __APPLE__ // ld64-port
|
|
||||||
struct statfs fsInfo;
|
|
||||||
if ( statfs(_options.outputFilePath(), &fsInfo) != -1 ) {
|
|
||||||
- if ( strcmp(fsInfo.f_fstypename, "hfs") == 0) {
|
|
||||||
+ if ( (strcmp(fsInfo.f_fstypename, "hfs") == 0) || (strcmp(fsInfo.f_fstypename, "apfs") == 0) ) {
|
|
||||||
(void)unlink(_options.outputFilePath());
|
|
||||||
outputIsMappableFile = true;
|
|
||||||
}
|
|
||||||
@@ -2814,7 +2814,7 @@ void OutputFile::writeOutputFile(ld::Internal& state)
|
|
||||||
#ifdef __APPLE__ // ld64-port
|
|
||||||
struct statfs fsInfo;
|
|
||||||
if ( statfs(dirPath, &fsInfo) != -1 ) {
|
|
||||||
- if ( strcmp(fsInfo.f_fstypename, "hfs") == 0) {
|
|
||||||
+ if ( (strcmp(fsInfo.f_fstypename, "hfs") == 0) || (strcmp(fsInfo.f_fstypename, "apfs") == 0) ) {
|
|
||||||
outputIsMappableFile = true;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
diff --git a/cctools/ld64/src/ld/Options.cpp b/cctools/ld64/src/ld/Options.cpp
|
|
||||||
index 9250016..91d54ec 100644
|
|
||||||
--- a/cctools/ld64/src/ld/Options.cpp
|
|
||||||
+++ b/cctools/ld64/src/ld/Options.cpp
|
|
||||||
@@ -4175,23 +4175,9 @@ void Options::checkIllegalOptionCombinations()
|
|
||||||
throw "-r and -dead_strip cannot be used together";
|
|
||||||
|
|
||||||
// can't use -rpath unless targeting 10.5 or later
|
|
||||||
- if ( fRPaths.size() > 0 ) {
|
|
||||||
- if ( !minOS(ld::mac10_5, ld::iOS_2_0) )
|
|
||||||
- throw "-rpath can only be used when targeting Mac OS X 10.5 or later";
|
|
||||||
- switch ( fOutputKind ) {
|
|
||||||
- case Options::kDynamicExecutable:
|
|
||||||
- case Options::kDynamicLibrary:
|
|
||||||
- case Options::kDynamicBundle:
|
|
||||||
- break;
|
|
||||||
- case Options::kStaticExecutable:
|
|
||||||
- case Options::kObjectFile:
|
|
||||||
- case Options::kDyld:
|
|
||||||
- case Options::kPreload:
|
|
||||||
- case Options::kKextBundle:
|
|
||||||
- throw "-rpath can only be used when creating a dynamic final linked image";
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
+ if ( fRPaths.size() > 0 && !minOS(ld::mac10_5, ld::iOS_2_0) )
|
|
||||||
+ throw "-rpath can only be used when targeting Mac OS X 10.5 or later";
|
|
||||||
+
|
|
||||||
if ( fPositionIndependentExecutable ) {
|
|
||||||
switch ( fOutputKind ) {
|
|
||||||
case Options::kDynamicExecutable:
|
|
@ -18,24 +18,29 @@ assert (!stdenv.hostPlatform.isDarwin) -> maloader != null;
|
|||||||
|
|
||||||
let
|
let
|
||||||
baseParams = rec {
|
baseParams = rec {
|
||||||
pname = "${targetPrefix}cctools-port";
|
name = "${targetPrefix}cctools-port";
|
||||||
version = "895";
|
version = "927.0.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "tpoechtrager";
|
owner = "tpoechtrager";
|
||||||
repo = "cctools-port";
|
repo = "cctools-port";
|
||||||
rev = "07619027f8311fa61b4a549c75994b88739a82d8";
|
rev = "8239a5211bcf07d6b9d359782e1a889ec1d7cce5";
|
||||||
sha256 = "12g94hhz5v5bmy2w0zb6fb4bjlmn992gygc60h9nai15kshj2spi";
|
sha256 = "0h8b1my0wf1jyjq63wbiqkl2clgxsf87f6i4fjhqs431fzlq8sac";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ autoconf automake libtool autoreconfHook ];
|
nativeBuildInputs = [ autoconf automake ]
|
||||||
|
|
||||||
|
# TODO: remove on next hash change, libtool is unnecessary with autoreconfHook
|
||||||
|
++ stdenv.lib.optional (stdenv.targetPlatform == stdenv.hostPlatform) libtool
|
||||||
|
|
||||||
|
++ [ autoreconfHook ];
|
||||||
buildInputs = [ libuuid ]
|
buildInputs = [ libuuid ]
|
||||||
++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]
|
++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]
|
||||||
++ stdenv.lib.optional enableTapiSupport libtapi;
|
++ stdenv.lib.optional enableTapiSupport libtapi;
|
||||||
|
|
||||||
patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch ./apfs.patch ];
|
patches = [ ./ld-ignore-rpath-link.patch ];
|
||||||
|
|
||||||
__propagatedImpureHostDeps = [
|
__propagatedImpureHostDeps = [
|
||||||
# As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them
|
# As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, cmake, python }:
|
{ lib, stdenv, fetchFromGitHub, cmake, python, clang_6 }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "libtapi";
|
name = "libtapi-1000.10.8";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "tpoechtrager";
|
owner = "tpoechtrager";
|
||||||
repo = "apple-libtapi";
|
repo = "apple-libtapi";
|
||||||
rev = "e56673694db395e25b31808b4fbb9a7005e6875f";
|
rev = "cd9885b97fdff92cc41e886bba4a404c42fdf71b";
|
||||||
sha256 = "1lnl1af9sszp9wxfk0wljrpdmwcx83j0w5c0y4qw4pqrdkdgwks7";
|
sha256 = "1a19h39a48agvnmal99n9j1fjadiqwib7hfzmn342wmgh9z3vk0g";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python ];
|
nativeBuildInputs = [ cmake python ];
|
||||||
|
buildInputs = [ clang_6.cc ];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
cd src/apple-llvm/src
|
cd src/llvm
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=OFF" ];
|
cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=OFF" ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user