This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/84148] CET shouldn't be enabled in 32-bit run-time libraries by default


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84148

--- 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 configure.ac
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)
host_address=64
#else
host_address=32
#endif
EOF
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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]