-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
cctools: 973.0.1 -> 1010.6 #307880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
cctools: 973.0.1 -> 1010.6 #307880
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
1cb1853
ld-wrapper: use a temporary file for reponse file
reckenrode 4712e8f
libredirect: use llvmPackages unconditionally
reckenrode 91d8dd9
darwin.apple_sdk_10_12.sdkRoot: specify exact SDK version
reckenrode 3a545f6
darwin.AvailabilityVersions: init at 140.1
reckenrode 7f45223
darwin.binutils: add dwarfdump and fix typo
reckenrode b7952b4
darwin.Libsystem: get headers from AvailabilityVersions
reckenrode 4ee4fe5
darwin.configd: remove dependency on CF for private headers
reckenrode baf3568
darwin.libdispatch: 442.1.4 -> 703.50.37
reckenrode cdf968c
libtapi: 1100.0.11 -> 1500.0.12.3
reckenrode f02b50b
ld64: init at 951.9
reckenrode 9f68d60
cctools: 973.0.1 -> 1010.6
reckenrode 65a37e7
darwin.stdenv: make sure curl cannot be used
reckenrode 8559d64
darwin.stdenv: always use a response file
reckenrode 78da51c
darwin.stdenv: adjust flags for llvm-strip in bootstrap tools
reckenrode 7f1bc0d
binutils: drop Darwin hack
reckenrode 05e5d7f
darwin.stdenv: clean up GNU binutils ban
reckenrode 9403fdc
darwin.stdenv: consolidate stage 2 into one stage
reckenrode 10c87ee
stdenv: set NIX_DONT_SET_RPATH_FOR_TARGET on Darwin
reckenrode c922cb2
bintools-wrapper: drop postLinkSignHook
reckenrode a49dbb2
darwin.stdenv: switch to top-level cctools and ld64
reckenrode ca92415
dotnet: use dwarfdump from darwin.binutils
reckenrode 79f5f9b
ghc: update Darwin bintools references
reckenrode 76e1209
darwin.{cctools,libtapi}: drop old source
reckenrode 9641ac5
darwin.cctools-{apple,llvm}: add to darwin-aliases.nix
reckenrode File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
pkgs/by-name/cc/cctools/0001-Fix-build-issues-with-misc-redo_prebinding.c.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| From 55b2a5fcc38eb62f53e155bd8c741481690f1c73 Mon Sep 17 00:00:00 2001 | ||
| From: Randy Eckenrode <randy@largeandhighquality.com> | ||
| Date: Wed, 10 Apr 2024 19:08:39 -0400 | ||
| Subject: [PATCH 1/6] Fix build issues with misc/redo_prebinding.c | ||
|
|
||
| - Add missing headers; and | ||
| - Add missing arguments to `writeout`. | ||
| --- | ||
| misc/redo_prebinding.c | 7 ++++--- | ||
| 1 file changed, 4 insertions(+), 3 deletions(-) | ||
|
|
||
| diff --git a/misc/redo_prebinding.c b/misc/redo_prebinding.c | ||
| index a5a3c81..9d0f4c8 100644 | ||
| --- a/misc/redo_prebinding.c | ||
| +++ b/misc/redo_prebinding.c | ||
| @@ -83,6 +83,7 @@ | ||
| #include <mach-o/redo_prebinding.h> | ||
| #endif /* defined(LIBRARY_API) */ | ||
|
|
||
| +#import <stdint.h> | ||
| #import <stdio.h> | ||
| #import <stdlib.h> | ||
| #import <string.h> | ||
| @@ -106,7 +107,7 @@ | ||
| #import <stuff/hppa.h> | ||
| #import <stuff/execute.h> | ||
| #import <stuff/guess_short_name.h> | ||
| -//#import <stuff/seg_addr_table.h> | ||
| +#import <stuff/seg_addr_table.h> | ||
| #import <stuff/macosx_deployment_target.h> | ||
|
|
||
| #include <mach-o/dyld.h> | ||
| @@ -918,7 +919,7 @@ char *envp[]) | ||
| if(write_to_stdout) | ||
| output_file = NULL; | ||
| writeout(archs, narchs, output_file, mode, TRUE, FALSE, FALSE, | ||
| - FALSE, NULL); | ||
| + FALSE, FALSE, NULL); | ||
| if(errors){ | ||
| if(write_to_stdout == FALSE) | ||
| unlink(output_file); | ||
| @@ -928,7 +929,7 @@ char *envp[]) | ||
| else{ | ||
| output_file = makestr(input_file, ".redo_prebinding", NULL); | ||
| writeout(archs, narchs, output_file, mode, TRUE, FALSE, FALSE, | ||
| - FALSE, NULL); | ||
| + FALSE, FALSE, NULL); | ||
| if(errors){ | ||
| unlink(output_file); | ||
| return(2); | ||
| -- | ||
| 2.45.2 | ||
|
|
25 changes: 25 additions & 0 deletions
25
pkgs/by-name/cc/cctools/0002-Rely-on-libcd_is_blob_a_linker_signature.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| From 419c469634891d09f6688d56da9e26431018f342 Mon Sep 17 00:00:00 2001 | ||
| From: Randy Eckenrode <randy@largeandhighquality.com> | ||
| Date: Wed, 10 Apr 2024 20:36:53 -0400 | ||
| Subject: [PATCH 2/6] Rely on libcd_is_blob_a_linker_signature | ||
|
|
||
| --- | ||
| libstuff/code_directory.c | 2 +- | ||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
|
||
| diff --git a/libstuff/code_directory.c b/libstuff/code_directory.c | ||
| index 7c158fa..3b8eb77 100644 | ||
| --- a/libstuff/code_directory.c | ||
| +++ b/libstuff/code_directory.c | ||
| @@ -146,7 +146,7 @@ static const char* format_version_xyz(uint32_t version) | ||
| */ | ||
| int codedir_is_linker_signed(const char* data, uint32_t size) | ||
| { | ||
| -#if 1 | ||
| +#if 0 | ||
| // HACK: libcodedirectory.h is in both the macOS SDK in /usr/local/include, and in the tool chain at /usr/include. | ||
| // but there is no way to control clang's search path to look in the toolchain first. | ||
| // So, declare newer API locally. Once this new header is in all SDKs we can remove this. | ||
| -- | ||
| 2.45.2 | ||
|
|
||
50 changes: 50 additions & 0 deletions
50
pkgs/by-name/cc/cctools/0003-Fix-utimensat-compatability-with-the-10.12-SDK.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| From 989ba5e30cefa0dd8990da158661713c4a21c0fe Mon Sep 17 00:00:00 2001 | ||
| From: Randy Eckenrode <randy@largeandhighquality.com> | ||
| Date: Thu, 11 Apr 2024 18:05:34 -0400 | ||
| Subject: [PATCH 3/6] Fix utimensat compatability with the 10.12 SDK | ||
|
|
||
| --- | ||
| include/compat.h | 3 +++ | ||
| libstuff/writeout.c | 2 +- | ||
| misc/lipo.c | 2 +- | ||
| 3 files changed, 5 insertions(+), 2 deletions(-) | ||
| create mode 100644 include/compat.h | ||
|
|
||
| diff --git a/include/compat.h b/include/compat.h | ||
| new file mode 100644 | ||
| index 0000000..8b1b866 | ||
| --- /dev/null | ||
| +++ b/include/compat.h | ||
| @@ -0,0 +1,3 @@ | ||
| +#pragma once | ||
| +#include <time.h> | ||
| +extern int utimensat(int dirfd, const char* pathname, const struct timespec times[_Nullable 2], int flags); | ||
| diff --git a/libstuff/writeout.c b/libstuff/writeout.c | ||
| index f904caa..03fa535 100644 | ||
| --- a/libstuff/writeout.c | ||
| +++ b/libstuff/writeout.c | ||
| @@ -297,7 +297,7 @@ no_throttle: | ||
| * have been zeroed out when the library was created. writeout | ||
| * will not zero out the modification time in the filesystem. | ||
| */ | ||
| - if (__builtin_available(macOS 10.12, *)) { | ||
| + if (__builtin_available(macOS 10.13, *)) { | ||
| struct timespec times[2] = {0}; | ||
| memcpy(×[0], &toc_timespec, sizeof(struct timespec)); | ||
| memcpy(×[1], &toc_timespec, sizeof(struct timespec)); | ||
| diff --git a/misc/lipo.c b/misc/lipo.c | ||
| index 04a3eca..887c049 100644 | ||
| --- a/misc/lipo.c | ||
| +++ b/misc/lipo.c | ||
| @@ -607,7 +607,7 @@ unknown_flag: | ||
| if(close(fd) == -1) | ||
| system_fatal("can't close output file: %s",output_file); | ||
| #ifndef __OPENSTEP__ | ||
| - if (__builtin_available(macOS 10.12, *)) { | ||
| + if (__builtin_available(macOS 10.13, *)) { | ||
| time_result = utimensat(AT_FDCWD, output_file, | ||
| output_times, 0); | ||
| } | ||
| -- | ||
| 2.45.2 | ||
|
|
57 changes: 57 additions & 0 deletions
57
pkgs/by-name/cc/cctools/0004-Use-nixpkgs-clang-with-the-assembler-driver.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| From 86b5ad551ef0ffc7ca4da24b7619937bec738522 Mon Sep 17 00:00:00 2001 | ||
| From: Randy Eckenrode <randy@largeandhighquality.com> | ||
| Date: Mon, 15 Apr 2024 20:47:59 -0400 | ||
| Subject: [PATCH 4/6] Use nixpkgs clang with the assembler driver | ||
|
|
||
| --- | ||
| as/driver.c | 20 +++----------------- | ||
| 1 file changed, 3 insertions(+), 17 deletions(-) | ||
|
|
||
| diff --git a/as/driver.c b/as/driver.c | ||
| index a0d49ad..c15dcbf 100644 | ||
| --- a/as/driver.c | ||
| +++ b/as/driver.c | ||
| @@ -36,7 +36,7 @@ char **envp) | ||
| char *p, c, *arch_name, *as, *as_local; | ||
| char **new_argv; | ||
| const char *CLANG = "clang"; | ||
| - char *prefix, buf[MAXPATHLEN], resolved_name[PATH_MAX]; | ||
| + char *prefix = "@clang-unwrapped@/bin/"; | ||
| uint32_t bufsize; | ||
| struct arch_flag arch_flag; | ||
| const struct arch_flag *arch_flags, *family_arch_flag; | ||
| @@ -50,22 +50,6 @@ char **envp) | ||
| qflag = FALSE; | ||
| Qflag = FALSE; | ||
| some_input_files = FALSE; | ||
| - /* | ||
| - * Construct the prefix to the assembler driver. | ||
| - */ | ||
| - bufsize = MAXPATHLEN; | ||
| - p = buf; | ||
| - i = _NSGetExecutablePath(p, &bufsize); | ||
| - if(i == -1){ | ||
| - p = allocate(bufsize); | ||
| - _NSGetExecutablePath(p, &bufsize); | ||
| - } | ||
| - prefix = realpath(p, resolved_name); | ||
| - if(prefix == NULL) | ||
| - system_fatal("realpath(3) for %s failed", p); | ||
| - p = rindex(prefix, '/'); | ||
| - if(p != NULL) | ||
| - p[1] = '\0'; | ||
| /* | ||
| * Process the assembler flags exactly like the assembler would (except | ||
| * let the assembler complain about multiple flags, bad combinations of | ||
| @@ -362,6 +346,8 @@ char **envp) | ||
| exit(1); | ||
| } | ||
|
|
||
| + prefix = "@gas@/bin/"; /* `libexec` is found relative to the assembler driver’s path. */ | ||
toonn marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| + | ||
| /* | ||
| * If this assembler exist try to run it else print an error message. | ||
| */ | ||
| -- | ||
| 2.45.2 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| From e62f7d75380540937f24f896c82736a1e653cc75 Mon Sep 17 00:00:00 2001 | ||
| From: Randy Eckenrode <randy@largeandhighquality.com> | ||
| Date: Mon, 22 Apr 2024 18:15:53 -0400 | ||
| Subject: [PATCH 5/6] Find ld64 in the store | ||
|
|
||
| --- | ||
| libstuff/execute.c | 5 +++++ | ||
| 1 file changed, 5 insertions(+) | ||
|
|
||
| diff --git a/libstuff/execute.c b/libstuff/execute.c | ||
| index 8526ab7..abbbf1b 100644 | ||
| --- a/libstuff/execute.c | ||
| +++ b/libstuff/execute.c | ||
| @@ -149,6 +149,11 @@ char * | ||
| cmd_with_prefix( | ||
| char *str) | ||
| { | ||
| + // Return the path to ld64 in the store. | ||
| + if (strcmp(str, "ld") == 0) { | ||
| + return "@ld64_path@"; | ||
| + } | ||
| + | ||
| int i; | ||
| char *p; | ||
| char *prefix, buf[MAXPATHLEN], resolved_name[PATH_MAX]; | ||
| -- | ||
| 2.45.2 | ||
|
|
30 changes: 30 additions & 0 deletions
30
pkgs/by-name/cc/cctools/0006-Support-target-prefixes-in-ranlib-detection.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| From e25de788260051892b9e34177ea957cbafe6c415 Mon Sep 17 00:00:00 2001 | ||
| From: Randy Eckenrode <randy@largeandhighquality.com> | ||
| Date: Thu, 2 May 2024 07:55:05 -0400 | ||
| Subject: [PATCH 6/6] Support target prefixes in ranlib detection | ||
|
|
||
| --- | ||
| misc/libtool.c | 4 ++-- | ||
| 1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
|
||
| diff --git a/misc/libtool.c b/misc/libtool.c | ||
| index 289ec4d..8265d53 100644 | ||
| --- a/misc/libtool.c | ||
| +++ b/misc/libtool.c | ||
| @@ -426,11 +426,11 @@ char **envp) | ||
| p++; | ||
| else | ||
| p = argv[0]; | ||
| - if(strncmp(p, "ranlib", sizeof("ranlib") - 1) == 0) { | ||
| + if(strncmp(p, "@targetPrefix@ranlib", sizeof("@targetPrefix@ranlib") - 1) == 0) { | ||
| cmd_flags.ranlib = TRUE; | ||
| } | ||
| else if (getenv("LIBTOOL_FORCE_RANLIB")) { | ||
| - progname = "ranlib"; | ||
| + progname = "@targetPrefix@ranlib"; | ||
| cmd_flags.ranlib = TRUE; | ||
| } | ||
|
|
||
| -- | ||
| 2.45.2 | ||
|
|
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.