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