diff options
-rw-r--r-- | meta/recipes-devtools/m4/m4-1.4.20.inc (renamed from meta/recipes-devtools/m4/m4-1.4.19.inc) | 16 | ||||
-rw-r--r-- | meta/recipes-devtools/m4/m4-native_1.4.20.bb (renamed from meta/recipes-devtools/m4/m4-native_1.4.19.bb) | 0 | ||||
-rw-r--r-- | meta/recipes-devtools/m4/m4/0001-Define-alignof_slot-using-_Alignof-when-using-C11-or.patch | 49 | ||||
-rw-r--r-- | meta/recipes-devtools/m4/m4/0001-sigsegv-Fix-build-on-ppc-musl.patch | 37 | ||||
-rw-r--r-- | meta/recipes-devtools/m4/m4/ac_config_links.patch | 37 | ||||
-rw-r--r-- | meta/recipes-devtools/m4/m4/run-ptest | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/m4/m4/serial-tests-config.patch | 11 | ||||
-rw-r--r-- | meta/recipes-devtools/m4/m4_1.4.20.bb (renamed from meta/recipes-devtools/m4/m4_1.4.19.bb) | 0 |
8 files changed, 9 insertions, 143 deletions
diff --git a/meta/recipes-devtools/m4/m4-1.4.19.inc b/meta/recipes-devtools/m4/m4-1.4.20.inc index c73418d8e6..2ea3a9bace 100644 --- a/meta/recipes-devtools/m4/m4-1.4.19.inc +++ b/meta/recipes-devtools/m4/m4-1.4.20.inc | |||
@@ -7,15 +7,12 @@ GNU M4 also has built-in functions for including files, running shell commands, | |||
7 | inherit autotools texinfo ptest gettext | 7 | inherit autotools texinfo ptest gettext |
8 | 8 | ||
9 | SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \ | 9 | SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \ |
10 | file://ac_config_links.patch \ | ||
11 | file://0001-sigsegv-Fix-build-on-ppc-musl.patch \ | ||
12 | file://0001-Define-alignof_slot-using-_Alignof-when-using-C11-or.patch \ | ||
13 | " | 10 | " |
14 | SRC_URI:append:class-target = " file://run-ptest \ | 11 | SRC_URI:append:class-target = " file://run-ptest \ |
15 | file://serial-tests-config.patch \ | 12 | file://serial-tests-config.patch \ |
16 | " | 13 | " |
17 | 14 | ||
18 | SRC_URI[sha256sum] = "3be4a26d825ffdfda52a56fc43246456989a3630093cced3fbddf4771ee58a70" | 15 | SRC_URI[sha256sum] = "6ac4fc31ce440debe63987c2ebbf9d7b6634e67a7c3279257dc7361de8bdb3ef" |
19 | 16 | ||
20 | LICENSE = "GPL-3.0-only" | 17 | LICENSE = "GPL-3.0-only" |
21 | 18 | ||
@@ -26,8 +23,6 @@ EXTRA_OECONF += "--without-libsigsegv-prefix" | |||
26 | 23 | ||
27 | EXTRA_OEMAKE += "'infodir=${infodir}'" | 24 | EXTRA_OEMAKE += "'infodir=${infodir}'" |
28 | 25 | ||
29 | CFLAGS += "-std=gnu17" | ||
30 | |||
31 | do_compile_ptest() { | 26 | do_compile_ptest() { |
32 | cd ${B}/tests | 27 | cd ${B}/tests |
33 | sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_LIBRARIES) $(check_PROGRAMS)' Makefile | 28 | sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_LIBRARIES) $(check_PROGRAMS)' Makefile |
@@ -37,15 +32,15 @@ do_compile_ptest() { | |||
37 | do_install_ptest() { | 32 | do_install_ptest() { |
38 | cp -r ${B}/tests ${D}${PTEST_PATH} | 33 | cp -r ${B}/tests ${D}${PTEST_PATH} |
39 | cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/ | 34 | cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/ |
35 | cp -r ${S}/build-aux ${D}${PTEST_PATH}/tests/ | ||
40 | sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile | 36 | sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile |
41 | find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {} | 37 | find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {} |
42 | cp ${S}/build-aux/update-copyright ${D}${PTEST_PATH}/tests/ | 38 | chmod 0755 ${D}${PTEST_PATH}/tests/test-spawn-pipe-main \ |
43 | sed -i 's;update-copyright;./update-copyright;g' ${D}${PTEST_PATH}/tests/test-update-copyright.sh | ||
44 | chmod 0755 ${D}${PTEST_PATH}/tests/test-mbrtowc-w32-1.sh ${D}${PTEST_PATH}/tests/test-spawn-pipe-main \ | ||
45 | ${D}${PTEST_PATH}/tests/test-spawn-pipe-child ${D}${PTEST_PATH}/tests/test-version-etc \ | 39 | ${D}${PTEST_PATH}/tests/test-spawn-pipe-child ${D}${PTEST_PATH}/tests/test-version-etc \ |
46 | ${D}${PTEST_PATH}/tests/test-xalloc-die | 40 | ${D}${PTEST_PATH}/tests/test-xalloc-die |
47 | 41 | ||
48 | ln -s ptest ${D}${libdir}/${BPN}/${BP} | 42 | ln -sf ptest ${D}${libdir}/${BPN}/${BP} |
43 | sed -i -e 's/@BP@/${BP}/g' ${D}${PTEST_PATH}/run-ptest | ||
49 | } | 44 | } |
50 | 45 | ||
51 | do_install_ptest:append:libc-glibc() { | 46 | do_install_ptest:append:libc-glibc() { |
@@ -59,4 +54,3 @@ RDEPENDS:${PN}-ptest:append:libc-glibc = "\ | |||
59 | locale-base-fr-fr.iso-8859-1 \ | 54 | locale-base-fr-fr.iso-8859-1 \ |
60 | glibc-gconv-iso8859-1 \ | 55 | glibc-gconv-iso8859-1 \ |
61 | " | 56 | " |
62 | |||
diff --git a/meta/recipes-devtools/m4/m4-native_1.4.19.bb b/meta/recipes-devtools/m4/m4-native_1.4.20.bb index 407ad89330..407ad89330 100644 --- a/meta/recipes-devtools/m4/m4-native_1.4.19.bb +++ b/meta/recipes-devtools/m4/m4-native_1.4.20.bb | |||
diff --git a/meta/recipes-devtools/m4/m4/0001-Define-alignof_slot-using-_Alignof-when-using-C11-or.patch b/meta/recipes-devtools/m4/m4/0001-Define-alignof_slot-using-_Alignof-when-using-C11-or.patch deleted file mode 100644 index 8757abd7a0..0000000000 --- a/meta/recipes-devtools/m4/m4/0001-Define-alignof_slot-using-_Alignof-when-using-C11-or.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From b0fd3a58354b1f5ead891907979dfd3dd36840d5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 14 Jan 2023 14:55:03 -0800 | ||
4 | Subject: [PATCH] Define alignof_slot using _Alignof when using C11 or newer | ||
5 | |||
6 | WG14 N2350 made very clear that it is an UB having type definitions | ||
7 | within "offsetof" [1]. This patch enhances the implementation of macro | ||
8 | alignof_slot to use builtin "_Alignof" to avoid undefined behavior on | ||
9 | when using std=c11 or newer | ||
10 | |||
11 | clang 16+ has started to flag this [2] | ||
12 | |||
13 | Fixes build when using -std >= gnu11 and using clang16+ [3] | ||
14 | |||
15 | [1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm | ||
16 | [2] https://reviews.llvm.org/D133574 | ||
17 | [3] https://public-inbox.org/bug-gnulib/20230114232744.215167-1-raj.khem@gmail.com/T/#u | ||
18 | |||
19 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=2d404c7dd974cc65f894526f4a1b76bc1dcd8d82] | ||
20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
21 | --- | ||
22 | lib/alignof.h | 2 ++ | ||
23 | 1 file changed, 2 insertions(+) | ||
24 | |||
25 | --- a/lib/alignof.h | ||
26 | +++ b/lib/alignof.h | ||
27 | @@ -18,19 +18,19 @@ | ||
28 | #define _ALIGNOF_H | ||
29 | |||
30 | #include <stddef.h> | ||
31 | +#include "stdalign.h" | ||
32 | |||
33 | /* alignof_slot (TYPE) | ||
34 | Determine the alignment of a structure slot (field) of a given type, | ||
35 | at compile time. Note that the result depends on the ABI. | ||
36 | - This is the same as alignof (TYPE) and _Alignof (TYPE), defined in | ||
37 | - <stdalign.h> if __alignof_is_defined is 1. | ||
38 | + This is the same as alignof (TYPE). | ||
39 | Note: The result cannot be used as a value for an 'enum' constant, | ||
40 | due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */ | ||
41 | #if defined __cplusplus | ||
42 | template <class type> struct alignof_helper { char __slot1; type __slot2; }; | ||
43 | # define alignof_slot(type) offsetof (alignof_helper<type>, __slot2) | ||
44 | #else | ||
45 | -# define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) | ||
46 | +# define alignof_slot(type) alignof (type) | ||
47 | #endif | ||
48 | |||
49 | /* alignof_type (TYPE) | ||
diff --git a/meta/recipes-devtools/m4/m4/0001-sigsegv-Fix-build-on-ppc-musl.patch b/meta/recipes-devtools/m4/m4/0001-sigsegv-Fix-build-on-ppc-musl.patch deleted file mode 100644 index 04320de63a..0000000000 --- a/meta/recipes-devtools/m4/m4/0001-sigsegv-Fix-build-on-ppc-musl.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 36d5e26f606e070553eb0fff1f738e61970be5d7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 9 Mar 2022 20:22:20 -0800 | ||
4 | Subject: [PATCH] sigsegv: Fix build on ppc/musl | ||
5 | |||
6 | mcontext is not a standard layout so glibc and musl differ sadly. | ||
7 | |||
8 | Fixes | ||
9 | ../../m4-1.4.19/lib/sigsegv.c: In function 'sigsegv_handler': ../../m4-1.4.19/lib/sigsegv.c:223:75: error: 'mcontext_t' has no member named 'uc_regs'; did you mean 'gregs'? 223 | # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1] | ^~~~~~~ | ||
10 | |||
11 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/m4-patches/2022-03/msg00000.html] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | lib/sigsegv.c | 6 +++--- | ||
15 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/lib/sigsegv.c b/lib/sigsegv.c | ||
18 | index 696a152..fa0c465 100644 | ||
19 | --- a/lib/sigsegv.c | ||
20 | +++ b/lib/sigsegv.c | ||
21 | @@ -217,10 +217,10 @@ int libsigsegv_version = LIBSIGSEGV_VERSION; | ||
22 | # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gp_regs[1] | ||
23 | # else /* 32-bit */ | ||
24 | /* both should be equivalent */ | ||
25 | -# if 0 | ||
26 | -# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1] | ||
27 | +# if ! defined __GLIBC__ | ||
28 | +# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_regs->gregs[1] | ||
29 | # else | ||
30 | -# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1] | ||
31 | +# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1] | ||
32 | # endif | ||
33 | # endif | ||
34 | |||
35 | -- | ||
36 | 2.35.1 | ||
37 | |||
diff --git a/meta/recipes-devtools/m4/m4/ac_config_links.patch b/meta/recipes-devtools/m4/m4/ac_config_links.patch deleted file mode 100644 index 39fcd91896..0000000000 --- a/meta/recipes-devtools/m4/m4/ac_config_links.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | This patch fixes a build problem for m4-native experienced on Ubuntu 9.10, | ||
4 | where autoconf/automake (AC_CONFIG_LINKS) ends up making GNUmakefile a | ||
5 | symlink to itself. | ||
6 | |||
7 | The patch comments out ac_config_links directly in configure, | ||
8 | as autoreconf is not actually run for m4-native. | ||
9 | |||
10 | I believe it should be safe, as GNUmakefile is actually unpacked from | ||
11 | source, and what we want is to is to not touch it. | ||
12 | |||
13 | Tested on x86_64_linux (Ubuntu 8.04 and 9.10). | ||
14 | |||
15 | 2009-11-10 Esben Haabendal <eha@doredevelopment.dk> | ||
16 | --- | ||
17 | configure | 4 ++-- | ||
18 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/configure b/configure | ||
21 | index 883336a..6343a34 100755 | ||
22 | --- a/configure | ||
23 | +++ b/configure | ||
24 | @@ -37061,8 +37061,8 @@ printf "%s\n" "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h | ||
25 | # only, it does not matter if we skip the link with older autoconf. | ||
26 | # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH | ||
27 | # builds, so use a shell variable to bypass this. | ||
28 | - GNUmakefile=GNUmakefile | ||
29 | - ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile" | ||
30 | +# GNUmakefile=GNUmakefile | ||
31 | +# ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile" | ||
32 | |||
33 | |||
34 | LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL" | ||
35 | -- | ||
36 | 2.25.1 | ||
37 | |||
diff --git a/meta/recipes-devtools/m4/m4/run-ptest b/meta/recipes-devtools/m4/m4/run-ptest index 5c0fe93357..a91c372e54 100644 --- a/meta/recipes-devtools/m4/m4/run-ptest +++ b/meta/recipes-devtools/m4/m4/run-ptest | |||
@@ -2,4 +2,4 @@ | |||
2 | # | 2 | # |
3 | #This script is used to run m4 test suites | 3 | #This script is used to run m4 test suites |
4 | cd tests | 4 | cd tests |
5 | make -k runtest-TESTS top_srcdir=.. srcdir=. | 5 | make -k runtest-TESTS abs_aux_dir=../../@BP@/tests/build-aux abs_top_srcdir=../../@BP@/tests abs_srcdir=../../@BP@/tests top_srcdir=.. srcdir=. |
diff --git a/meta/recipes-devtools/m4/m4/serial-tests-config.patch b/meta/recipes-devtools/m4/m4/serial-tests-config.patch index 34e6ad801e..c1573b13c0 100644 --- a/meta/recipes-devtools/m4/m4/serial-tests-config.patch +++ b/meta/recipes-devtools/m4/m4/serial-tests-config.patch | |||
@@ -12,19 +12,14 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> | |||
12 | configure.ac | 2 +- | 12 | configure.ac | 2 +- |
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | 13 | 1 file changed, 1 insertion(+), 1 deletion(-) |
14 | 14 | ||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | index 78b8788..931fa6f 100644 | ||
17 | --- a/configure.ac | 15 | --- a/configure.ac |
18 | +++ b/configure.ac | 16 | +++ b/configure.ac |
19 | @@ -22,7 +22,7 @@ AC_INIT([GNU M4], m4_esyscmd([build-aux/git-version-gen .tarball-version]), | 17 | @@ -22,7 +22,7 @@ AC_INIT([GNU M4], m4_esyscmd([build-aux/ |
20 | [bug-m4@gnu.org]) | 18 | [bug-m4@gnu.org]) |
21 | AC_CONFIG_AUX_DIR([build-aux]) | 19 | AC_CONFIG_AUX_DIR([build-aux]) |
22 | 20 | ||
23 | -AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests parallel-tests | 21 | -AM_INIT_AUTOMAKE([1.14 dist-bzip2 dist-xz color-tests parallel-tests |
24 | +AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests serial-tests | 22 | +AM_INIT_AUTOMAKE([1.14 dist-bzip2 dist-xz color-tests serial-tests |
25 | silent-rules subdir-objects gnu]) | 23 | silent-rules subdir-objects gnu]) |
26 | AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. | 24 | AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. |
27 | 25 | ||
28 | -- | ||
29 | 2.7.4 | ||
30 | |||
diff --git a/meta/recipes-devtools/m4/m4_1.4.19.bb b/meta/recipes-devtools/m4/m4_1.4.20.bb index b12c0adf3a..b12c0adf3a 100644 --- a/meta/recipes-devtools/m4/m4_1.4.19.bb +++ b/meta/recipes-devtools/m4/m4_1.4.20.bb | |||