[v2,13/13] configure: Build with _FORTIFY_SOURCE by default
Checks
| Context |
Check |
Description |
| redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
| linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Build passed
|
| redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
| linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Test passed
|
Commit Message
The default is now the highest level supported by the compiler, as with
--enable-fortify-source: 3 if __builtin_dynamic_object_size is
available, which is the case for every supported GCC version, and 2
otherwise. --disable-fortify-source builds without fortification.
Checked on x86_64-linux-gnu.
---
INSTALL | 4 +++-
NEWS | 5 +++++
configure | 4 ++--
configure.ac | 7 ++++---
manual/install.texi | 3 ++-
5 files changed, 16 insertions(+), 7 deletions(-)
@@ -273,7 +273,9 @@ passed to 'configure'. For example:
Library. If not provided, 'LEVEL' defaults to highest possible
value supported by the build compiler.
- Default is to disable fortification.
+ Fortification is enabled by default, at the highest level supported
+ by the build compiler. Use '--disable-fortify-source' to disable
+ it.
'--enable-sframe'
Experimental option supported by some architectures, where the GNU
@@ -61,6 +61,11 @@ Changes to build and runtime requirements:
--enable-stack-protector=strong. Use --disable-stack-protector to build
without stack protection.
+* The GNU C Library is now built with _FORTIFY_SOURCE by default, at the
+ highest level supported by the compiler, as if configured with
+ --enable-fortify-source. Use --disable-fortify-source to build without
+ fortification.
+
Security related changes:
The following CVEs were fixed in this release, details of which can be
@@ -1500,7 +1500,7 @@ Optional Features:
--enable-fortify-source[=1|2|3]
Use -D_FORTIFY_SOURCE=[1|2|3] to control code
hardening, defaults to highest possible value
- supported by the build compiler.
+ supported by the build compiler. [default=yes]
--enable-sframe Enable building with SFrame support [default=no]
Optional Packages:
@@ -4836,7 +4836,7 @@ if test ${enable_fortify_source+y}
then :
enableval=$enable_fortify_source; enable_fortify_source=$enableval
else case e in #(
- e) enable_fortify_source=no ;;
+ e) enable_fortify_source=yes ;;
esac
fi
@@ -402,12 +402,13 @@ AC_ARG_ENABLE([scv],
AS_IF([[test "$use_scv" != "no"]],[AC_DEFINE(USE_PPC_SCV)])
-dnl Build glibc with _FORTIFY_SOURCE
+dnl Build glibc with _FORTIFY_SOURCE, by default at the highest level
+dnl supported by the compiler.
AC_ARG_ENABLE(fortify-source,
AS_HELP_STRING([--enable-fortify-source@<:@=1|2|3@:>@],
- [Use -D_FORTIFY_SOURCE=[1|2|3] to control code hardening, defaults to highest possible value supported by the build compiler.]),
+ [Use -D_FORTIFY_SOURCE=[1|2|3] to control code hardening, defaults to highest possible value supported by the build compiler. @<:@default=yes@:>@]),
[enable_fortify_source=$enableval],
- [enable_fortify_source=no])
+ [enable_fortify_source=yes])
case "$enable_fortify_source" in
1|2|3|no|yes) ;;
*) AC_MSG_ERROR([Not a valid argument for --enable-fortify-source: "$enable_fortify_source"]);;
@@ -303,7 +303,8 @@ Use -D_FORTIFY_SOURCE=@option{LEVEL} to control hardening in the GNU C Library.
If not provided, @option{LEVEL} defaults to highest possible value supported by
the build compiler.
-Default is to disable fortification.
+Fortification is enabled by default, at the highest level supported by the
+build compiler. Use @option{--disable-fortify-source} to disable it.
@item --enable-sframe
Experimental option supported by some architectures, where @theglibc{}