--- Comment #7 from igor.v.tsimbalist at intel dot com ---
(In reply to H.J. Lu from comment #6)
> (In reply to igor.v.tsimbalist from comment #4)
> > Created attachment 43400 [details]
> > patch
> 2 questions:
> 1. Should 32-bit multilib target libraries compiled on 64-bit host
> enable CET?
> 2. Should 64-bit multilib target libraries compiled with 32-bit compiler
> enable CET?

Is there a configuration variable holding an indication of bit-ness for which
the compilation of a library is done? I see there is some code in
in libgcc evaluating the host_address (32 or 64 bits)

# Check 32bit or 64bit.  In the case of MIPS, this really determines the
# word size rather than the address size.
cat > conftest.c <<EOF
#if defined(__x86_64__) || (!defined(__i386__) && defined(__LP64__)) \
    || defined(__mips64)
eval `${CC-cc} -E conftest.c | grep host_address=`
rm -f conftest.c

If I use the 'host_address' in cet.m4 I got the expected results for libgcc: by
default 64-bit library is CET enabled, 32-bit library is not.

Reply via email to