summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2019-03-04 08:22:02 (GMT)
committerAlexey Neyman <stilor@att.net>2019-03-04 08:22:02 (GMT)
commitb3cce054ef381502af4f58105604081bf431ac9e (patch)
tree991fc932da90da7fbbd055a46dc53395889f2dd3 /scripts
parentda11216f8d2630a3a3409ae17549bc0f472d64b6 (diff)
Meet our new companion tool, bison
Which is here courtesy of CentOS6, which only has bison 2.4 - while new glibc requires 2.7. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/companion_tools/510-bison.sh66
-rw-r--r--scripts/crosstool-NG.sh3
2 files changed, 68 insertions, 1 deletions
diff --git a/scripts/build/companion_tools/510-bison.sh b/scripts/build/companion_tools/510-bison.sh
new file mode 100644
index 0000000..9379ea8
--- /dev/null
+++ b/scripts/build/companion_tools/510-bison.sh
@@ -0,0 +1,66 @@
+# Build script for bison
+
+do_companion_tools_bison_get()
+{
+ CT_Fetch BISON
+}
+
+do_companion_tools_bison_extract()
+{
+ CT_ExtractPatch BISON
+}
+
+do_companion_tools_bison_for_build()
+{
+ CT_DoStep INFO "Installing bison for build"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-bison-build"
+ do_bison_backend \
+ host=${CT_BUILD} \
+ prefix="${CT_BUILD_COMPTOOLS_DIR}" \
+ cflags="${CT_CFLAGS_FOR_BUILD}" \
+ ldflags="${CT_LDFLAGS_FOR_BUILD}"
+ CT_Popd
+ CT_EndStep
+}
+
+do_companion_tools_bison_for_host()
+{
+ CT_DoStep INFO "Installing bison for host"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-bison-host"
+ do_bison_backend \
+ host=${CT_HOST} \
+ prefix="${CT_PREFIX_DIR}" \
+ cflags="${CT_CFLAGS_FOR_HOST}" \
+ ldflags="${CT_LDFLAGS_FOR_HOST}"
+ CT_Popd
+ CT_EndStep
+}
+
+do_bison_backend()
+{
+ local host
+ local prefix
+ local cflags
+ local ldflags
+ local -a extra_config
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
+ CT_DoLog EXTRA "Configuring bison"
+ CT_DoExecLog CFG \
+ CFLAGS="${cflags}" \
+ LDFLAGS="${ldflags}" \
+ ${CONFIG_SHELL} \
+ "${CT_SRC_DIR}/bison/configure" \
+ --host="${host}" \
+ --prefix="${prefix}" \
+ "${extra_config[@]}"
+
+ CT_DoLog EXTRA "Building bison"
+ CT_DoExecLog ALL make
+
+ CT_DoLog EXTRA "Installing bison"
+ CT_DoExecLog ALL make install
+}
diff --git a/scripts/crosstool-NG.sh b/scripts/crosstool-NG.sh
index 2e60f20..db15b89 100644
--- a/scripts/crosstool-NG.sh
+++ b/scripts/crosstool-NG.sh
@@ -458,6 +458,7 @@ if [ -z "${CT_RESTART}" ]; then
fi
# Not all tools are available for all platforms, but some are required.
+ # TBD do we need these as shell wrappers? exec is slow on Cygwin, and this makes exec twice for each compiler/linker run
if [ -n "${where}" ]; then
CT_DoLog DEBUG " '${!v}-${tool}' -> '${where}'"
printf "#${BANG}${CT_CONFIG_SHELL}\nexec '${where}' \"\${@}\"\n" >"${CT_BUILDTOOLS_PREFIX_DIR}/bin/${!v}-${tool}"
@@ -468,7 +469,7 @@ if [ -z "${CT_RESTART}" ]; then
ar|as|gcc|ld|nm|objcopy|objdump|ranlib)
CT_Abort "Missing: '${t}${tool}${!s}' or '${t}${tool}' or '${tool}' : either needed!"
;;
- # Some are conditionnally required
+ # Some are conditionally required
# Add them in alphabetical (C locale) ordering
g++)
# g++ (needed for companion lib), only needed for HOST