This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/68794] an option for -fsanitize=<foo> is accepted even if the corresponding library is not available
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 05 Aug 2016 13:01:30 +0000
- Subject: [Bug driver/68794] an option for -fsanitize=<foo> is accepted even if the corresponding library is not available
- Auto-submitted: auto-generated
- References: <bug-68794-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68794
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Matthias Klose from comment #0)
> [forwarded from https://bugs.debian.org/805422]
>
> an option for -fsanitize=<foo> is accepted even if the corresponding library
> is not available, e.g. undefined/ubsan on aarch64-linux-gnu. The compiler
> should warn when building, not only failing when linking.
"-c" implies compile-only. Thus, missing libraries are only detected during
linking. This not different from any other library. I'm not sure it can be done
differently, the path to libubsan may only be known to the linking step.
One can create a configure test to check whether libubsan is available before
compiling any file.