This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/77267] MPX does not work in a presence of "-Wl,-as-needed" option (Ubuntu default)
- From: "aivchenk at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 Sep 2016 14:00:58 +0000
- Subject: [Bug target/77267] MPX does not work in a presence of "-Wl,-as-needed" option (Ubuntu default)
- Auto-submitted: auto-generated
- References: <bug-77267-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77267
--- Comment #8 from Alexander Ivchenko <aivchenk at gmail dot com> ---
Thanks, Matthias, that's a valid point about changing linker on a runtime. In
my defense, I see that right now MPX does not work with '-fuse-ld=bfd' anyways:
>gcc test.c -fcheck-pointer-bounds -mmpx -fuse-ld=gold
/usr/bin/ld.gold: bndplt: unknown -z option
/usr/bin/ld.gold: use the --help option for usage information
That's not a surprise, because the check for '--push-state' is done exactly
like the check for '-z bndplt'.
Would it be possible to probe the 'other' linker (the one that is not the
default one) during a configure time? If so we may end up with something like
HAVE_BFD_PUSHPOPSTATE_SUPPORT/HAVE_GOLD_PUSHPOPSTATE_SUPPORT