mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-18 18:56:31 +00:00
Merge pull request #1109 from stilor/cflags-non-multilib
Fixes for 1107
This commit is contained in:
commit
4c2c2315df
@ -42,6 +42,10 @@ config GLIBC_DEP_GCC
|
||||
config THREADS
|
||||
default "nptl"
|
||||
|
||||
config GLIBC_BUILD_SSP
|
||||
def_bool y
|
||||
depends on GLIBC_2_25_or_later
|
||||
|
||||
# Known add-ons and when they exist(ed)
|
||||
# crypt external in 2.1, no longer an add-on since 2.2
|
||||
# libidn external in 2.3.4 .. 2.10, still an add-on
|
||||
@ -320,7 +324,7 @@ config GLIBC_MIN_KERNEL
|
||||
default LINUX_VERSION if GLIBC_KERNEL_VERSION_AS_HEADERS
|
||||
default GLIBC_MIN_KERNEL_VERSION if GLIBC_KERNEL_VERSION_CHOSEN
|
||||
|
||||
|
||||
if GLIBC_BUILD_SSP
|
||||
choice
|
||||
bool "Stack-smashing protection (SSP) in glibc"
|
||||
default GLIBC_SSP_DEFAULT
|
||||
@ -371,4 +375,6 @@ config GLIBC_ENABLE_WERROR
|
||||
of the compiler than there were available at the time of a glibc
|
||||
release (because newer compilers typically have better diagnostics).
|
||||
|
||||
endif
|
||||
|
||||
endif # KERNEL_LINUX
|
||||
|
@ -1,6 +1,6 @@
|
||||
origin='GNU'
|
||||
repository='git git://sourceware.org/git/glibc.git'
|
||||
mirrors='$(CT_Mirrors GNU glibc)'
|
||||
milestones='2.14 2.17 2.20 2.23 2.24 2.26 2.27'
|
||||
milestones='2.14 2.17 2.20 2.23 2.24 2.25 2.26 2.27'
|
||||
archive_formats='.tar.xz .tar.bz2 .tar.gz'
|
||||
signature_format='packed/.sig'
|
||||
|
15
samples/powerpc-8540-linux-gnu/crosstool.config
Normal file
15
samples/powerpc-8540-linux-gnu/crosstool.config
Normal file
@ -0,0 +1,15 @@
|
||||
CT_ARCH_POWERPC=y
|
||||
CT_ARCH_CPU="8540"
|
||||
# CT_DEMULTILIB is not set
|
||||
CT_ARCH_FLOAT_SW=y
|
||||
CT_TARGET_VENDOR="8540"
|
||||
CT_KERNEL_LINUX=y
|
||||
CT_LINUX_V_3_4=y
|
||||
CT_GLIBC_V_2_23=y
|
||||
CT_CC_GCC_SYSTEM_ZLIB=y
|
||||
CT_CC_GCC_LIBMUDFLAP=y
|
||||
CT_CC_GCC_LIBSSP=y
|
||||
CT_CC_GCC_LIBQUADMATH=y
|
||||
CT_CC_LANG_CXX=y
|
||||
CT_CC_LANG_FORTRAN=y
|
||||
CT_DEBUG_GDB=y
|
3
samples/powerpc-8540-linux-gnu/reported.by
Normal file
3
samples/powerpc-8540-linux-gnu/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Marcin Orlowski"
|
||||
reporter_url="http://marcinorlowski.com/"
|
||||
reporter_comment="PowerPC 8540 with soft-float math."
|
@ -158,29 +158,31 @@ cc_gcc_multilib_housekeeping() {
|
||||
|
||||
CT_IterateMultilibs evaluate_multilib_cflags evaluate_cflags
|
||||
|
||||
# Filtering out some of the options provided in CT-NG config. Then *prepend*
|
||||
# them to CT_TARGET_CFLAGS, like scripts/crosstool-NG.sh does. Zero out
|
||||
# the stashed MULTILIB flags so that we don't process them again in the passes
|
||||
# that follow.
|
||||
CT_DoLog DEBUG "Configured target CFLAGS: '${CT_ARCH_TARGET_CFLAGS_MULTILIB}'"
|
||||
ml_unknown= # Pass through anything we don't know about
|
||||
for f in ${CT_ARCH_TARGET_CFLAGS_MULTILIB}; do
|
||||
eval ml=\$ml_`cc_gcc_classify_opt ${f}`
|
||||
if [ "${ml}" != "seen" ]; then
|
||||
new_cflags="${new_cflags} ${f}"
|
||||
fi
|
||||
done
|
||||
CT_DoLog DEBUG "Filtered target CFLAGS: '${new_cflags}'"
|
||||
CT_EnvModify CT_ALL_TARGET_CFLAGS "${new_cflags} ${CT_TARGET_CFLAGS}"
|
||||
CT_EnvModify CT_ARCH_TARGET_CFLAGS_MULTILIB ""
|
||||
if [ -n "${CT_MULTILIB}" ]; then
|
||||
# Filtering out some of the options provided in CT-NG config. Then *prepend*
|
||||
# them to CT_TARGET_CFLAGS, like scripts/crosstool-NG.sh does. Zero out
|
||||
# the stashed MULTILIB flags so that we don't process them again in the passes
|
||||
# that follow.
|
||||
CT_DoLog DEBUG "Configured target CFLAGS: '${CT_ARCH_TARGET_CFLAGS_MULTILIB}'"
|
||||
ml_unknown= # Pass through anything we don't know about
|
||||
for f in ${CT_ARCH_TARGET_CFLAGS_MULTILIB}; do
|
||||
eval ml=\$ml_`cc_gcc_classify_opt ${f}`
|
||||
if [ "${ml}" != "seen" ]; then
|
||||
new_cflags="${new_cflags} ${f}"
|
||||
fi
|
||||
done
|
||||
CT_DoLog DEBUG "Filtered target CFLAGS: '${new_cflags}'"
|
||||
CT_EnvModify CT_ALL_TARGET_CFLAGS "${new_cflags} ${CT_TARGET_CFLAGS}"
|
||||
CT_EnvModify CT_ARCH_TARGET_CFLAGS_MULTILIB ""
|
||||
|
||||
# Currently, the only LDFLAGS are endianness-related
|
||||
CT_DoLog DEBUG "Configured target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'"
|
||||
if [ "${ml_endian}" != "seen" ]; then
|
||||
CT_EnvModify CT_ALL_TARGET_LDFLAGS "${CT_ARCH_TARGET_LDFLAGS_MULTILIB} ${CT_TARGET_LDFLAGS}"
|
||||
CT_EnvModify CT_ARCH_TARGET_LDFLAGS_MULTILIB ""
|
||||
# Currently, the only LDFLAGS are endianness-related
|
||||
CT_DoLog DEBUG "Configured target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'"
|
||||
if [ "${ml_endian}" != "seen" ]; then
|
||||
CT_EnvModify CT_ALL_TARGET_LDFLAGS "${CT_ARCH_TARGET_LDFLAGS_MULTILIB} ${CT_TARGET_LDFLAGS}"
|
||||
CT_EnvModify CT_ARCH_TARGET_LDFLAGS_MULTILIB ""
|
||||
fi
|
||||
CT_DoLog DEBUG "Filtered target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'"
|
||||
fi
|
||||
CT_DoLog DEBUG "Filtered target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'"
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -185,6 +185,14 @@ glibc_backend_once()
|
||||
# Hide host C++ binary from configure
|
||||
echo "ac_cv_prog_ac_ct_CXX=${CT_TARGET}-g++" >>config.cache
|
||||
|
||||
# Until it became explicitly controllable with --enable-stack-protector=...,
|
||||
# configure detected GCC support for -fstack-protector{,-strong} and
|
||||
# tried to enable it in some parts of glibc - which then failed to build.
|
||||
if [ -z "${CT_GLIBC_BUILD_SSP}" ]; then
|
||||
echo "libc_cv_ssp=no" >>config.cache
|
||||
echo "libc_cv_ssp_strong=no" >>config.cache
|
||||
fi
|
||||
|
||||
if [ "${CT_GLIBC_FORCE_UNWIND}" = "y" ]; then
|
||||
echo "libc_cv_forced_unwind=yes" >>config.cache
|
||||
echo "libc_cv_c_cleanup=yes" >>config.cache
|
||||
|
@ -1189,11 +1189,14 @@ CT_DoBuildTargetTuple() {
|
||||
# Instead, save them into a different variable here. Then, after the first
|
||||
# core pass, we'll know which of them vary with multilibs (i.e. must be
|
||||
# filtered out).
|
||||
if [ "${CT_MULTILIB}" = "y" ]; then
|
||||
if [ -n "${CT_MULTILIB}" ]; then
|
||||
CT_ARCH_TARGET_CFLAGS_MULTILIB="${CT_ARCH_TARGET_CFLAGS}"
|
||||
CT_ARCH_TARGET_CFLAGS=
|
||||
CT_ARCH_TARGET_LDFLAGS_MULTILIB="${CT_ARCH_TARGET_LDFLAGS}"
|
||||
CT_ARCH_TARGET_LDFLAGS=
|
||||
else
|
||||
CT_ALL_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_TARGET_CFLAGS}"
|
||||
CT_ALL_TARGET_LDFLAGS="${CT_ARCH_TARGET_LDFLAGS} ${CT_TARGET_LDFLAGS}"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1990,7 +1993,7 @@ CT_PackageRun()
|
||||
src_release mirrors archive_filename archive_dirname archive_formats signature_format \
|
||||
src_devel devel_vcs devel_url devel_branch devel_revision devel_subdir devel_bootstrap \
|
||||
src_custom custom_location patch_order; do
|
||||
CT_DoLog DEBUG "Package iterator: set ${v}=\${CT_${use}_${v^^}}"
|
||||
eval "CT_DoLog DEBUG \"Package iterator: set ${v}='\${CT_${use}_${v^^}}'\""
|
||||
eval "local ${v}=\${CT_${use}_${v^^}}"
|
||||
done
|
||||
|
||||
@ -2015,7 +2018,7 @@ CT_PackageRun()
|
||||
for v in devel_branch devel_revision basename src_dir pkg_dir; do
|
||||
eval "[ \"\${${v}}\" != \"\${CT_${use}_${v^^}}\" ] || continue"
|
||||
eval "CT_${use}_${v^^}=\${${v}}"
|
||||
eval "CT_DoLog DEBUG \"Override CT_${use}_${v^^}=\${CT_${use}_${v^^}}\""
|
||||
eval "CT_DoLog DEBUG \"Package iterator: override CT_${use}_${v^^}=\${CT_${use}_${v^^}}\""
|
||||
done
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user