summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2018-12-07 08:05:19 (GMT)
committerGitHub <noreply@github.com>2018-12-07 08:05:19 (GMT)
commit4c2c2315dfaefc7261f12fbbbf4ce5639dad94a2 (patch)
tree7990dc378b74ecd2030cf8666da411c5971f20e5
parentf8874f447e40852d33d65c1f443a90b0760901df (diff)
parent0ffcfd657c4a3e6e5cd91071bd9825d50e2c413f (diff)
Merge pull request #1109 from stilor/cflags-non-multilib
Fixes for 1107
-rw-r--r--config/libc/glibc.in8
-rw-r--r--packages/glibc/package.desc2
-rw-r--r--samples/powerpc-8540-linux-gnu/crosstool.config15
-rw-r--r--samples/powerpc-8540-linux-gnu/reported.by3
-rw-r--r--scripts/build/cc/gcc.sh44
-rw-r--r--scripts/build/libc/glibc.sh8
-rw-r--r--scripts/functions9
7 files changed, 63 insertions, 26 deletions
diff --git a/config/libc/glibc.in b/config/libc/glibc.in
index 527063f..6598c31 100644
--- a/config/libc/glibc.in
+++ b/config/libc/glibc.in
@@ -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
diff --git a/packages/glibc/package.desc b/packages/glibc/package.desc
index ea03e69..0d256c9 100644
--- a/packages/glibc/package.desc
+++ b/packages/glibc/package.desc
@@ -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'
diff --git a/samples/powerpc-8540-linux-gnu/crosstool.config b/samples/powerpc-8540-linux-gnu/crosstool.config
new file mode 100644
index 0000000..690e9c2
--- /dev/null
+++ b/samples/powerpc-8540-linux-gnu/crosstool.config
@@ -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
diff --git a/samples/powerpc-8540-linux-gnu/reported.by b/samples/powerpc-8540-linux-gnu/reported.by
new file mode 100644
index 0000000..f1314bd
--- /dev/null
+++ b/samples/powerpc-8540-linux-gnu/reported.by
@@ -0,0 +1,3 @@
+reporter_name="Marcin Orlowski"
+reporter_url="http://marcinorlowski.com/"
+reporter_comment="PowerPC 8540 with soft-float math."
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 7aceee3..5132444 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -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}"
+ 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 ""
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 ""
+ CT_DoLog DEBUG "Filtered target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'"
fi
- CT_DoLog DEBUG "Filtered target LDFLAGS: '${CT_ARCH_TARGET_LDFLAGS_MULTILIB}'"
}
#------------------------------------------------------------------------------
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh
index 4d44fea..312c88f 100644
--- a/scripts/build/libc/glibc.sh
+++ b/scripts/build/libc/glibc.sh
@@ -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
diff --git a/scripts/functions b/scripts/functions
index e93618c..affb10a 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -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
}