mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 08:21:14 +00:00
3b63abfbfc
Release Notes: https://gcc.gnu.org/pipermail/gcc/2024-May/243980.html Remove upstreamed patches: - patches-13.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch - patches-13.x/021-libcc1-fix-vector-include.patch - patches-13.x/400-LoongArch-Fix-MUSL_DYNAMIC_LINKER.patch - patches-13.x/401-LoongArch-Modify-MUSL_DYNAMIC_LINKER.patch Refresh patches: - patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch - patches-13.x/970-macos_arm64-building-fix.patch Signed-off-by: Olcay Korkmaz <nuke_mania@hotmail.com>
46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
commit 9c6e71079b46ad5433165feaa2001450f2017b56
|
|
Author: Przemysław Buczkowski <prem@prem.moe>
|
|
Date: Mon Aug 16 13:16:21 2021 +0100
|
|
|
|
GCC: Patch for Apple Silicon compatibility
|
|
|
|
This patch fixes a linker error occuring when compiling
|
|
the cross-compiler on macOS and ARM64 architecture.
|
|
|
|
Adapted from:
|
|
https://github.com/richfelker/musl-cross-make/issues/116#issuecomment-823612404
|
|
|
|
Change-Id: Ia3ee98a163bbb62689f42e2da83a5ef36beb0913
|
|
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4329
|
|
Reviewed-by: John Scipione <jscipione@gmail.com>
|
|
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
|
|
|
--- a/gcc/config/aarch64/aarch64.h
|
|
+++ b/gcc/config/aarch64/aarch64.h
|
|
@@ -1195,7 +1195,7 @@ extern enum aarch64_code_model aarch64_c
|
|
|
|
/* Extra specs when building a native AArch64-hosted compiler.
|
|
Option rewriting rules based on host system. */
|
|
-#if defined(__aarch64__)
|
|
+#if defined(__aarch64__) && ! defined(__APPLE__)
|
|
extern const char *host_detect_local_cpu (int argc, const char **argv);
|
|
#define HAVE_LOCAL_CPU_DETECT
|
|
# define EXTRA_SPEC_FUNCTIONS \
|
|
--- a/gcc/config/host-darwin.cc
|
|
+++ b/gcc/config/host-darwin.cc
|
|
@@ -23,6 +23,8 @@
|
|
#include "options.h"
|
|
#include "diagnostic-core.h"
|
|
#include "config/host-darwin.h"
|
|
+#include "hosthooks.h"
|
|
+#include "hosthooks-def.h"
|
|
#include <errno.h>
|
|
|
|
/* For Darwin (macOS only) platforms, without ASLR (PIE) enabled on the
|
|
@@ -181,3 +183,5 @@ darwin_gt_pch_use_address (void *&addr,
|
|
|
|
return 1;
|
|
}
|
|
+
|
|
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
|