[Bug gold/17473] Build error on OSX when building with Clang 6.0
https://sourceware.org/bugzilla/show_bug.cgi?id=17473 --- Comment #2 from Thomas Veerman --- I was inspired by a thread [0] on the GCC mailing list where a similar error message was produced, and it was suggested to move the include of higher up in the file. That 'fix' was actually meant to fix something entirely else [1]. Now, why does this work? includes , which includes , which in turn includes that finally includes . cctype in the OSX toolchain does among other things: #ifdef isalnum inline _LIBCPP_INLINE_VISIBILITY int __libcpp_isalnum(int __c) {return isalnum(__c);} #undef isalnum inline _LIBCPP_INLINE_VISIBILITY int isalnum(int __c) {return __libcpp_isalnum(__c);} #else // isalnum using ::isalnum; #endif // isalnum By including before "safe-ctype.h", isalnum is not yet #defined and so the #undef branch is taken. If safe-ctype is included it will redefine isalnum to 'do_not_use_isalnum_with_safe_ctype'. However, safe-ctype first includes which includes , so that shouldn't be a problem. But the latter is only true for the GNU toolchain and I'm using OSX's toolchain which doesn't have (or I'm not looking in the right place). This should normally fail, but I think the Gold build system when invoked from Minix' build system picks up a that's included by GCC (which is also built by Minix). This includes a which has a different header guard than the cctype in OSX toolchain. binary.cc includes "stringpool.h" a few lines down of "safe-ctype.h", which eventually includes -> -> -> from the OSX toolchain. Due to the inclusion of "safe-ctype.h" earlier, isalnum has now been defined to 'do_not_use_isalnum_with_safe_ctype', and while now take the #ifdef branch and cause a compilation error. is included twice due to the difference in header guards. Now, I didn't realize all of this when I made the patch, but since you asked why it fixed the problem I investigated it. I agree it's dirty to include a header that has nothing to do with the file. It appears that moving the inclusion of "stringpool.h" above "safe-ctype.h" does the job as well. [0] https://gcc.gnu.org/ml/gcc/2014-05/msg6.html [1] PR 61026 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61026 -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/17473] Build error on OSX when building with Clang 6.0
https://sourceware.org/bugzilla/show_bug.cgi?id=17473 Thomas Veerman changed: What|Removed |Added Attachment #7821|0 |1 is obsolete|| --- Comment #3 from Thomas Veerman --- Created attachment 7823 --> https://sourceware.org/bugzilla/attachment.cgi?id=7823&action=edit Second version of the patch fixing the build error -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/17473] Build error on OSX when building with Clang 6.0
https://sourceware.org/bugzilla/show_bug.cgi?id=17473 --- Comment #4 from Thomas Veerman --- Created attachment 7824 --> https://sourceware.org/bugzilla/attachment.cgi?id=7824&action=edit Requested saved temp version of binary.cc -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/16746] ld complains about .gnu.warning symbols referenced by linker plugin inputs
https://sourceware.org/bugzilla/show_bug.cgi?id=16746 --- Comment #14 from cvs-commit at gcc dot gnu.org --- This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, hjl/linux/master has been created at 437353b63e31e35c19ceeea7c58320110c0beb61 (commit) - Log - https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=437353b63e31e35c19ceeea7c58320110c0beb61 commit 437353b63e31e35c19ceeea7c58320110c0beb61 Merge: 6992dd8 9e5e528 Author: H.J. Lu Date: Fri Oct 10 10:45:50 2014 -0700 Merge commit '9e5e52835bb205850fb0fa6f0393ecd64b02b22f' into hjl/linux/master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6992dd88e2eb4ec851640c97db73248667f68184 commit 6992dd88e2eb4ec851640c97db73248667f68184 Author: H.J. Lu Date: Mon Sep 8 09:57:09 2014 -0700 Rebase binutils-secondary.patch against master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=31e5f334201f98bf9aa30944608470096970b27a commit 31e5f334201f98bf9aa30944608470096970b27a Merge: de52a97 2e4bb98 Author: H.J. Lu Date: Mon Sep 8 09:45:37 2014 -0700 Merge remote-tracking branch 'origin/master' into hjl/linux/master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=de52a9709c4d12a65323ac6dcb9490478ecd5b58 commit de52a9709c4d12a65323ac6dcb9490478ecd5b58 Merge: 2305663 fb0576e Author: H.J. Lu Date: Thu Aug 28 15:11:20 2014 -0700 Merge remote-tracking branch 'origin/master' into hjl/linux/master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=23056638c2e74611206dd8be2405f019a89145ce commit 23056638c2e74611206dd8be2405f019a89145ce Merge: fae008a 656e886 Author: H.J. Lu Date: Thu Aug 21 09:45:08 2014 -0700 Merge remote-tracking branch 'origin/master' into hjl/linux/master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fae008ab6d5803ea3f36ae6efc90a99f2d7a29b9 commit fae008ab6d5803ea3f36ae6efc90a99f2d7a29b9 Author: H.J. Lu Date: Fri Aug 15 09:52:24 2014 -0700 Update binutils-lto-mixed.patch against master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d30c1fa14020805c02fdee4621d1a3eb2b5f8415 commit d30c1fa14020805c02fdee4621d1a3eb2b5f8415 Merge: 9c2f3cec cb039ba Author: H.J. Lu Date: Fri Aug 15 09:40:52 2014 -0700 Merge remote-tracking branch 'origin/master' into hjl/linux/master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9c2f3cec4317c68f0f0bafb34340ffdb580c98f0 commit 9c2f3cec4317c68f0f0bafb34340ffdb580c98f0 Author: H.J. Lu Date: Wed Aug 6 10:31:10 2014 -0700 Update binutils-lto-mixed.patch against master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=571528977311ff8db7fadb99c123564a3a647f71 commit 571528977311ff8db7fadb99c123564a3a647f71 Author: H.J. Lu Date: Wed Aug 6 10:30:55 2014 -0700 Rebase binutils-secondary.patch against master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c85a5f11c1f161d1f2953c9c175b40dc541e5c2d commit c85a5f11c1f161d1f2953c9c175b40dc541e5c2d Merge: 8c06239 d022bdd Author: H.J. Lu Date: Wed Aug 6 10:21:48 2014 -0700 Merge remote-tracking branch 'origin/master' into hjl/linux/master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8c06239995e17a360d78bb3c0a4981e572c55d4b commit 8c06239995e17a360d78bb3c0a4981e572c55d4b Merge: 129b0c6 90debf2 Author: H.J. Lu Date: Fri Aug 1 08:43:48 2014 -0700 Merge remote-tracking branch 'origin/master' into hjl/linux/master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=129b0c63634ab7aa3dcffbecad717734537d03d6 commit 129b0c63634ab7aa3dcffbecad717734537d03d6 Merge: 75ccfde cca5b8b Author: H.J. Lu Date: Wed Jul 16 11:18:20 2014 -0700 Merge remote-tracking branch 'origin/master' into hjl/linux/master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=75ccfdea077a41e20e0ac4cb08a2d478e17187fb commit 75ccfdea077a41e20e0ac4cb08a2d478e17187fb Merge: b63206a 144bed8 Author: H.J. Lu Date: Wed Jul 16 11:03:21 2014 -0700 Merge remote-tracking branch 'origin/master' into hjl/linux/master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b63206aa3fb312f622c3d98553f53be48d4e6c52 commit b63206aa3fb312f622c3d98553f53be48d4e6c52 Merge: cb5fd63 41e9956 Author: H.J. Lu Date: Tue Jul 15 11:23:01 2014 -0700 Merge remote-tracking branch 'origin/master' into hjl/linux/master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cb5fd6395ea0fb4d2aafc7b5a0a5f57998f1935b commit cb5fd6395ea0fb4d2aafc7b5a0a5f57998f1935b Author: H.J. Lu Date: Tue Jul 8 09:02:37 2014 -0700 Update binutils-lto-mixed.patch against master https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=da8efc9b0b1f957f204313cc7e6f0f62d9545a3c commit da8efc9b0b1f957f204313cc7e6f0f62d9545a3c Merge: 7e029f3 792f775 Author: H.J. Lu Date: Tue Jul 8 08:41:02 2014 -07