crosstool-ng/packages/binutils/2.42/0008-gold-Deal-with-absence-of-uchar-on-macOS.patch
Chris Packham ecc5e41618 binutils: Add 2.42 release
Add the new release and rebase the local patches. Add a new patch which
resolves a build issue on macOS.

https://sourceware.org/pipermail/binutils/2024-January/132213.html

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2024-03-12 13:04:25 +13:00

42 lines
1017 B
Diff

From b02df7b23474a6c87c9b2488c80b08207a77c5cb Mon Sep 17 00:00:00 2001
From: Bryan Hundven <bryanhundven@gmail.com>
Date: Tue, 6 Feb 2024 16:34:38 +1300
Subject: [PATCH] gold: Deal with absence of <uchar> on macOS
Add code to provide fallback definitions of char16_t/char32_t on macOS.
---
gold/output.cc | 6 ++++++
gold/stringpool.cc | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/gold/output.cc b/gold/output.cc
index ead67f20..2dbaa2ee 100644
--- a/gold/output.cc
+++ b/gold/output.cc
@@ -29,7 +29,9 @@
#include <unistd.h>
#include <sys/stat.h>
#include <algorithm>
+#if !defined(__APPLE__)
#include <uchar.h>
+#endif
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
diff --git a/gold/stringpool.cc b/gold/stringpool.cc
index d8f38cfa..eca59bad 100644
--- a/gold/stringpool.cc
+++ b/gold/stringpool.cc
@@ -25,7 +25,9 @@
#include <cstring>
#include <algorithm>
#include <vector>
+#if !defined(__APPLE__)
#include <uchar.h>
+#endif
#include "output.h"
#include "parameters.h"
--
2.44.0