kumquat-buildroot/package/localedef/0001-HACK-only-build-and-install-localedef.patch
Romain Naour 34f8d874ee package/{glibc, localedef}: bump to version 2.38-13-g92201f16cbcfd9eafe314ef6654be2ea7ba25675
Enable mathvec explicitly on aarch64(be) since it's now enabled by
default [1]. aarch64 mathvec requires at gcc-10 but Buildroot already
provide gcc-11 as minimum version.

Don't use --enable-fortify-source for now in order to keep original
behavior while doing the glibc version bump (and because some
architecture doesn't support well fortify-source, i.e Microblaze).
Postpone this change to a follow up commit.

Keep the "deprecated" libcrypt enabled just in case if some
application are not yet ready to use an alternative such as libxcrypt.

Security related changes:

  CVE-2023-25139: When the printf family of functions is called with a
  format specifier that uses an <apostrophe> (enable grouping) and a
  minimum width specifier, the resulting output could be larger than
  reasonably expected by a caller that computed a tight bound on the
  buffer size.  The resulting larger than expected output could result
  in a buffer overflow in the printf family of functions.

See:
https://lists.gnu.org/archive/html/info-gnu/2023-07/msg00010.html

Runtime tested with Qemu on Gitlab-ci:
https://gitlab.com/kubu93/buildroot/-/pipelines/998435203
https://gitlab.com/buildroot.org/toolchains-builder/-/pipelines/998926028

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=cd94326a1326c4e3f1ee7a8d0a161cc0bdcaf07e

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-09-29 21:28:05 +02:00

68 lines
2.4 KiB
Diff

From bd5a87ea4a0cc0ba393a16bbeb166903e4085e8b Mon Sep 17 00:00:00 2001
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Mon, 21 May 2018 16:45:02 +0200
Subject: [PATCH] HACK: only build and install localedef
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Upstream: https://git.pengutronix.de/cgit/ptxdist/plain/patches/localedef-glibc-2.27/0001-HACK-only-build-and-install-localedef.patch?id=47116f66f411d4dadfce42c2fdd6d41b351ccfd4
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
[Romain: rebase on 2.38]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
Rules | 14 ++++++++++----
locale/Makefile | 6 +++---
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/Rules b/Rules
index 279ae490ac..1321956be6 100644
--- a/Rules
+++ b/Rules
@@ -221,10 +221,16 @@ binaries-shared-notests = $(filter-out $(binaries-pie) $(binaries-static), \
$(binaries-all-notests))
ifneq "$(strip $(binaries-shared-notests))" ""
-$(addprefix $(objpfx),$(binaries-shared-notests)): %: %.o \
- $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
- $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
- $(+link)
+$(addprefix $(objpfx),$(binaries-shared-notests)): %: %.o
+ $(CC) -o $@ \
+ $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
+ $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
+ $(filter-out $(addprefix $(csu-objpfx),start.o \
+ $(start-installed-name))\
+ $(+preinit) \
+ $(link-extra-libs) \
+ $(common-objpfx)libc% $(+postinit),$^) \
+ $(link-extra-libs)
endif
ifneq "$(strip $(binaries-shared-tests))" ""
diff --git a/locale/Makefile b/locale/Makefile
index d7036b0855..68afdddc7f 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -33,15 +33,15 @@ categories = ctype messages monetary numeric time paper name \
address telephone measurement identification collate
aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
xlocale localename global-locale coll-lookup
-others = localedef locale
+others = localedef
#others-static = localedef locale
-install-bin = localedef locale
+install-bin = localedef
extra-objs = $(localedef-modules:=.o) $(localedef-aux:=.o) \
$(locale-modules:=.o) $(lib-modules:=.o)
generated += C-translit.h
before-compile += $(objpfx)C-translit.h
-extra-libs = libBrokenLocale
+#extra-libs = libBrokenLocale
extra-libs-others = $(extra-libs)
libBrokenLocale-routines = broken_cur_max
--
2.41.0