libsanitizer merge from upstream r196090

H.J. Lu hjl.tools@gmail.com
Wed Dec 4 21:48:00 GMT 2013


On Wed, Dec 4, 2013 at 9:28 AM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Wed, 4 Dec 2013, H.J. Lu wrote:
>
>> The kernel and glibc check should be done at the toplevel.
>> So what are the minimum kernel and glibc we want to
>> support?
>
> Checking those at toplevel is tricky in general because you're checking
> something for the target rather than the host.  You'd need to move the
> logic from gcc/configure.ac to compute target_header_dir and
> glibc_version_*, and GCC_GLIBC_VERSION_GTE_IFELSE from gcc/acinclude.m4,
> to something in toplevel config/ (and that logic depends on lots of other
> things in gcc/configure.ac).

I added config/gcc-setup.m4 and checked it into
hjl/libsanitizer branch in git mirror.  I moved logic
from gcc/configure.ac to config/gcc-setup.m4.  Toplevel
configure can get the same info on glibc and kernel.
We can set the minimum glibc and kernel.  If they
are too old, we can disable libsanitizer in toplevel
configure.

> For binutils it's both easier to check (although the logic for binutils is
> also in gcc/acinclude.m4 at present) and more reasonable to require
> comparatively recent versions (for targets using binutils, which should
> cover everything supporting libsanitizer except Darwin) - I think there
> should be a minimum binutils version requirement generally when binutils
> is used with GCC, so we can reduce the need for conditionals on binutils
> features (unless of course the conditional code is still needed to support
> non-GNU assemblers and linkers for some target).
>

We can move the binutils logic into config/gcc-setup.m4
and disable libsanitizer if binutils is too old.

-- 
H.J.



More information about the Gcc-patches mailing list