diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 739a1f8..1013b2e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -23,8 +23,6 @@ source: - patches/0003-Restore-using-__builtin_available-for-macos.patch # Taken from https://github.com/tpoechtrager/cctools-port/pull/118 - patches/0004-Turn-off-outputIsMappableFile-when-building-to-osx-a.patch - # Taken from https://github.com/tpoechtrager/cctools-port/pull/133 - - patches/0005-don-t-try-to-include-__assert-for-NDEBUG-builds.patch build: number: 0 diff --git a/recipe/patches/0001-Don-t-link-with-libc-abi.patch b/recipe/patches/0001-Don-t-link-with-libc-abi.patch index 4459efb..14cbc4d 100644 --- a/recipe/patches/0001-Don-t-link-with-libc-abi.patch +++ b/recipe/patches/0001-Don-t-link-with-libc-abi.patch @@ -1,17 +1,17 @@ -From 24e7cf07daaed3a5fb4be60486d31660ee8dcf7c Mon Sep 17 00:00:00 2001 +From 7247cc4028d1ac4b371eaf471eb0d687e1529290 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 26 Nov 2019 03:13:34 -0600 -Subject: [PATCH 1/5] Don't link with libc++abi +Subject: [PATCH 1/4] Don't link with libc++abi --- cctools/configure.ac | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cctools/configure.ac b/cctools/configure.ac -index 2cf4b8a..8b429d1 100644 +index ad18301..bea7958 100644 --- a/cctools/configure.ac +++ b/cctools/configure.ac -@@ -264,12 +264,10 @@ AC_CHECK_FUNC([write64],[AC_DEFINE(HAVE_WRITE64, 1)]) +@@ -255,12 +255,10 @@ AC_CHECK_FUNC([write64],[AC_DEFINE(HAVE_WRITE64, 1)]) ### Check for __cxa_demangle in various C++ ABI libs ### @@ -25,6 +25,3 @@ index 2cf4b8a..8b429d1 100644 ]) AC_SUBST(CXXABI_LIB) --- -2.38.1.windows.1 - diff --git a/recipe/patches/0002-ld64-add-conda-specific-env-vars-to-modify-lib-searc.patch b/recipe/patches/0002-ld64-add-conda-specific-env-vars-to-modify-lib-searc.patch index 55e5ff2..df9a4f6 100644 --- a/recipe/patches/0002-ld64-add-conda-specific-env-vars-to-modify-lib-searc.patch +++ b/recipe/patches/0002-ld64-add-conda-specific-env-vars-to-modify-lib-searc.patch @@ -1,7 +1,7 @@ -From 319ada49d0fa9a1af360fc59c6bd9f91a5a0cd0d Mon Sep 17 00:00:00 2001 +From 3a7ebebe7e6a82cce5c58ad7816e175d67791a56 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 16 Sep 2019 05:17:30 +0000 -Subject: [PATCH 2/5] ld64: add conda specific env vars to modify lib search +Subject: [PATCH 2/4] ld64: add conda specific env vars to modify lib search paths --- @@ -9,10 +9,10 @@ Subject: [PATCH 2/5] ld64: add conda specific env vars to modify lib search 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/cctools/ld64/src/ld/Options.cpp b/cctools/ld64/src/ld/Options.cpp -index 3bb8324..c0c0e05 100644 +index 00500fa..c377e42 100644 --- a/cctools/ld64/src/ld/Options.cpp +++ b/cctools/ld64/src/ld/Options.cpp -@@ -4237,12 +4237,28 @@ bool Options::shouldUseBuildVersion(ld::Platform plat, uint32_t minOSvers) const +@@ -4372,12 +4372,28 @@ bool Options::shouldUseBuildVersion(ld::Platform plat, uint32_t minOSvers) const void Options::buildSearchPaths(int argc, const char* argv[]) { @@ -42,7 +42,7 @@ index 3bb8324..c0c0e05 100644 // scan through argv looking for -L, -F, -Z, and -syslibroot options for(int i=0; i < argc; ++i) { if ( (argv[i][0] == '-') && (argv[i][1] == 'L') ) { -@@ -4274,7 +4290,7 @@ void Options::buildSearchPaths(int argc, const char* argv[]) +@@ -4409,7 +4425,7 @@ void Options::buildSearchPaths(int argc, const char* argv[]) frameworkPaths.push_back(frameworkSearchDir); } else if ( strcmp(argv[i], "-Z") == 0 ) @@ -51,8 +51,8 @@ index 3bb8324..c0c0e05 100644 else if ( strcmp(argv[i], "-v") == 0 ) { fVerbose = true; extern const char ldVersionString[]; -@@ -4383,6 +4399,10 @@ void Options::buildSearchPaths(int argc, const char* argv[]) - ++i; +@@ -4522,6 +4538,10 @@ void Options::buildSearchPaths(int argc, const char* argv[]) + platform = info->platform; } } + @@ -62,7 +62,7 @@ index 3bb8324..c0c0e05 100644 int standardLibraryPathsStartIndex = libraryPaths.size(); int standardFrameworkPathsStartIndex = frameworkPaths.size(); if ( addStandardLibraryDirectories ) { -@@ -4392,8 +4412,12 @@ void Options::buildSearchPaths(int argc, const char* argv[]) +@@ -4531,8 +4551,12 @@ void Options::buildSearchPaths(int argc, const char* argv[]) frameworkPaths.push_back("/System/DriverKit/System/Library/Frameworks/"); } else { @@ -76,7 +76,7 @@ index 3bb8324..c0c0e05 100644 frameworkPaths.push_back("/Library/Frameworks/"); frameworkPaths.push_back("/System/Library/Frameworks/"); -@@ -4409,7 +4433,8 @@ void Options::buildSearchPaths(int argc, const char* argv[]) +@@ -4548,7 +4572,8 @@ void Options::buildSearchPaths(int argc, const char* argv[]) } // now merge sdk and library paths to make real search paths @@ -86,7 +86,7 @@ index 3bb8324..c0c0e05 100644 int libIndex = 0; for (std::vector::iterator it = libraryPaths.begin(); it != libraryPaths.end(); ++it, ++libIndex) { const char* libDir = *it; -@@ -4454,7 +4479,7 @@ void Options::buildSearchPaths(int argc, const char* argv[]) +@@ -4593,7 +4618,7 @@ void Options::buildSearchPaths(int argc, const char* argv[]) else fLibrarySearchPaths.push_back(libDir); } @@ -95,6 +95,3 @@ index 3bb8324..c0c0e05 100644 warning("directory not found for option '-L%s'", libDir); } } --- -2.38.1.windows.1 - diff --git a/recipe/patches/0003-Restore-using-__builtin_available-for-macos.patch b/recipe/patches/0003-Restore-using-__builtin_available-for-macos.patch index b4c2934..3e444b8 100644 --- a/recipe/patches/0003-Restore-using-__builtin_available-for-macos.patch +++ b/recipe/patches/0003-Restore-using-__builtin_available-for-macos.patch @@ -1,7 +1,7 @@ -From cc31db916dac03d41729aa7107292bb857143293 Mon Sep 17 00:00:00 2001 +From 53a7b232324cac8f9e2a81bdc0af25f359912340 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 3 Feb 2022 21:28:42 -0600 -Subject: [PATCH 3/5] Restore using __builtin_available for macos +Subject: [PATCH 3/4] Restore using __builtin_available for macos --- cctools/libstuff/writeout.c | 12 ++++++------ @@ -9,10 +9,10 @@ Subject: [PATCH 3/5] Restore using __builtin_available for macos 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cctools/libstuff/writeout.c b/cctools/libstuff/writeout.c -index 1377657..2013ee6 100644 +index 763539d..00c1486 100644 --- a/cctools/libstuff/writeout.c +++ b/cctools/libstuff/writeout.c -@@ -145,27 +145,27 @@ uint32_t *throttle) +@@ -149,27 +149,27 @@ uint32_t *throttle) #ifndef __OPENSTEP__ /* cctools-port: replaced __builtin_available */ @@ -47,10 +47,10 @@ index 1377657..2013ee6 100644 /* * The environment variable ZERO_AR_DATE is used here and other diff --git a/cctools/misc/libtool.c b/cctools/misc/libtool.c -index 22c824d..17dc6dd 100644 +index 3ab43a1..e098206 100644 --- a/cctools/misc/libtool.c +++ b/cctools/misc/libtool.c -@@ -1382,9 +1382,9 @@ char **envp) +@@ -1389,9 +1389,9 @@ char **envp) if (cmd_flags.D == FALSE && zero_ar_date == FALSE) { #ifndef __OPENSTEP__ /* cctools-port: replaced __builtin_available */ @@ -62,7 +62,7 @@ index 22c824d..17dc6dd 100644 #ifdef HAVE_CLOCK_GETTIME if (clock_gettime(CLOCK_REALTIME, &toc_timespec)) { system_fatal("clock_gettime failed"); -@@ -1392,9 +1392,9 @@ char **envp) +@@ -1399,9 +1399,9 @@ char **envp) } toc_time = toc_timespec.tv_sec; #endif /* HAVE_CLOCK_GETTIME */ @@ -74,7 +74,7 @@ index 22c824d..17dc6dd 100644 #ifndef HAVE_CLOCK_GETTIME if (gettimeofday(&toc_timeval, NULL)) { system_fatal("gettimeofday failed"); -@@ -1402,9 +1402,9 @@ char **envp) +@@ -1409,9 +1409,9 @@ char **envp) } toc_time = toc_timeval.tv_sec; #endif /* !HAVE_CLOCK_GETTIME */ @@ -86,6 +86,3 @@ index 22c824d..17dc6dd 100644 #else toc_time = time(NULL); #endif /* !defined(__OPENSTEP__) */ --- -2.38.1.windows.1 - diff --git a/recipe/patches/0004-Turn-off-outputIsMappableFile-when-building-to-osx-a.patch b/recipe/patches/0004-Turn-off-outputIsMappableFile-when-building-to-osx-a.patch index 21a57f2..8c40615 100644 --- a/recipe/patches/0004-Turn-off-outputIsMappableFile-when-building-to-osx-a.patch +++ b/recipe/patches/0004-Turn-off-outputIsMappableFile-when-building-to-osx-a.patch @@ -1,34 +1,31 @@ -From 5d6c783218d987da96ac96ede628970122eab0b1 Mon Sep 17 00:00:00 2001 +From 4bc8b0d61a4787ef302ddfc0ab6bc46b7804869d Mon Sep 17 00:00:00 2001 From: Eli Rykoff Date: Thu, 24 Feb 2022 21:16:24 -0800 -Subject: [PATCH 4/5] Turn off outputIsMappableFile when building to osx-arm64 +Subject: [PATCH 4/4] Turn off outputIsMappableFile when building to osx-arm64 --- cctools/ld64/src/ld/OutputFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cctools/ld64/src/ld/OutputFile.cpp b/cctools/ld64/src/ld/OutputFile.cpp -index c6b4270..6cd1591 100644 +index 36772bb..d79cd8a 100644 --- a/cctools/ld64/src/ld/OutputFile.cpp +++ b/cctools/ld64/src/ld/OutputFile.cpp -@@ -3805,7 +3805,7 @@ void OutputFile::writeOutputFile(ld::Internal& state) - // Don't use mmap on non-hfs volumes +@@ -3844,7 +3844,7 @@ void OutputFile::writeOutputFile(ld::Internal& state) #ifdef __APPLE__ // ld64-port + // Don't use mmap on non-hfs volumes struct statfs fsInfo; - if ( statfs(_options.outputFilePath(), &fsInfo) != -1 ) { -+ if ( (_options.architecture() != CPU_TYPE_ARM64) && (statfs(_options.outputFilePath(), &fsInfo) != -1) ) { - if ( (strcmp(fsInfo.f_fstypename, "hfs") == 0) || (strcmp(fsInfo.f_fstypename, "apfs") == 0) ) { - (void)unlink(_options.outputFilePath()); - outputIsMappableFile = true; -@@ -3835,7 +3835,7 @@ void OutputFile::writeOutputFile(ld::Internal& state) - end[1] = '\0'; ++ if ( (_options.architecture() != CPU_TYPE_ARM64) && (statfs(_options.outputFilePath(), &fsInfo) != -1) ) { + // + (void)unlink(_options.outputFilePath()); + +@@ -3878,7 +3878,7 @@ void OutputFile::writeOutputFile(ld::Internal& state) + strcpy(dirPath, "./"); // if no slashes path, then writing to cwd #ifdef __APPLE__ // ld64-port - struct statfs fsInfo; -- if ( statfs(dirPath, &fsInfo) != -1 ) { -+ if ( (_options.architecture() != CPU_TYPE_ARM64) && (statfs(dirPath, &fsInfo) != -1) ) { - if ( (strcmp(fsInfo.f_fstypename, "hfs") == 0) || (strcmp(fsInfo.f_fstypename, "apfs") == 0) ) { - outputIsMappableFile = true; - } --- -2.38.1.windows.1 - + struct statfs fsInfo; +- if ( statfs(dirPath, &fsInfo) != -1 ) { ++ if ( (_options.architecture() != CPU_TYPE_ARM64) && (statfs(dirPath, &fsInfo) != -1) ) { + if ( (strcmp(fsInfo.f_fstypename, "hfs") == 0) || (strcmp(fsInfo.f_fstypename, "apfs") == 0) ) { + outputIsMappableFile = true; + } diff --git a/recipe/patches/0005-don-t-try-to-include-__assert-for-NDEBUG-builds.patch b/recipe/patches/0005-don-t-try-to-include-__assert-for-NDEBUG-builds.patch deleted file mode 100644 index 020183d..0000000 --- a/recipe/patches/0005-don-t-try-to-include-__assert-for-NDEBUG-builds.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 875ab8090b8d645b4a9ca7e60753b4726959156a Mon Sep 17 00:00:00 2001 -From: "H. Vetinari" -Date: Tue, 14 Mar 2023 17:36:17 +1100 -Subject: [PATCH 5/5] don't try to include __assert for NDEBUG builds - ---- - cctools/ld64/src/3rd/helper.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/cctools/ld64/src/3rd/helper.c b/cctools/ld64/src/3rd/helper.c -index 179a233..37b0e2b 100644 ---- a/cctools/ld64/src/3rd/helper.c -+++ b/cctools/ld64/src/3rd/helper.c -@@ -37,6 +37,7 @@ const char ldVersionString[] = "@(#)PROGRAM:ld PROJECT:ld64-" STRINGIFY(LD64_VE - - void __assert_rtn(const char *func, const char *file, int line, const char *msg) - { -+#ifndef NDEBUG - #if defined(__FreeBSD__) || defined(__DragonFly__) - __assert(msg, file, line, func); - #elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) -@@ -48,6 +49,7 @@ void __assert_rtn(const char *func, const char *file, int line, const char *msg) - fflush(NULL); - abort(); - #endif /* __FreeBSD__ */ -+#endif /* NDEBUG */ - } - - int _NSGetExecutablePath(char *epath, unsigned int *size) --- -2.38.1.windows.1 -