Skip to content

Commit

Permalink
Fix build error on OSX
Browse files Browse the repository at this point in the history
When building Gold on OSX 10.9 and Clang 6.0, the build process fails
with the error:

In file included from /Users/thomas/minix/tools/binutils/../../external/gpl3/binutils/dist/gold/binary.cc:31:
In file included from /Users/thomas/minix/tools/binutils/../../external/gpl3/binutils/dist/gold/stringpool.h:23:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:438:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwchar:107:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwctype:54:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cctype:51:72: error: use of undeclared identifier 'do_not_use_isalnum_with_safe_ctype'
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalnum(int __c) {return isalnum(__c);}

Signed-off-by: Thomas Veerman <[email protected]>
Change-Id: Ib7ca13a51e83c31bb3020d755e04b308aeacde5d
  • Loading branch information
tveerman authored and sambuc committed Oct 10, 2014
1 parent ce3cb94 commit e1c7263
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions external/gpl3/binutils/patches/0008-Fix-build-error-on-OSX.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From aff3cc514eff051c4c4a838d6c927c816733b01a Mon Sep 17 00:00:00 2001
From: Thomas Veerman <[email protected]>
Date: Fri, 10 Oct 2014 12:17:39 +0200
Subject: [PATCH] Fix build error on OSX

When building Gold on OSX 10.9 and Clang 6.0, the build process fails
with the error:

In file included from /Users/thomas/minix/tools/binutils/../../external/gpl3/binutils/dist/gold/binary.cc:31:
In file included from /Users/thomas/minix/tools/binutils/../../external/gpl3/binutils/dist/gold/stringpool.h:23:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:438:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwchar:107:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cwctype:54:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cctype:51:72: error: use of undeclared identifier 'do_not_use_isalnum_with_safe_ctype'
inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalnum(int __c) {return isalnum(__c);}

Signed-off-by: Thomas Veerman <[email protected]>
---
gold/binary.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gold/binary.cc b/gold/binary.cc
index 4dab52c..77a78f0 100644
--- a/gold/binary.cc
+++ b/gold/binary.cc
@@ -24,10 +24,10 @@

#include <cerrno>
#include <cstring>
+#include "stringpool.h"
#include "safe-ctype.h"

#include "elfcpp.h"
-#include "stringpool.h"
#include "fileread.h"
#include "output.h"
#include "binary.h"
--
1.7.12.4 (Apple Git-37)

0 comments on commit e1c7263

Please sign in to comment.