mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
x86: Assume --enable-cet if GCC defaults to CET [BZ #25225]
This links in CET support if GCC defaults to CET. Otherwise, __CET__
is defined, yet CET functionality is not compiled and linked into the
dynamic loader, resulting in a linker failure due to undefined
references to _dl_cet_check and _dl_open_check.
(cherry picked from commit 9fb8139079
)
This commit is contained in:
parent
44a61d4589
commit
0b4c3e1e0b
1
NEWS
1
NEWS
@ -37,6 +37,7 @@ The following bugs are resolved with this release:
|
|||||||
unconditionally
|
unconditionally
|
||||||
[25203] libio: Disable vtable validation for pre-2.1 interposed handles
|
[25203] libio: Disable vtable validation for pre-2.1 interposed handles
|
||||||
[25204] Ignore LD_PREFER_MAP_32BIT_EXEC for SUID programs
|
[25204] Ignore LD_PREFER_MAP_32BIT_EXEC for SUID programs
|
||||||
|
[25225] ld.so fails to link on x86 if GCC defaults to -fcf-protection
|
||||||
|
|
||||||
Security related changes:
|
Security related changes:
|
||||||
|
|
||||||
|
23
configure
vendored
23
configure
vendored
@ -3777,11 +3777,32 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifndef __CET__
|
||||||
|
#error no CET compiler support
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
libc_cv_compiler_default_cet=yes
|
||||||
|
else
|
||||||
|
libc_cv_compiler_default_cet=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
# Check whether --enable-cet was given.
|
# Check whether --enable-cet was given.
|
||||||
if test "${enable_cet+set}" = set; then :
|
if test "${enable_cet+set}" = set; then :
|
||||||
enableval=$enable_cet; enable_cet=$enableval
|
enableval=$enable_cet; enable_cet=$enableval
|
||||||
else
|
else
|
||||||
enable_cet=no
|
enable_cet=$libc_cv_compiler_default_cet
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -472,11 +472,18 @@ AC_ARG_ENABLE([mathvec],
|
|||||||
[build_mathvec=$enableval],
|
[build_mathvec=$enableval],
|
||||||
[build_mathvec=notset])
|
[build_mathvec=notset])
|
||||||
|
|
||||||
|
AC_TRY_COMPILE([], [
|
||||||
|
#ifndef __CET__
|
||||||
|
# error no CET compiler support
|
||||||
|
#endif],
|
||||||
|
[libc_cv_compiler_default_cet=yes],
|
||||||
|
[libc_cv_compiler_default_cet=no])
|
||||||
|
|
||||||
AC_ARG_ENABLE([cet],
|
AC_ARG_ENABLE([cet],
|
||||||
AC_HELP_STRING([--enable-cet],
|
AC_HELP_STRING([--enable-cet],
|
||||||
[enable Intel Control-flow Enforcement Technology (CET), x86 only]),
|
[enable Intel Control-flow Enforcement Technology (CET), x86 only]),
|
||||||
[enable_cet=$enableval],
|
[enable_cet=$enableval],
|
||||||
[enable_cet=no])
|
[enable_cet=$libc_cv_compiler_default_cet])
|
||||||
|
|
||||||
# We keep the original values in `$config_*' and never modify them, so we
|
# We keep the original values in `$config_*' and never modify them, so we
|
||||||
# can write them unchanged into config.make. Everything else uses
|
# can write them unchanged into config.make. Everything else uses
|
||||||
|
Loading…
Reference in New Issue
Block a user