mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-04-16 15:28:55 +00:00
Add CC_GCC_ENABLE_DEFAULT_PIE
Enable Position Independent Executable as default Pass --enable-default-pie to crossgcc's configure Signed-off-by: Like Ma <likemartinma@gmail.com>
This commit is contained in:
parent
38377d3c8d
commit
a9f77be56f
@ -197,6 +197,17 @@ config CC_GCC_LTO_ZSTD
|
||||
#-----------------------------------------------------------------------------
|
||||
comment "Settings for libraries running on target"
|
||||
|
||||
config CC_GCC_ENABLE_DEFAULT_PIE
|
||||
bool
|
||||
prompt "Enable Position Independent Executable as default"
|
||||
default y
|
||||
depends on GCC_6_or_later && ! WINDOWS && ! ARCH_MIPS
|
||||
help
|
||||
Pass --enable-default-pie to crossgcc's configure.
|
||||
|
||||
This will let crossgcc compile executable as Position Independent
|
||||
Executable by default.
|
||||
|
||||
config CC_GCC_ENABLE_TARGET_OPTSPACE
|
||||
bool
|
||||
prompt "Optimize gcc libs for size"
|
||||
|
@ -436,6 +436,10 @@ do_gcc_core_backend() {
|
||||
extra_config+=("--with-host-libstdcxx=${host_libstdcxx_flags[*]}")
|
||||
fi
|
||||
|
||||
if [ "${CT_CC_GCC_ENABLE_DEFAULT_PIE}" = "y" ]; then
|
||||
extra_config+=("--enable-default-pie")
|
||||
fi
|
||||
|
||||
if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ] || \
|
||||
[ "${enable_optspace}" = "yes" ]; then
|
||||
extra_config+=("--enable-target-optspace")
|
||||
|
Loading…
x
Reference in New Issue
Block a user