This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/84148] CET shouldn't be enabled in 32-bit run-time libraries by default
- From: "igor.v.tsimbalist at intel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 Feb 2018 12:22:18 +0000
- Subject: [Bug target/84148] CET shouldn't be enabled in 32-bit run-time libraries by default
- Auto-submitted: auto-generated
- References: <bug-84148-4@http.gcc.gnu.org/bugzilla/>
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.