[Bug c/101766] Microblaze gcc misses symver but __has_attribute(symver) returns true
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766 --- Comment #7 from Vincent Fazio --- Created attachment 54646 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54646=edit partial patch for microblaze migration to elfos.h
[Bug c/101766] Microblaze gcc misses symver but __has_attribute(symver) returns true
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766 --- Comment #6 from Vincent Fazio --- Created attachment 54645 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54645=edit add macro to microblaze.h
[Bug c/101766] Microblaze gcc misses symver but __has_attribute(symver) returns true
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766 Vincent Fazio changed: What|Removed |Added CC||vfazio at gmail dot com --- Comment #5 from Vincent Fazio --- There's a mail discussion about this topic https://gcc.gnu.org/pipermail/gcc/2023-March/240834.html The "easy" route is to just add the proper macro to config/microblaze/microblaze.h The more correct, but more arduous, route is "porting" microblaze to correctly use the elfos.h header and provide the proper overrides in a separate header. I've tested the former with zero issues and tested a version of the latter and was able to compile both a kernel and ramfs and successfully boot but doubt all cases are accounted for. attaching patches for posterity
[Bug c/101766] Microblaze gcc misses symver but __has_attribute(symver) returns true
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766 Andrew Pinski changed: What|Removed |Added CC||hjl.tools at gmail dot com --- Comment #4 from Andrew Pinski --- *** Bug 102110 has been marked as a duplicate of this bug. ***
[Bug c/101766] Microblaze gcc misses symver but __has_attribute(symver) returns true
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766 --- Comment #3 from Giulio Benetti --- I've done this: https://github.com/libfuse/libfuse/pull/620/commits/3aba09a5c56e017746c5c1652dbc845f4db7374a and works fine. It doesn't seem to have pitfalls.
[Bug c/101766] Microblaze gcc misses symver but __has_attribute(symver) returns true
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766 --- Comment #2 from Giulio Benetti --- Ah ok, so the workaround is to check with a little build test, right?
[Bug c/101766] Microblaze gcc misses symver but __has_attribute(symver) returns true
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766 --- Comment #1 from Andrew Pinski --- __has_attribute is broken for many attributes. If GCC supports them in a generic way but does not really support them, __has_attribute still returns true.