diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-08-11 13:49:52 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-14 10:31:10 +0100 |
| commit | b78c5c2d98790030a0fddb10c79b29bd6fcfa7ad (patch) | |
| tree | 5f8f99e68ec63b4abc65f2a525e4649c77095d43 | |
| parent | 125ff9747b15ffddcc537bf4dfd9bf90ab189d67 (diff) | |
| download | poky-b78c5c2d98790030a0fddb10c79b29bd6fcfa7ad.tar.gz | |
gperf: upgrade 3.1 -> 3.3
Both patches were dropped, because they are included in this release.
License-Update: copyright date Update
Changelog:
3.3:
* Speedup: gperf is now between 2x and 2.5x faster.
3.2:
* The generated code avoids several types of warnings:
- "implicit fallthrough" warnings in 'switch' statements.
- "unused parameter" warnings regarding 'str' or 'len'.
- "missing initializer for field ..." warnings.
- "zero as null pointer constant" warnings.
* The input file may now use Windows line terminators (CR/LF) instead of
Unix line terminators (LF).
Note: This is an incompatible change. If you want to use a keyword that
ends in a CR byte, such as xyz<CR>, write it as "xyz\r".
(From OE-Core rev: f1c23e1fffb6392a510f897f2141298981e5e75e)
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch | 29 | ||||
| -rw-r--r-- | meta/recipes-extended/gperf/gperf/1862c6e57a308a05889c80c048dbc58bdc378dcb.patch | 181 | ||||
| -rw-r--r-- | meta/recipes-extended/gperf/gperf_3.3.bb (renamed from meta/recipes-extended/gperf/gperf_3.1.bb) | 9 |
3 files changed, 3 insertions, 216 deletions
diff --git a/meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch b/meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch deleted file mode 100644 index 96e70cdb36..0000000000 --- a/meta/recipes-extended/gperf/gperf/0001-Make-the-code-C-17-compliant.patch +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | From 6194f0027045433598a61965758b4531a3d06d1f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruno Haible <bruno@clisp.org> | ||
| 3 | Date: Sun, 30 Aug 2020 12:36:15 +0200 | ||
| 4 | Subject: [PATCH] Make the code C++17 compliant. | ||
| 5 | |||
| 6 | * lib/getline.cc (getstr): Don't use the 'register' keyword. | ||
| 7 | |||
| 8 | Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=gperf.git;a=commit;h=a63b830554920476881837eeacd4a6b507632b19] | ||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | lib/getline.cc | 2 +- | ||
| 12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/lib/getline.cc b/lib/getline.cc | ||
| 15 | index c57c633..0984a7c 100644 | ||
| 16 | --- a/lib/getline.cc | ||
| 17 | +++ b/lib/getline.cc | ||
| 18 | @@ -55,7 +55,7 @@ getstr (char **lineptr, size_t *n, FILE *stream, char terminator, size_t offset) | ||
| 19 | |||
| 20 | for (;;) | ||
| 21 | { | ||
| 22 | - register int c = getc (stream); | ||
| 23 | + int c = getc (stream); | ||
| 24 | |||
| 25 | /* We always want at least one char left in the buffer, since we | ||
| 26 | always (unless we get an error while reading the first char) | ||
| 27 | -- | ||
| 28 | 2.39.0 | ||
| 29 | |||
diff --git a/meta/recipes-extended/gperf/gperf/1862c6e57a308a05889c80c048dbc58bdc378dcb.patch b/meta/recipes-extended/gperf/gperf/1862c6e57a308a05889c80c048dbc58bdc378dcb.patch deleted file mode 100644 index 98959db0a8..0000000000 --- a/meta/recipes-extended/gperf/gperf/1862c6e57a308a05889c80c048dbc58bdc378dcb.patch +++ /dev/null | |||
| @@ -1,181 +0,0 @@ | |||
| 1 | From 1862c6e57a308a05889c80c048dbc58bdc378dcb Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruno Haible <bruno@clisp.org> | ||
| 3 | Date: Tue, 5 Jul 2022 07:51:46 +0200 | ||
| 4 | Subject: [PATCH] Add support for reproducible builds. | ||
| 5 | |||
| 6 | Suggested by Richard Purdie <richard.purdie@linuxfoundation.org> in | ||
| 7 | <https://lists.gnu.org/archive/html/bug-gperf/2022-07/msg00000.html>. | ||
| 8 | |||
| 9 | * autogen.sh: Import also lib/filename.h. | ||
| 10 | * Makefile.in (IMPORTED_FILES): Add lib/filename.h. | ||
| 11 | * src/options.cc: Include filename.h. | ||
| 12 | (Options::print_options): Print only the base name of the program name. | ||
| 13 | * tests/*.exp: Update. | ||
| 14 | |||
| 15 | Upstream-Status: Backport | ||
| 16 | |||
| 17 | Index: gperf-3.1/ChangeLog | ||
| 18 | =================================================================== | ||
| 19 | --- gperf-3.1.orig/ChangeLog | ||
| 20 | +++ gperf-3.1/ChangeLog | ||
| 21 | @@ -1,3 +1,14 @@ | ||
| 22 | +2022-07-05 Bruno Haible <bruno@clisp.org> | ||
| 23 | + | ||
| 24 | + Add support for reproducible builds. | ||
| 25 | + Suggested by Richard Purdie <richard.purdie@linuxfoundation.org> in | ||
| 26 | + <https://lists.gnu.org/archive/html/bug-gperf/2022-07/msg00000.html>. | ||
| 27 | + * autogen.sh: Import also lib/filename.h. | ||
| 28 | + * Makefile.in (IMPORTED_FILES): Add lib/filename.h. | ||
| 29 | + * src/options.cc: Include filename.h. | ||
| 30 | + (Options::print_options): Print only the base name of the program name. | ||
| 31 | + * tests/*.exp: Update. | ||
| 32 | + | ||
| 33 | 2017-01-02 Marcel Schaible <marcel.schaible@studium.fernuni-hagen.de> | ||
| 34 | |||
| 35 | * gperf-3.1 released. | ||
| 36 | Index: gperf-3.1/src/options.cc | ||
| 37 | =================================================================== | ||
| 38 | --- gperf-3.1.orig/src/options.cc | ||
| 39 | +++ gperf-3.1/src/options.cc | ||
| 40 | @@ -26,6 +26,7 @@ | ||
| 41 | #include <string.h> /* declares strcmp() */ | ||
| 42 | #include <ctype.h> /* declares isdigit() */ | ||
| 43 | #include <limits.h> /* defines CHAR_MAX */ | ||
| 44 | +#include "filename.h" | ||
| 45 | #include "getopt.h" | ||
| 46 | #include "version.h" | ||
| 47 | |||
| 48 | @@ -280,6 +281,16 @@ Options::print_options () const | ||
| 49 | { | ||
| 50 | const char *arg = _argument_vector[i]; | ||
| 51 | |||
| 52 | + if (i == 0) | ||
| 53 | + { | ||
| 54 | + /* _argument_vector[0] is the program name. Print only its base name. | ||
| 55 | + This is useful for reproducible builds. */ | ||
| 56 | + const char *p = arg + strlen (arg); | ||
| 57 | + while (p > arg && ! ISSLASH (p[-1])) | ||
| 58 | + p--; | ||
| 59 | + arg = p; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | /* Escape arg if it contains shell metacharacters. */ | ||
| 63 | if (*arg == '-') | ||
| 64 | { | ||
| 65 | Index: gperf-3.1/lib/filename.h | ||
| 66 | =================================================================== | ||
| 67 | --- /dev/null | ||
| 68 | +++ gperf-3.1/lib/filename.h | ||
| 69 | @@ -0,0 +1,112 @@ | ||
| 70 | +/* Basic filename support macros. | ||
| 71 | + Copyright (C) 2001-2022 Free Software Foundation, Inc. | ||
| 72 | + This file is part of the GNU C Library. | ||
| 73 | + | ||
| 74 | + The GNU C Library is free software; you can redistribute it and/or | ||
| 75 | + modify it under the terms of the GNU Lesser General Public | ||
| 76 | + License as published by the Free Software Foundation; either | ||
| 77 | + version 2.1 of the License, or (at your option) any later version. | ||
| 78 | + | ||
| 79 | + The GNU C Library is distributed in the hope that it will be useful, | ||
| 80 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 81 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 82 | + Lesser General Public License for more details. | ||
| 83 | + | ||
| 84 | + You should have received a copy of the GNU Lesser General Public | ||
| 85 | + License along with the GNU C Library; if not, see | ||
| 86 | + <https://www.gnu.org/licenses/>. */ | ||
| 87 | + | ||
| 88 | +/* From Paul Eggert and Jim Meyering. */ | ||
| 89 | + | ||
| 90 | +#ifndef _FILENAME_H | ||
| 91 | +#define _FILENAME_H | ||
| 92 | + | ||
| 93 | +#include <string.h> | ||
| 94 | + | ||
| 95 | +#ifdef __cplusplus | ||
| 96 | +extern "C" { | ||
| 97 | +#endif | ||
| 98 | + | ||
| 99 | + | ||
| 100 | +/* Filename support. | ||
| 101 | + ISSLASH(C) tests whether C is a directory separator | ||
| 102 | + character. | ||
| 103 | + HAS_DEVICE(Filename) tests whether Filename contains a device | ||
| 104 | + specification. | ||
| 105 | + FILE_SYSTEM_PREFIX_LEN(Filename) length of the device specification | ||
| 106 | + at the beginning of Filename, | ||
| 107 | + index of the part consisting of | ||
| 108 | + alternating components and slashes. | ||
| 109 | + FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE | ||
| 110 | + 1 when a non-empty device specification | ||
| 111 | + can be followed by an empty or relative | ||
| 112 | + part, | ||
| 113 | + 0 when a non-empty device specification | ||
| 114 | + must be followed by a slash, | ||
| 115 | + 0 when device specification don't exist. | ||
| 116 | + IS_ABSOLUTE_FILE_NAME(Filename) | ||
| 117 | + tests whether Filename is independent of | ||
| 118 | + any notion of "current directory". | ||
| 119 | + IS_RELATIVE_FILE_NAME(Filename) | ||
| 120 | + tests whether Filename may be concatenated | ||
| 121 | + to a directory filename. | ||
| 122 | + Note: On native Windows, OS/2, DOS, "c:" is neither an absolute nor a | ||
| 123 | + relative file name! | ||
| 124 | + IS_FILE_NAME_WITH_DIR(Filename) tests whether Filename contains a device | ||
| 125 | + or directory specification. | ||
| 126 | + */ | ||
| 127 | +#if defined _WIN32 || defined __CYGWIN__ \ | ||
| 128 | + || defined __EMX__ || defined __MSDOS__ || defined __DJGPP__ | ||
| 129 | + /* Native Windows, Cygwin, OS/2, DOS */ | ||
| 130 | +# define ISSLASH(C) ((C) == '/' || (C) == '\\') | ||
| 131 | + /* Internal macro: Tests whether a character is a drive letter. */ | ||
| 132 | +# define _IS_DRIVE_LETTER(C) \ | ||
| 133 | + (((C) >= 'A' && (C) <= 'Z') || ((C) >= 'a' && (C) <= 'z')) | ||
| 134 | + /* Help the compiler optimizing it. This assumes ASCII. */ | ||
| 135 | +# undef _IS_DRIVE_LETTER | ||
| 136 | +# define _IS_DRIVE_LETTER(C) \ | ||
| 137 | + (((unsigned int) (C) | ('a' - 'A')) - 'a' <= 'z' - 'a') | ||
| 138 | +# define HAS_DEVICE(Filename) \ | ||
| 139 | + (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':') | ||
| 140 | +# define FILE_SYSTEM_PREFIX_LEN(Filename) (HAS_DEVICE (Filename) ? 2 : 0) | ||
| 141 | +# ifdef __CYGWIN__ | ||
| 142 | +# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 | ||
| 143 | +# else | ||
| 144 | + /* On native Windows, OS/2, DOS, the system has the notion of a | ||
| 145 | + "current directory" on each drive. */ | ||
| 146 | +# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1 | ||
| 147 | +# endif | ||
| 148 | +# if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE | ||
| 149 | +# define IS_ABSOLUTE_FILE_NAME(Filename) \ | ||
| 150 | + ISSLASH ((Filename)[FILE_SYSTEM_PREFIX_LEN (Filename)]) | ||
| 151 | +# else | ||
| 152 | +# define IS_ABSOLUTE_FILE_NAME(Filename) \ | ||
| 153 | + (ISSLASH ((Filename)[0]) || HAS_DEVICE (Filename)) | ||
| 154 | +# endif | ||
| 155 | +# define IS_RELATIVE_FILE_NAME(Filename) \ | ||
| 156 | + (! (ISSLASH ((Filename)[0]) || HAS_DEVICE (Filename))) | ||
| 157 | +# define IS_FILE_NAME_WITH_DIR(Filename) \ | ||
| 158 | + (strchr ((Filename), '/') != NULL || strchr ((Filename), '\\') != NULL \ | ||
| 159 | + || HAS_DEVICE (Filename)) | ||
| 160 | +#else | ||
| 161 | + /* Unix */ | ||
| 162 | +# define ISSLASH(C) ((C) == '/') | ||
| 163 | +# define HAS_DEVICE(Filename) ((void) (Filename), 0) | ||
| 164 | +# define FILE_SYSTEM_PREFIX_LEN(Filename) ((void) (Filename), 0) | ||
| 165 | +# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 | ||
| 166 | +# define IS_ABSOLUTE_FILE_NAME(Filename) ISSLASH ((Filename)[0]) | ||
| 167 | +# define IS_RELATIVE_FILE_NAME(Filename) (! ISSLASH ((Filename)[0])) | ||
| 168 | +# define IS_FILE_NAME_WITH_DIR(Filename) (strchr ((Filename), '/') != NULL) | ||
| 169 | +#endif | ||
| 170 | + | ||
| 171 | +/* Deprecated macros. For backward compatibility with old users of the | ||
| 172 | + 'filename' module. */ | ||
| 173 | +#define IS_ABSOLUTE_PATH IS_ABSOLUTE_FILE_NAME | ||
| 174 | +#define IS_PATH_WITH_DIR IS_FILE_NAME_WITH_DIR | ||
| 175 | + | ||
| 176 | + | ||
| 177 | +#ifdef __cplusplus | ||
| 178 | +} | ||
| 179 | +#endif | ||
| 180 | + | ||
| 181 | +#endif /* _FILENAME_H */ | ||
diff --git a/meta/recipes-extended/gperf/gperf_3.1.bb b/meta/recipes-extended/gperf/gperf_3.3.bb index 7a79c07042..7af2130114 100644 --- a/meta/recipes-extended/gperf/gperf_3.1.bb +++ b/meta/recipes-extended/gperf/gperf_3.3.bb | |||
| @@ -3,13 +3,10 @@ HOMEPAGE = "http://www.gnu.org/software/gperf" | |||
| 3 | SUMMARY = "Generate a perfect hash function from a set of keywords" | 3 | SUMMARY = "Generate a perfect hash function from a set of keywords" |
| 4 | LICENSE = "GPL-3.0-or-later" | 4 | LICENSE = "GPL-3.0-or-later" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ |
| 6 | file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b" | 6 | file://src/main.cc;beginline=8;endline=19;md5=ca1c43fa02be95aa2e10d567684e6fd5" |
| 7 | 7 | ||
| 8 | SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ | 8 | SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz" |
| 9 | file://0001-Make-the-code-C-17-compliant.patch" | 9 | SRC_URI[sha256sum] = "fd87e0aba7e43ae054837afd6cd4db03a3f2693deb3619085e6ed9d8d9604ad8" |
| 10 | SRC_URI[sha256sum] = "588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2" | ||
| 11 | |||
| 12 | SRC_URI += "file://1862c6e57a308a05889c80c048dbc58bdc378dcb.patch" | ||
| 13 | 10 | ||
| 14 | inherit autotools | 11 | inherit autotools |
| 15 | 12 | ||
