Re: [PATCH] libva: move wayland PACKAGECONFIG to libva.inc
Alexander Kanavin
Right, then the correct fix is to move all PACKAGECONFIG options to libva.inc, then set PACKAGECONFIG ?= "" in libva-initial. Alex
On Sat, 11 Dec 2021 at 11:00, Markus Volk <f_l_k@...> wrote:
|
|
Re: The state of DKMS in the Yocto community
Bruce Ashfield
On Fri, Dec 10, 2021 at 3:58 PM Alex Stewart <alex.stewart@...> wrote:
I used to have a DKMS recipe myself (at my previous employer), but never submitted it, because generally speaking, there are better ways to do things in OE. DKMS tends to avoid proper cross compilation (which of course we already do), or is often used to distribute proprietary code (which we don't want to encourage), or is avoiding the need to upstream the module code (which we also don't want to encourage). It also only tends to be used on a subset of the architectures that have enough memory/cpu to build on target, so by definition it is a bit more niche. We of course already have the ability to build modules on the target (we have a test case in core that does just that), so what is in core can support what DKMS needs to build on target. I don't see this as something that makes sense in oe-core (but maybe I'm not fully understanding the case, and where the current support is failing), but could of course be contributed to another layer. Cheers, Bruce
-- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
|
|
Re: [oe] Help with Inclusive Language in OpenEmbedded/Yocto Project
On 12/6/21 5:01 PM, Jon Mason wrote:
This email is a follow-up from the session held on Friday at theThanks for driving this. please add me to the list. -armin
|
|
Re: The state of DKMS in the Yocto community
Leon Woestenberg
Hello Alex,
toggle quoted messageShow quoted text
with DKMS, do you mean cross-compiling out-of-kernel modules on the build machine (that runs the Yocto/OpenEmbedded driven build)? Or do you mean provisioning the target with enough tools to allow compiling out-of-kernel modules there from source? In the first case, yes, I can share such recipe for reasonably recent releases. Regards, Leon. -- Leon Woestenberg leon@... T: +31 40 711 42 76 M: +31 6 472 30 372 Sidebranch Embedded Systems Eindhoven, The Netherlands http://www.sidebranch.com
On Fri, Dec 10, 2021 at 9:58 PM Alex Stewart <alex.stewart@...> wrote:
|
|
[PATCH v2] puzzles: Upgrade to latest git with patches merged
Richard Purdie
This upgrades to the latest upstream version where our fixes have equivalent
fixes merged upstream so our patches are no longer needed. Signed-off-by: Richard Purdie <richard.purdie@...> --- ...Check-for-excessive-values-to-malloc.patch | 45 ------------ ...01-map-Fix-stringop-overflow-warning.patch | 34 --------- ...isade-Fix-warnings-with-clang-on-arm.patch | 72 ------------------- ...-string-lenght-parameter-to-be-size_.patch | 30 -------- ...ix-compiling-failure-with-option-g-O.patch | 33 --------- .../puzzles/files/fix-ki-uninitialized.patch | 32 --------- meta/recipes-sato/puzzles/puzzles_git.bb | 11 +-- 7 files changed, 2 insertions(+), 255 deletions(-) delete mode 100644 meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch delete mode 100644 meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch delete mode 100644 meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch delete mode 100644 meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch delete mode 100644 meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch delete mode 100644 meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch diff --git a/meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch b/meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch deleted file mode 100644 index b572b55d1cf..00000000000 --- a/meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch +++ /dev/null @@ -1,45 +0,0 @@ -tree234: Avoid excessive values to malloc - -with whole program optimizers like lto, smalloc() is inlined the excessive -constant argument is propagated to malloc() and ultimately triggers the warning. - -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c: In function 'disptree': -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:46:17: error: argument 1 value '18446744073709551612' exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=] -| 46 | #define smalloc malloc -| | ^ -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:1631:17: note: in expansion of macro 'smalloc' -| 1631 | leveldata = smalloc(ht * (width+2)); -| | ^~~~~~~ -| In file included from tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:29: -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/recipe-sysroot/usr/include/stdlib.h:539:14: note: in a call to allocation function 'malloc' declared here -| 539 | extern void *malloc (size_t __size) __THROW __attribute_malloc__ -| | ^~~~~~ -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:46:17: error: argument 1 value '18446744073709551600' exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=] -| 46 | #define smalloc malloc -| | ^ -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:1632:18: note: in expansion of macro 'smalloc' -| 1632 | ctx.levels = smalloc(ht * sizeof(char *)); -| | ^~~~~~~ -| In file included from tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:29: -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/recipe-sysroot/usr/include/stdlib.h:539:14: note: in a call to allocation function 'malloc' declared here -| 539 | extern void *malloc (size_t __size) __THROW __attribute_malloc__ -| | ^~~~~~ -| cc1: some warnings being treated as errors - -Upstream-Status: Submitted [email discussion with upstream] - -Signed-off-by: Richard Purdie <richard.purdie@...> - -Index: git/tree234.c -=================================================================== ---- git.orig/tree234.c -+++ git/tree234.c -@@ -1621,7 +1621,7 @@ void disptree(tree234 *t) { - dispctx ctx; - char *leveldata; - int width = count234(t); -- int ht = height234(t) * 3 - 2; -+ unsigned int ht = height234(t) * 3 - 2; - int i; - - if (!t->root) { diff --git a/meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch b/meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch deleted file mode 100644 index 7f46d3ec0eb..00000000000 --- a/meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Khem Raj <raj.khem@...> -map: Fix stringop-overflow warning - -Fixes - -../git/map.c: In function 'new_game_desc': -../git/map.c:1663:23: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] - 1663 | ret[retlen++] = ','; - | ~~~~~~~~~~~~~~^~~~~ -../git/./map.c: In function 'new_game_desc': -../git/./map.c:1663:23: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] - 1663 | ret[retlen++] = ','; - | ~~~~~~~~~~~~~~^~~~~ - -Upstream-Status: Submitted [email discussion with upstream] - -Signed-off-by: Richard Purdie <richard.purdie@...> -Signed-off-by: Khem Raj <raj.khem@...> - -Index: git/map.c -=================================================================== ---- git.orig/map.c -+++ git/map.c -@@ -1659,6 +1659,10 @@ static char *new_game_desc(const game_pa - } - } - -+ if (retlen + 10 >= retsize) { -+ retsize = retlen + 256; -+ ret = sresize(ret, retsize, char); -+ } - ret[retlen++] = 'a'-1 + run; - ret[retlen++] = ','; - diff --git a/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch b/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch deleted file mode 100644 index 07eb1d32f65..00000000000 --- a/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch +++ /dev/null @@ -1,72 +0,0 @@ -From: Khem Raj <raj.khem@...> - -palisade: Fix warnings with clang on arm - -ARM treats 'char' as unsigned char when 'char' is not qualified with -'signed' or 'unsigned' explicitly. - -This results in warnings e.g. - -palisade.c:531:22: error: comparison of constant -1 with expression of -type 'clue' (aka 'char') is always false -[-Werror,-Wtautological-constant-out-of-range-compare] - if (clues[i] == EMPTY) continue; - -Therefore, typcast the contant to char in such places to be explicit - -Upstream-Status: Submitted [email discussion with upstream] - -Signed-off-by: Richard Purdie <richard.purdie@...> -Signed-off-by: Khem Raj <raj.khem@...> - -Index: git/palisade.c -=================================================================== ---- git.orig/palisade.c -+++ git/palisade.c -@@ -46,7 +46,7 @@ struct game_params { - int w, h, k; - }; - --typedef char clue; -+typedef signed char clue; - typedef unsigned char borderflag; - - typedef struct shared_state { -@@ -242,7 +242,7 @@ typedef struct solver_ctx { - * thing is done. See how it is propagated across multiple squares.] - */ - --#define EMPTY (~0) -+#define EMPTY ((clue)-1) - - #define BIT(i) (1 << (i)) - #define BORDER(i) BIT(i) -@@ -622,7 +622,7 @@ static char *new_game_desc(const game_pa - { - int w = params->w, h = params->h, wh = w*h, k = params->k; - -- clue *numbers = snewn(wh + 1, clue), *p; -+ clue *numbers = snewn(wh + 1, clue); - borderflag *rim = snewn(wh, borderflag); - borderflag *scratch_borders = snewn(wh, borderflag); - -@@ -682,7 +682,8 @@ static char *new_game_desc(const game_pa - sfree(shuf); - sfree(dsf); - -- p = numbers; -+ char *output = snewn(wh + 1, char), *p = output; -+ - r = 0; - for (i = 0; i < wh; ++i) { - if (numbers[i] != EMPTY) { -@@ -699,7 +700,8 @@ static char *new_game_desc(const game_pa - } - *p++ = '\0'; - -- return sresize(numbers, p - numbers, clue); -+ sfree(numbers); -+ return sresize(output, p - output, char); - } - - static const char *validate_desc(const game_params *params, const char *desc) diff --git a/meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch b/meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch deleted file mode 100644 index 5e240bfea57..00000000000 --- a/meta/recipes-sato/puzzles/files/0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Khem Raj <raj.khem@...> - -pattern.c: Change string lenght parameter to be size_t in do_row() - -This fixes below error on some architectures e.g. RISC-V - -pattern.c:455:9: error: 'memset' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] 455 | memset(deduced, DOT, (size_t)len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Upstream-Status: Submitted [email discussion with upstream] - -Signed-off-by: Richard Purdie <richard.purdie@...> -Signed-off-by: Khem Raj <raj.khem@...> - ---- - pattern.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: git/pattern.c -=================================================================== ---- git.orig/pattern.c -+++ git/pattern.c -@@ -429,7 +429,7 @@ static bool do_row(unsigned char *known, - unsigned char *row, - unsigned char *minpos_done, unsigned char *maxpos_done, - unsigned char *minpos_ok, unsigned char *maxpos_ok, -- unsigned char *start, int len, int step, int *data, -+ unsigned char *start, size_t len, int step, int *data, - unsigned int *changed - #ifdef STANDALONE_SOLVER - , const char *rowcol, int index, int cluewid diff --git a/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch b/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch deleted file mode 100644 index 4ee75431667..00000000000 --- a/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Hongxu Jia <hongxu.jia@...> - -gtk.c: fix compiling failure with option -g -O - -There was a compile failure with option -g -O -... -././gtk.c: In function 'main': -././gtk.c:2911:6: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized] - fprintf(stderr, "%s: %s\n", pname, error); - ^ -cc1: all warnings being treated as errors -... - -Fix by initializing pointer 'error' with NULL - -Upstream-Status: Submitted [email discussion with upstream] - -Signed-off-by: Richard Purdie <richard.purdie@...> -Signed-off-by: Hongxu Jia <hongxu.jia@...> - -Index: git/gtk.c -=================================================================== ---- git.orig/gtk.c -+++ git/gtk.c -@@ -3578,7 +3578,7 @@ static void list_presets_from_menu(struc - int main(int argc, char **argv) - { - char *pname = argv[0]; -- char *error; -+ char *error = NULL; - int ngenerate = 0, px = 1, py = 1; - bool print = false; - bool time_generation = false, test_solve = false, list_presets = false; diff --git a/meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch b/meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch deleted file mode 100644 index b182240240b..00000000000 --- a/meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch +++ /dev/null @@ -1,32 +0,0 @@ -tree123: avoid compiler unitialized variable error - -The compiler does not realize that we must go through the while() -loop at least once, so we replace it with a for() loop. - -Upstream-Status: Submitted [email discussion with upstream] - -Signed-off-by: Richard Purdie <richard.purdie@...> -Signed-off-by: Joe Slater <joe.slater@...> - -Index: git/tree234.c -=================================================================== ---- git.orig/tree234.c -+++ git/tree234.c -@@ -335,7 +335,7 @@ static void *add234_internal(tree234 *t, - } - - n = t->root; -- while (n) { -+ do { - LOG((" node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n", - n, - n->kids[0], n->counts[0], n->elems[0], -@@ -388,7 +388,7 @@ static void *add234_internal(tree234 *t, - if (!n->kids[ki]) - break; - n = n->kids[ki]; -- } -+ } while (n); - - add234_insert(NULL, e, NULL, &t->root, n, ki); - diff --git a/meta/recipes-sato/puzzles/puzzles_git.bb b/meta/recipes-sato/puzzles/puzzles_git.bb index 8ac62d52e57..f2fe7d7b969 100644 --- a/meta/recipes-sato/puzzles/puzzles_git.bb +++ b/meta/recipes-sato/puzzles/puzzles_git.bb @@ -7,17 +7,10 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=6e7d24cf1c949887ee9447a1e2a4a24c" # gtk support includes a bunch of x11 headers REQUIRED_DISTRO_FEATURES = "x11" -SRC_URI = "git://git.tartarus.org/simon/puzzles.git;branch=main \ - file://fix-compiling-failure-with-option-g-O.patch \ - file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \ - file://0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch \ - file://fix-ki-uninitialized.patch \ - file://0001-malloc-Check-for-excessive-values-to-malloc.patch \ - file://0001-map-Fix-stringop-overflow-warning.patch \ - " +SRC_URI = "git://git.tartarus.org/simon/puzzles.git;branch=main" UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "640f9235c79cdb1a924b0148cb312b0f02253364" +SRCREV = "b56c994b721f7cb5c5bcf09c5d695d4ae07d3052" PE = "2" PV = "0.0+git${SRCPV}" -- 2.32.0
|
|
[PATCH] puzzles: Upgrade to latest git with patches merged
Richard Purdie
This upgrades to the latest upstream version where several of our fixes
have equivalent fixes merged upstream. The remaining patch should be fixed soon to. Signed-off-by: Richard Purdie <richard.purdie@...> --- ...Check-for-excessive-values-to-malloc.patch | 45 ------------ ...01-map-Fix-stringop-overflow-warning.patch | 34 --------- ...isade-Fix-warnings-with-clang-on-arm.patch | 72 ------------------- ...ix-compiling-failure-with-option-g-O.patch | 33 --------- .../puzzles/files/fix-ki-uninitialized.patch | 32 --------- meta/recipes-sato/puzzles/puzzles_git.bb | 7 +- 6 files changed, 1 insertion(+), 222 deletions(-) delete mode 100644 meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch delete mode 100644 meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch delete mode 100644 meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch delete mode 100644 meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch delete mode 100644 meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch diff --git a/meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch b/meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch deleted file mode 100644 index b572b55d1cf..00000000000 --- a/meta/recipes-sato/puzzles/files/0001-malloc-Check-for-excessive-values-to-malloc.patch +++ /dev/null @@ -1,45 +0,0 @@ -tree234: Avoid excessive values to malloc - -with whole program optimizers like lto, smalloc() is inlined the excessive -constant argument is propagated to malloc() and ultimately triggers the warning. - -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c: In function 'disptree': -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:46:17: error: argument 1 value '18446744073709551612' exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=] -| 46 | #define smalloc malloc -| | ^ -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:1631:17: note: in expansion of macro 'smalloc' -| 1631 | leveldata = smalloc(ht * (width+2)); -| | ^~~~~~~ -| In file included from tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:29: -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/recipe-sysroot/usr/include/stdlib.h:539:14: note: in a call to allocation function 'malloc' declared here -| 539 | extern void *malloc (size_t __size) __THROW __attribute_malloc__ -| | ^~~~~~ -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:46:17: error: argument 1 value '18446744073709551600' exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=] -| 46 | #define smalloc malloc -| | ^ -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:1632:18: note: in expansion of macro 'smalloc' -| 1632 | ctx.levels = smalloc(ht * sizeof(char *)); -| | ^~~~~~~ -| In file included from tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/git/tree234.c:29: -| tmp/work/core2-64-poky-linux/puzzles/2_0.0+gitAUTOINC+640f9235c7-r0/recipe-sysroot/usr/include/stdlib.h:539:14: note: in a call to allocation function 'malloc' declared here -| 539 | extern void *malloc (size_t __size) __THROW __attribute_malloc__ -| | ^~~~~~ -| cc1: some warnings being treated as errors - -Upstream-Status: Submitted [email discussion with upstream] - -Signed-off-by: Richard Purdie <richard.purdie@...> - -Index: git/tree234.c -=================================================================== ---- git.orig/tree234.c -+++ git/tree234.c -@@ -1621,7 +1621,7 @@ void disptree(tree234 *t) { - dispctx ctx; - char *leveldata; - int width = count234(t); -- int ht = height234(t) * 3 - 2; -+ unsigned int ht = height234(t) * 3 - 2; - int i; - - if (!t->root) { diff --git a/meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch b/meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch deleted file mode 100644 index 7f46d3ec0eb..00000000000 --- a/meta/recipes-sato/puzzles/files/0001-map-Fix-stringop-overflow-warning.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Khem Raj <raj.khem@...> -map: Fix stringop-overflow warning - -Fixes - -../git/map.c: In function 'new_game_desc': -../git/map.c:1663:23: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] - 1663 | ret[retlen++] = ','; - | ~~~~~~~~~~~~~~^~~~~ -../git/./map.c: In function 'new_game_desc': -../git/./map.c:1663:23: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] - 1663 | ret[retlen++] = ','; - | ~~~~~~~~~~~~~~^~~~~ - -Upstream-Status: Submitted [email discussion with upstream] - -Signed-off-by: Richard Purdie <richard.purdie@...> -Signed-off-by: Khem Raj <raj.khem@...> - -Index: git/map.c -=================================================================== ---- git.orig/map.c -+++ git/map.c -@@ -1659,6 +1659,10 @@ static char *new_game_desc(const game_pa - } - } - -+ if (retlen + 10 >= retsize) { -+ retsize = retlen + 256; -+ ret = sresize(ret, retsize, char); -+ } - ret[retlen++] = 'a'-1 + run; - ret[retlen++] = ','; - diff --git a/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch b/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch deleted file mode 100644 index 07eb1d32f65..00000000000 --- a/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch +++ /dev/null @@ -1,72 +0,0 @@ -From: Khem Raj <raj.khem@...> - -palisade: Fix warnings with clang on arm - -ARM treats 'char' as unsigned char when 'char' is not qualified with -'signed' or 'unsigned' explicitly. - -This results in warnings e.g. - -palisade.c:531:22: error: comparison of constant -1 with expression of -type 'clue' (aka 'char') is always false -[-Werror,-Wtautological-constant-out-of-range-compare] - if (clues[i] == EMPTY) continue; - -Therefore, typcast the contant to char in such places to be explicit - -Upstream-Status: Submitted [email discussion with upstream] - -Signed-off-by: Richard Purdie <richard.purdie@...> -Signed-off-by: Khem Raj <raj.khem@...> - -Index: git/palisade.c -=================================================================== ---- git.orig/palisade.c -+++ git/palisade.c -@@ -46,7 +46,7 @@ struct game_params { - int w, h, k; - }; - --typedef char clue; -+typedef signed char clue; - typedef unsigned char borderflag; - - typedef struct shared_state { -@@ -242,7 +242,7 @@ typedef struct solver_ctx { - * thing is done. See how it is propagated across multiple squares.] - */ - --#define EMPTY (~0) -+#define EMPTY ((clue)-1) - - #define BIT(i) (1 << (i)) - #define BORDER(i) BIT(i) -@@ -622,7 +622,7 @@ static char *new_game_desc(const game_pa - { - int w = params->w, h = params->h, wh = w*h, k = params->k; - -- clue *numbers = snewn(wh + 1, clue), *p; -+ clue *numbers = snewn(wh + 1, clue); - borderflag *rim = snewn(wh, borderflag); - borderflag *scratch_borders = snewn(wh, borderflag); - -@@ -682,7 +682,8 @@ static char *new_game_desc(const game_pa - sfree(shuf); - sfree(dsf); - -- p = numbers; -+ char *output = snewn(wh + 1, char), *p = output; -+ - r = 0; - for (i = 0; i < wh; ++i) { - if (numbers[i] != EMPTY) { -@@ -699,7 +700,8 @@ static char *new_game_desc(const game_pa - } - *p++ = '\0'; - -- return sresize(numbers, p - numbers, clue); -+ sfree(numbers); -+ return sresize(output, p - output, char); - } - - static const char *validate_desc(const game_params *params, const char *desc) diff --git a/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch b/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch deleted file mode 100644 index 4ee75431667..00000000000 --- a/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Hongxu Jia <hongxu.jia@...> - -gtk.c: fix compiling failure with option -g -O - -There was a compile failure with option -g -O -... -././gtk.c: In function 'main': -././gtk.c:2911:6: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized] - fprintf(stderr, "%s: %s\n", pname, error); - ^ -cc1: all warnings being treated as errors -... - -Fix by initializing pointer 'error' with NULL - -Upstream-Status: Submitted [email discussion with upstream] - -Signed-off-by: Richard Purdie <richard.purdie@...> -Signed-off-by: Hongxu Jia <hongxu.jia@...> - -Index: git/gtk.c -=================================================================== ---- git.orig/gtk.c -+++ git/gtk.c -@@ -3578,7 +3578,7 @@ static void list_presets_from_menu(struc - int main(int argc, char **argv) - { - char *pname = argv[0]; -- char *error; -+ char *error = NULL; - int ngenerate = 0, px = 1, py = 1; - bool print = false; - bool time_generation = false, test_solve = false, list_presets = false; diff --git a/meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch b/meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch deleted file mode 100644 index b182240240b..00000000000 --- a/meta/recipes-sato/puzzles/files/fix-ki-uninitialized.patch +++ /dev/null @@ -1,32 +0,0 @@ -tree123: avoid compiler unitialized variable error - -The compiler does not realize that we must go through the while() -loop at least once, so we replace it with a for() loop. - -Upstream-Status: Submitted [email discussion with upstream] - -Signed-off-by: Richard Purdie <richard.purdie@...> -Signed-off-by: Joe Slater <joe.slater@...> - -Index: git/tree234.c -=================================================================== ---- git.orig/tree234.c -+++ git/tree234.c -@@ -335,7 +335,7 @@ static void *add234_internal(tree234 *t, - } - - n = t->root; -- while (n) { -+ do { - LOG((" node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n", - n, - n->kids[0], n->counts[0], n->elems[0], -@@ -388,7 +388,7 @@ static void *add234_internal(tree234 *t, - if (!n->kids[ki]) - break; - n = n->kids[ki]; -- } -+ } while (n); - - add234_insert(NULL, e, NULL, &t->root, n, ki); - diff --git a/meta/recipes-sato/puzzles/puzzles_git.bb b/meta/recipes-sato/puzzles/puzzles_git.bb index 8ac62d52e57..da466f3efca 100644 --- a/meta/recipes-sato/puzzles/puzzles_git.bb +++ b/meta/recipes-sato/puzzles/puzzles_git.bb @@ -8,16 +8,11 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=6e7d24cf1c949887ee9447a1e2a4a24c" REQUIRED_DISTRO_FEATURES = "x11" SRC_URI = "git://git.tartarus.org/simon/puzzles.git;branch=main \ - file://fix-compiling-failure-with-option-g-O.patch \ - file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \ file://0001-pattern.c-Change-string-lenght-parameter-to-be-size_.patch \ - file://fix-ki-uninitialized.patch \ - file://0001-malloc-Check-for-excessive-values-to-malloc.patch \ - file://0001-map-Fix-stringop-overflow-warning.patch \ " UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "640f9235c79cdb1a924b0148cb312b0f02253364" +SRCREV = "d399a6b23051335ce3107f11822ae352816fcd50" PE = "2" PV = "0.0+git${SRCPV}" -- 2.32.0
|
|
Re: [poky][dunfell][PATCH] busybox: Fix multiple security issues in awk
Ranjitsinh Rathod
Hi Steve,
Just sent a v2 patch for this after rebasing and removing the patch fuzz warning. Thanks, Ranjitsinh Rathod
|
|
[meta][dunfell][PATCH v2] busybox: Fix multiple security issues in awk
Ranjitsinh Rathod
From: Sana Kazi <Sana.Kazi@...>
CVE-2021-423xx-awk.patch fixes below listed CVEs for busybox: CVE-2021-42378, CVE-2021-42379, CVE-2021-42380, CVE-2021-42381, CVE-2021-42382, CVE-2021-42384, CVE-2021-42385, CVE-2021-42386 Signed-off-by: Sana Kazi <Sana.Kazi@...> Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@...> Signed-off-by: Ranjitsinh Rathod <ranjitsinhrathod1991@...> --- meta/recipes-core/busybox/busybox_1.31.1.bb | 1 + .../busybox/files/CVE-2021-423xx-awk.patch | 215 ++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100644 meta/recipes-core/busybox/files/CVE-2021-423xx-awk.patch diff --git a/meta/recipes-core/busybox/busybox_1.31.1.bb b/meta/recipes-core/busybox/busybox_1.31.1.bb index 14ac710f3b..38b448b3e1 100644 --- a/meta/recipes-core/busybox/busybox_1.31.1.bb +++ b/meta/recipes-core/busybox/busybox_1.31.1.bb @@ -54,6 +54,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://0001-mktemp-add-tmpdir-option.patch \ file://CVE-2021-42374.patch \ file://CVE-2021-42376.patch \ + file://CVE-2021-423xx-awk.patch \ " SRC_URI_append_libc-musl = " file://musl.cfg " diff --git a/meta/recipes-core/busybox/files/CVE-2021-423xx-awk.patch b/meta/recipes-core/busybox/files/CVE-2021-423xx-awk.patch new file mode 100644 index 0000000000..7e3d47b88c --- /dev/null +++ b/meta/recipes-core/busybox/files/CVE-2021-423xx-awk.patch @@ -0,0 +1,215 @@ +From a21708eb8d07b4a6dbc1d3e4ace4c5721515a84c Mon Sep 17 00:00:00 2001 +From: Sana Kazi <Sana.Kazi@...> +Date: Wed, 8 Dec 2021 12:25:34 +0530 +Subject: [PATCH] busybox: Fix multiple security issues in awk + +Description: fix multiple security issues in awk +Origin: backported awk.c from busybox 1.34.1 + +CVE: CVE-2021-42378 +CVE: CVE-2021-42379 +CVE: CVE-2021-42380 +CVE: CVE-2021-42381 +CVE: CVE-2021-42382 +CVE: CVE-2021-42384 +CVE: CVE-2021-42385 +CVE: CVE-2021-42386 + +Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/busybox/1:1.30.1-6ubuntu3.1/busybox_1.30.1-6ubuntu3.1.debian.tar.xz] + +Comment: Refreshed first hunk and removed few hunks as they are already present in source. + +Signed-off-by: Sana Kazi <Sana.Kazi@...> +Signed-off-by: Ranjitsinh Rathod <Ranjitsinh.Rathod@...> + +--- + editors/awk.c | 80 ++++++++++++++++++++++++++++++++++++++------------- + 1 file changed, 60 insertions(+), 20 deletions(-) + +diff --git a/editors/awk.c b/editors/awk.c +index d25508e..4e4f282 100644 +--- a/editors/awk.c ++++ b/editors/awk.c +@@ -272,7 +272,8 @@ typedef struct tsplitter_s { + /* if previous token class is CONCAT1 and next is CONCAT2, concatenation */ + /* operator is inserted between them */ + #define TC_CONCAT1 (TC_VARIABLE | TC_ARRTERM | TC_SEQTERM \ +- | TC_STRING | TC_NUMBER | TC_UOPPOST) ++ | TC_STRING | TC_NUMBER | TC_UOPPOST \ ++ | TC_LENGTH) + #define TC_CONCAT2 (TC_OPERAND | TC_UOPPRE) + + #define OF_RES1 0x010000 +@@ -404,7 +405,7 @@ static const char tokenlist[] ALIGN1 = + + #define OC_B OC_BUILTIN + +-static const uint32_t tokeninfo[] = { ++static const uint32_t tokeninfo[] ALIGN4 = { + 0, + 0, + OC_REGEXP, +@@ -1070,8 +1071,10 @@ static uint32_t next_token(uint32_t expected) + const uint32_t *ti; + + if (t_rollback) { ++ debug_printf_parse("%s: using rolled-back token\n", __func__); + t_rollback = FALSE; + } else if (concat_inserted) { ++ debug_printf_parse("%s: using concat-inserted token\n", __func__); + concat_inserted = FALSE; + t_tclass = save_tclass; + t_info = save_info; +@@ -1200,7 +1203,11 @@ static uint32_t next_token(uint32_t expected) + goto readnext; + + /* insert concatenation operator when needed */ +- if ((ltclass & TC_CONCAT1) && (tc & TC_CONCAT2) && (expected & TC_BINOP)) { ++ debug_printf_parse("%s: %x %x %x concat_inserted?\n", __func__, ++ (ltclass & TC_CONCAT1), (tc & TC_CONCAT2), (expected & TC_BINOP)); ++ if ((ltclass & TC_CONCAT1) && (tc & TC_CONCAT2) && (expected & TC_BINOP) ++ && !(ltclass == TC_LENGTH && tc == TC_SEQSTART) /* but not for "length(..." */ ++ ) { + concat_inserted = TRUE; + save_tclass = tc; + save_info = t_info; +@@ -1208,6 +1215,7 @@ static uint32_t next_token(uint32_t expected) + t_info = OC_CONCAT | SS | P(35); + } + ++ debug_printf_parse("%s: t_tclass=tc=%x\n", __func__, t_tclass); + t_tclass = tc; + } + ltclass = t_tclass; +@@ -1218,6 +1226,7 @@ static uint32_t next_token(uint32_t expected) + EMSG_UNEXP_EOS : EMSG_UNEXP_TOKEN); + } + ++ debug_printf_parse("%s: returning, ltclass:%x t_double:%f\n", __func__, ltclass, t_double); + return ltclass; + #undef concat_inserted + #undef save_tclass +@@ -1282,7 +1291,7 @@ static node *parse_expr(uint32_t iexp) + glptr = NULL; + + } else if (tc & (TC_BINOP | TC_UOPPOST)) { +- debug_printf_parse("%s: TC_BINOP | TC_UOPPOST\n", __func__); ++ debug_printf_parse("%s: TC_BINOP | TC_UOPPOST tc:%x\n", __func__, tc); + /* for binary and postfix-unary operators, jump back over + * previous operators with higher priority */ + vn = cn; +@@ -1350,8 +1359,10 @@ static node *parse_expr(uint32_t iexp) + v = cn->l.v = xzalloc(sizeof(var)); + if (tc & TC_NUMBER) + setvar_i(v, t_double); +- else ++ else { + setvar_s(v, t_string); ++ xtc &= ~TC_UOPPOST; /* "str"++ is not allowed */ ++ } + break; + + case TC_REGEXP: +@@ -1387,7 +1398,12 @@ static node *parse_expr(uint32_t iexp) + + case TC_LENGTH: + debug_printf_parse("%s: TC_LENGTH\n", __func__); +- next_token(TC_SEQSTART | TC_OPTERM | TC_GRPTERM); ++ next_token(TC_SEQSTART /* length(...) */ ++ | TC_OPTERM /* length; (or newline)*/ ++ | TC_GRPTERM /* length } */ ++ | TC_BINOPX /* length <op> NUM */ ++ | TC_COMMA /* print length, 1 */ ++ ); + rollback_token(); + if (t_tclass & TC_SEQSTART) { + /* It was a "(" token. Handle just like TC_BUILTIN */ +@@ -1747,12 +1763,34 @@ static void fsrealloc(int size) + nfields = size; + } + ++static int regexec1_nonempty(const regex_t *preg, const char *s, regmatch_t pmatch[]) ++{ ++ int r = regexec(preg, s, 1, pmatch, 0); ++ if (r == 0 && pmatch[0].rm_eo == 0) { ++ /* For example, happens when FS can match ++ * an empty string (awk -F ' *'). Logically, ++ * this should split into one-char fields. ++ * However, gawk 5.0.1 searches for first ++ * _non-empty_ separator string match: ++ */ ++ size_t ofs = 0; ++ do { ++ ofs++; ++ if (!s[ofs]) ++ return REG_NOMATCH; ++ regexec(preg, s + ofs, 1, pmatch, 0); ++ } while (pmatch[0].rm_eo == 0); ++ pmatch[0].rm_so += ofs; ++ pmatch[0].rm_eo += ofs; ++ } ++ return r; ++} ++ + static int awk_split(const char *s, node *spl, char **slist) + { +- int l, n; ++ int n; + char c[4]; + char *s1; +- regmatch_t pmatch[2]; // TODO: why [2]? [1] is enough... + + /* in worst case, each char would be a separate field */ + *slist = s1 = xzalloc(strlen(s) * 2 + 3); +@@ -1769,29 +1807,31 @@ static int awk_split(const char *s, node *spl, char **slist) + return n; /* "": zero fields */ + n++; /* at least one field will be there */ + do { ++ int l; ++ regmatch_t pmatch[2]; // TODO: why [2]? [1] is enough... ++ + l = strcspn(s, c+2); /* len till next NUL or \n */ +- if (regexec(icase ? spl->r.ire : spl->l.re, s, 1, pmatch, 0) == 0 ++ if (regexec1_nonempty(icase ? spl->r.ire : spl->l.re, s, pmatch) == 0 + && pmatch[0].rm_so <= l + ) { ++ /* if (pmatch[0].rm_eo == 0) ... - impossible */ + l = pmatch[0].rm_so; +- if (pmatch[0].rm_eo == 0) { +- l++; +- pmatch[0].rm_eo++; +- } + n++; /* we saw yet another delimiter */ + } else { + pmatch[0].rm_eo = l; + if (s[l]) + pmatch[0].rm_eo++; + } +- memcpy(s1, s, l); +- /* make sure we remove *all* of the separator chars */ +- do { +- s1[l] = '\0'; +- } while (++l < pmatch[0].rm_eo); +- nextword(&s1); ++ s1 = mempcpy(s1, s, l); ++ *s1++ = '\0'; + s += pmatch[0].rm_eo; + } while (*s); ++ ++ /* echo a-- | awk -F-- '{ print NF, length($NF), $NF }' ++ * should print "2 0 ": ++ */ ++ *s1 = '\0'; ++ + return n; + } + if (c[0] == '\0') { /* null split */ +@@ -1995,7 +2035,7 @@ static int ptest(node *pattern) + static int awk_getline(rstream *rsm, var *v) + { + char *b; +- regmatch_t pmatch[2]; ++ regmatch_t pmatch[2]; // TODO: why [2]? [1] is enough... + int size, a, p, pp = 0; + int fd, so, eo, r, rp; + char c, *m, *s; -- 2.17.1
|
|
Re: [PATCH] wayland: upgrade 1.19.0 -> 1.20.0
Richard Purdie
On Thu, 2021-12-09 at 17:30 -0500, Denys Dmytriyenko wrote:
Wayland 1.20.0 is released!https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/2640/steps/11/logs/stdio and there may be more to follow :( Cheers, Richard
|
|
Re: [PATCH] libva: move wayland PACKAGECONFIG to libva.inc
Markus Volk
I was able to narrow the issue down a little bit. I can reproduce
it with plain poky by adding this to local.conf
and do 'bitbake libva-initial' Am 10.12.21 um 16:47 schrieb Khem Raj:
|
|
Re: [PATCH 10/29] meson: upgrade 0.60.1 -> 0.60.2
Alexander Kanavin
Perhaps meta-oe build in the AB should be adjusted? Alex
On Sat, 11 Dec 2021 at 03:42, Khem Raj <raj.khem@...> wrote: On Fri, Dec 10, 2021 at 9:01 AM Khem Raj <raj.khem@...> wrote:
|
|
Re: [PATCH 10/29] meson: upgrade 0.60.1 -> 0.60.2
On Fri, Dec 10, 2021 at 9:01 AM Khem Raj <raj.khem@...> wrote:
I have a fix for gjs [1] but I was thinking meta-gnome is a good testcase for meson. So when upgrading meson it will be good to add this layer to test and build world. [1] https://lore.kernel.org/openembedded-devel/20211210173603.2826515-1-raj.khem@gmail.com/T/#u On Wed, Dec 8, 2021 at 2:00 PM Alexander Kanavin <alex.kanavin@...> wrote:
|
|
The state of DKMS in the Yocto community
Alex Stewart
Hey List,
I'm trying to work out the mysterious state of DKMS in OE-Core. Our (NI) OE distributions rely heavily on DKMS to (un)install our ecosystem of kernel drivers at runtime across our product lines. To facilitate that, we authored a dkms_2.4.0.bb recipe [1] back in 2017, which we have carried out-of-stream since. We tried to upstream it, and the patched rev'ed a couple of times [2]; but it seems to have never made it into a yocto release. Though some other recipes mention DKMS passingly, I don't see anywhere that OE-Core officially supports it. Nor does my googling reveal anyone else who uses DKMS. I find that a little hard to believe, though I understand that it's probably relatively rare in the embedded space. @all So does anyone else on the list use DKMS in their yocto distribution? Are you maintaining a DKMS recipe out-of-stream as well? @maintainers If NI upgraded our DKMS recipe to a more recent version than 2.4.0 and submitted it again to OE-Core, would you accept it? If not, we will move it to our own meta layer and accept that we are unique in this regard. [1] https://github.com/ni/openembedded-core/commit/5789a27b68d95f3840bb8c4cb0d7b28d538c9a50 [2] https://lists.openembedded.org/g/openembedded-core/message/100680 Thanks, -- Alex Stewart Software Engineer - NI Real-Time OS NI (National Instruments) alex.stewart@...
|
|
Re: [dunfell 16/18] cmake: FindGTest: Add target for gmock library
Jasper Orschulko
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256 Hello everyone, after some digging we identified the issue to be on our part. We have been using "GTEST_LIBRARY" and "GTEST_MAIN_LIBRARY" in our CMake scripts instead of "GTEST_LIBRARIES" and "GTEST_MAIN_LIBRARIES", as described in the cmake docs: https://cmake.org/cmake/help/v3.16/module/FindGTest.html#result-variables So all good here! :) - -- With best regards Jasper Orschulko DevOps Engineer Tel. +49 30 58 58 14 265 Fax +49 30 58 58 14 999 Jasper.Orschulko@... • • • • • • • • • • • • • • • • • • • • • • • • • • iris-GmbH infrared & intelligent sensors Schnellerstraße 1-5 | 12439 Berlin https://iris-sensing.com/ On Thu, 2021-12-09 at 09:32 -1000, Steve Sakoman wrote: On Thu, Dec 9, 2021 at 7:38 AM Jasper Orschulko-----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE4WyPMIC5Ap4+Ooo1Ygqew07VMNUFAmGzoSAACgkQYgqew07V MNUawAf/aoqsdt2f0at05sKUMQRvby+wwBdq+0MnSzQvnkalYZmqVWu9EmVobIaL PgZyzhBFaCMhiKA80sirEqDwippgOyVMtydaXJBNhztCnsyg2pbmouaOZsmjeJ/L bCbJhK+z3eaXzDivZ37/5oIs97hynTgeanJlpowsuE6FXEX8Q8hU7vPjhVjGTeIE wKEGDqDJUMwrmaSmDf+pQcikE5TmsOZyGS006c6S6FmpifImzwM8J/sxmOWtTaN1 EmDGj7h7lsG3+v7XkOODTdDn0Teoe61x0uIfPqvK35ig8V6SP/ylwKF81zK248d/ TWMB7wqyaL6+9gkqvreG96h4eFY6JQ== =+DGS -----END PGP SIGNATURE-----
|
|
[PATCH] elf: Discard input .note.gnu.build-id sections
Valery Chernous
From: Valerii Chernous <vchernou@...>
Originally issue: building of glibc 2.32 or 2.34 with option "-Wl,--build-id" produce libc.so.6 with section ".note.gnu.build-id" that have invalid(double, 0x48) section size. It happens because glibc use sublibraries for linking libc.so.6 ld produce this sublibraries with build-id section and on last linking stage loads this sections as input for linking. ld should create new(valid) ".note.gnu.build-id" into function ldelf_setup_build_id on last linking stage but it skip creating because build-id section already exists. As result libc.so.6 contain ".note.gnu.build-id" with build-ids from sublibraries and without valid build-id Howto solved: 1. Discard input .note.gnu.build-id sections. 2. Clear the build ID field before writing. 3. Use bfd_make_section_anyway_with_flags to create the output .note.gnu.build-id section. Upstream-Status: Backport Reference to upstream patch: [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=1f1d0f8888a6c944e612b416a2a6e11abcf5199f] Signed-off-by: Valerii Chernous <vchernou@...> Signed-off-by: Valery Chernous <valery.chernous@...> --- .../binutils/binutils-2.37.inc | 1 + ...rd-input-.note.gnu.build-id-sections.patch | 215 ++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0001-elf-Discard-input-.note.gnu.build-id-sections.patch diff --git a/meta/recipes-devtools/binutils/binutils-2.37.inc b/meta/recipes-devtools/binutils/binutils-2.37.inc index 8f91c6460d..c565adc4b7 100644 --- a/meta/recipes-devtools/binutils/binutils-2.37.inc +++ b/meta/recipes-devtools/binutils/binutils-2.37.inc @@ -35,5 +35,6 @@ SRC_URI = "\ file://0015-sync-with-OE-libtool-changes.patch \ file://0016-Check-for-clang-before-checking-gcc-version.patch \ file://0017-bfd-Close-the-file-descriptor-if-there-is-no-archive.patch \ + file://0001-elf-Discard-input-.note.gnu.build-id-sections.patch \ " S = "${WORKDIR}/git" diff --git a/meta/recipes-devtools/binutils/binutils/0001-elf-Discard-input-.note.gnu.build-id-sections.patch b/meta/recipes-devtools/binutils/binutils/0001-elf-Discard-input-.note.gnu.build-id-sections.patch new file mode 100644 index 0000000000..c93af4e46f --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0001-elf-Discard-input-.note.gnu.build-id-sections.patch @@ -0,0 +1,215 @@ +From b2e18d3ea300f7491705b6e86a7cc3d6366e3b1f Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" <hjl.tools@...> +Date: Tue, 30 Nov 2021 20:40:38 -0800 +Subject: [PATCH] elf: Discard input .note.gnu.build-id sections + +1. Discard input .note.gnu.build-id sections. +2. Clear the build ID field before writing. +3. Use bfd_make_section_anyway_with_flags to create the output +.note.gnu.build-id section. + + PR ld/28639 + * ldelf.c (ldelf_after_open): Discard input .note.gnu.build-id + sections, excluding the first one. + (write_build_id): Clear the build ID field before writing. + (ldelf_setup_build_id): Use bfd_make_section_anyway_with_flags + to create the output .note.gnu.build-id section. + * testsuite/ld-elf/build-id.exp: New file. + * testsuite/ld-elf/pr28639a.rd: Likewise. + * testsuite/ld-elf/pr28639b.rd: Likewise. + * testsuite/ld-elf/pr28639c.rd: Likewise. + * testsuite/ld-elf/pr28639d.rd: Likewise. + +Upstream-Status: Backport + +Reference to upstream patch: +[https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=1f1d0f8888a6c944e612b416a2a6e11abcf5199f] +--- + ld/ldelf.c | 15 ++++++- + ld/testsuite/ld-elf/build-id.exp | 77 ++++++++++++++++++++++++++++++++ + ld/testsuite/ld-elf/pr28639a.rd | 6 +++ + ld/testsuite/ld-elf/pr28639b.rd | 6 +++ + ld/testsuite/ld-elf/pr28639c.rd | 10 +++++ + ld/testsuite/ld-elf/pr28639d.rd | 4 ++ + 6 files changed, 117 insertions(+), 1 deletion(-) + create mode 100644 ld/testsuite/ld-elf/build-id.exp + create mode 100644 ld/testsuite/ld-elf/pr28639a.rd + create mode 100644 ld/testsuite/ld-elf/pr28639b.rd + create mode 100644 ld/testsuite/ld-elf/pr28639c.rd + create mode 100644 ld/testsuite/ld-elf/pr28639d.rd + +diff --git a/ld/ldelf.c b/ld/ldelf.c +index 21e655bb55c..8501d98b48f 100644 +--- a/ld/ldelf.c ++++ b/ld/ldelf.c +@@ -1043,6 +1043,15 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd, + /* Do not allow executable files to be used as inputs to the link. */ + for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next) + { ++ /* Discard input .note.gnu.build-id sections. */ ++ s = bfd_get_section_by_name (abfd, ".note.gnu.build-id"); ++ while (s != NULL) ++ { ++ if (s != elf_tdata (link_info.output_bfd)->o->build_id.sec) ++ s->flags |= SEC_EXCLUDE; ++ s = bfd_get_next_section_by_name (NULL, s); ++ } ++ + if (abfd->xvec->flavour == bfd_target_elf_flavour + && !bfd_input_just_syms (abfd) + && elf_tdata (abfd) != NULL +@@ -1387,6 +1396,9 @@ write_build_id (bfd *abfd) + id_bits = contents + size; + size = asec->size - size; + ++ /* Clear the build ID field. */ ++ memset (id_bits, 0, size); ++ + bfd_h_put_32 (abfd, sizeof "GNU", &e_note->namesz); + bfd_h_put_32 (abfd, size, &e_note->descsz); + bfd_h_put_32 (abfd, NT_GNU_BUILD_ID, &e_note->type); +@@ -1418,7 +1430,8 @@ ldelf_setup_build_id (bfd *ibfd) + + flags = (SEC_ALLOC | SEC_LOAD | SEC_IN_MEMORY + | SEC_LINKER_CREATED | SEC_READONLY | SEC_DATA); +- s = bfd_make_section_with_flags (ibfd, ".note.gnu.build-id", flags); ++ s = bfd_make_section_anyway_with_flags (ibfd, ".note.gnu.build-id", ++ flags); + if (s != NULL && bfd_set_section_alignment (s, 2)) + { + struct elf_obj_tdata *t = elf_tdata (link_info.output_bfd); +diff --git a/ld/testsuite/ld-elf/build-id.exp b/ld/testsuite/ld-elf/build-id.exp +new file mode 100644 +index 00000000000..19c22a75c4d +--- /dev/null ++++ b/ld/testsuite/ld-elf/build-id.exp +@@ -0,0 +1,77 @@ ++# Expect script for --build-id tests. ++# Copyright (C) 2021 Free Software Foundation, Inc. ++# ++# This file is part of the GNU Binutils. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, ++# MA 02110-1301, USA. ++# ++ ++# Exclude non-ELF targets. ++ ++if ![is_elf_format] { ++ return ++} ++ ++if { [istarget frv-*-*] || [istarget lm32-*-*] } { ++ return ++} ++ ++if { !([istarget *-*-linux*] ++ || [istarget arm*-*-uclinuxfdpiceabi] ++ || [istarget *-*-nacl*] ++ || [istarget *-*-gnu*]) } then { ++ return ++} ++ ++run_ld_link_tests [list \ ++ [list \ ++ "pr28639a.o" \ ++ "-r --build-id=md5" \ ++ "" \ ++ "" \ ++ {start.s} \ ++ {{readelf {--notes} pr28639a.rd}} \ ++ "pr28639a.o" \ ++ ] \ ++ [list \ ++ "pr28639a.o" \ ++ "-r --build-id" \ ++ "" \ ++ "" \ ++ {dummy.s} \ ++ {{readelf {--notes} pr28639b.rd}} \ ++ "pr28639b.o" \ ++ ] \ ++ [list \ ++ "pr28639a" \ ++ "--build-id tmpdir/pr28639a.o tmpdir/pr28639b.o" \ ++ "" \ ++ "" \ ++ {dummy.s} \ ++ {{readelf {--notes} pr28639b.rd} \ ++ {readelf {--notes} pr28639c.rd}} \ ++ "pr28639a" \ ++ ] \ ++ [list \ ++ "pr28639b" \ ++ "--build-id=none tmpdir/pr28639a.o tmpdir/pr28639b.o" \ ++ "" \ ++ "" \ ++ {dummy.s} \ ++ {{readelf {--notes} pr28639d.rd}} \ ++ "pr28639b" \ ++ ] \ ++] +diff --git a/ld/testsuite/ld-elf/pr28639a.rd b/ld/testsuite/ld-elf/pr28639a.rd +new file mode 100644 +index 00000000000..e85087064d0 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr28639a.rd +@@ -0,0 +1,6 @@ ++#... ++Displaying notes found in: \.note\.gnu\.build-id ++ Owner Data size Description ++ GNU 0x00000010 NT_GNU_BUILD_ID \(unique build ID bitstring\) ++ Build ID: [0-9a-f]+ ++#pass +diff --git a/ld/testsuite/ld-elf/pr28639b.rd b/ld/testsuite/ld-elf/pr28639b.rd +new file mode 100644 +index 00000000000..04dcb04bec2 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr28639b.rd +@@ -0,0 +1,6 @@ ++#... ++Displaying notes found in: \.note\.gnu\.build-id ++ Owner Data size Description ++ GNU 0x00000014 NT_GNU_BUILD_ID \(unique build ID bitstring\) ++ Build ID: [0-9a-f]+ ++#pass +diff --git a/ld/testsuite/ld-elf/pr28639c.rd b/ld/testsuite/ld-elf/pr28639c.rd +new file mode 100644 +index 00000000000..64221e5fa51 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr28639c.rd +@@ -0,0 +1,10 @@ ++#failif ++#... ++Displaying notes found in: \.note\.gnu\.build-id ++ Owner Data size Description ++ GNU 0x[0-9a-f]+ NT_GNU_BUILD_ID \(unique build ID bitstring\) ++ Build ID: [0-9a-f]+ ++ Owner Data size Description ++ GNU 0x[0-9a-f]+ NT_GNU_BUILD_ID \(unique build ID bitstring\) ++ Build ID: [0-9a-f]+ ++#... +diff --git a/ld/testsuite/ld-elf/pr28639d.rd b/ld/testsuite/ld-elf/pr28639d.rd +new file mode 100644 +index 00000000000..897c8493efa +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr28639d.rd +@@ -0,0 +1,4 @@ ++#failif ++#... ++Displaying notes found in: \.note\.gnu\.build-id ++#... +-- + -- 2.25.1
|
|
Re: [PATCH 10/29] meson: upgrade 0.60.1 -> 0.60.2
this breaks gjs also see https://github.com/mesonbuild/meson/issues/9472
toggle quoted messageShow quoted text
On Wed, Dec 8, 2021 at 2:00 PM Alexander Kanavin <alex.kanavin@...> wrote:
|
|
Re: [RFC PATCH 08/10] qemu: remove obsolete support for renamed libtool
Ross Burton <ross@...>
On Fri, 10 Dec 2021 at 15:58, Khem Raj <raj.khem@...> wrote:
Argh.libtool is now longer renamed to ${host}-libtool, soTypo now should be no Dug out git-filter-branch, now fixed in poky-contrib:ross/libtool. Ross
|
|
Re: [PATCH] perf: Tweak for mips n64
Richard Purdie
On Fri, 2021-12-10 at 07:56 -0800, Khem Raj wrote:
In the x86 case, ld looks at the existing object files and sets it's emulation mode accordingly if none were specified. It seems mips lacks this and there was a binutils patch which changed the default which I have dropped in -next. The N32 case is another example of it which we never patched. Unlike the gcc case, there is no option to change the default when compiling binutils. Most of the time we don't need that patch as programs use CC/CCLD for linking and the correct flags are specified there through the gcc driver, perf is the only one in core which seems to use ld directly like this. We could start to try and fix the autodetection for mips in the compiler but for an architecture which has minimal mindshare, I'm not sure it is worth the effort. Using the same approach as we already have for N32 and dropping the patch seemed like the reasonable course of action? Cheers, Richard
|
|
Re: [RFC PATCH 08/10] qemu: remove obsolete support for renamed libtool
On Fri, Dec 10, 2021 at 6:22 AM Ross Burton <ross@...> wrote: libtool is now longer renamed to ${host}-libtool, so Typo now should be no remove the changes
|
|
Re: [RFC PATCH 01/10] libtool: don't prefix the installed binary
Ross Burton <ross@...>
On Fri, 10 Dec 2021 at 15:17, Khem Raj <raj.khem@...> wrote:
Does it mean that it can now run original libtool script accidentally which is pregenerated part of package which may be not what we wantNot really, if we run libtoolize then we replace any existing libtool binary. If we don't run libtoolize then there isn't our binary in the first place. Also, libtool-cross/libtool-native provide our libtool binary on $PATH. Ross
|
|