summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/comp_libs/newlib-nano.in11
-rw-r--r--packages/ltrace/0.7.3/0008-mips-printf-format.patch14
l---------packages/newlib-nano/4.1.01
-rw-r--r--scripts/build/companion_libs/350-newlib_nano.sh25
-rw-r--r--scripts/build/debug/300-gdb.sh5
5 files changed, 51 insertions, 5 deletions
diff --git a/config/comp_libs/newlib-nano.in b/config/comp_libs/newlib-nano.in
index 0138a7f..0d80c89 100644
--- a/config/comp_libs/newlib-nano.in
+++ b/config/comp_libs/newlib-nano.in
@@ -18,6 +18,17 @@ config NEWLIB_NANO_GCC_LIBSTDCXX
This option compiles an additional target libstdc++ for use with
newlib-nano.
+config NEWLIB_NANO_INSTALL_IN_TARGET
+ bool
+ prompt "Additionally install newlib-nano libs into TARGET dir"
+ help
+ This option will install a copy of newlib-nano lib*.a file in the target
+ dir but renamed with a nano.a suffix (eg: libc_nano.a) as some default
+ nano.spec files from newlib expect this setup.
+
+ Additionally the newlib-nano version of newlib.h will get copied to
+ include/newlib-nano/newlib.h.
+
# maybe older versions of newlib will support it too, but this
# needs to be checked
config NEWLIB_NANO_CXA_ATEXIT
diff --git a/packages/ltrace/0.7.3/0008-mips-printf-format.patch b/packages/ltrace/0.7.3/0008-mips-printf-format.patch
new file mode 100644
index 0000000..6875392
--- /dev/null
+++ b/packages/ltrace/0.7.3/0008-mips-printf-format.patch
@@ -0,0 +1,14 @@
+diff -Naur ltrace-0.7.3-orig/sysdeps/linux-gnu/mips/plt.c ltrace-0.7.3/sysdeps/linux-gnu/mips/plt.c
+--- ltrace-0.7.3-orig/sysdeps/linux-gnu/mips/plt.c 2013-09-17 11:04:28.000000000 +1200
++++ ltrace-0.7.3/sysdeps/linux-gnu/mips/plt.c 2021-04-14 22:05:45.950413823 +1200
+@@ -356,8 +356,8 @@
+
+ name = strdup(a_name);
+ if (name == NULL) {
+- fprintf(stderr, "%s: failed %s(%#llx): %s\n", __func__,
+- name, addr, strerror(errno));
++ fprintf(stderr, "%s: failed (%#llx): %s\n", __func__,
++ addr, strerror(errno));
+ goto fail;
+ }
+
diff --git a/packages/newlib-nano/4.1.0 b/packages/newlib-nano/4.1.0
new file mode 120000
index 0000000..6a098db
--- /dev/null
+++ b/packages/newlib-nano/4.1.0
@@ -0,0 +1 @@
+../newlib/4.1.0/ \ No newline at end of file
diff --git a/scripts/build/companion_libs/350-newlib_nano.sh b/scripts/build/companion_libs/350-newlib_nano.sh
index 4cbfd71..d109070 100644
--- a/scripts/build/companion_libs/350-newlib_nano.sh
+++ b/scripts/build/companion_libs/350-newlib_nano.sh
@@ -216,6 +216,31 @@ EOF
CT_EndStep
do_cc_libstdcxx_newlib_nano
+
+ if [ "${CT_NEWLIB_NANO_INSTALL_IN_TARGET}" = "y" ]; then
+ CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/${CT_TARGET}/include/newlib-nano"
+ CT_DoExecLog ALL cp -f "${CT_PREFIX_DIR}/newlib-nano/${CT_TARGET}/include/newlib.h" \
+ "${CT_PREFIX_DIR}/${CT_TARGET}/include/newlib-nano/newlib.h"
+ CT_IterateMultilibs newlib_nano_copy_multilibs copylibs
+ fi
+}
+
+newlib_nano_copy_multilibs()
+{
+ local nano_lib_dir="${CT_PREFIX_DIR}/newlib-nano"
+ local multi_flags multi_dir multi_os_dir multi_os_dir_gcc multi_root multi_index multi_count
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
+ for lib_a in "${nano_lib_dir}/${CT_TARGET}/lib/${multi_dir}/"*.a; do
+ if [ -f ${lib_a} ] && [ ! -L ${lib_a} ]; then
+ _f=$(basename "${lib_a}")
+ CT_DoExecLog ALL cp -f "${lib_a}" \
+ "${CT_PREFIX_DIR}/${CT_TARGET}/lib/${multi_dir}/${_f%.*}_nano.a"
+ fi
+ done
}
fi
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index b0ea29b..e6eec2a 100644
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -8,11 +8,6 @@ do_debug_gdb_get()
do_debug_gdb_extract()
{
CT_ExtractPatch GDB
-
- # Workaround for bad versions, where the configure
- # script for gdbserver is not executable...
- # Bah, GNU folks strike again... :-(
- chmod a+x "${CT_SRC_DIR}/gdb/gdb/gdbserver/configure"
}
do_debug_gdb_build()