glibc: fix new upstream build issue with DEBUG_BUILD build
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 glibc: fix new upstream build issue with DEBUG_BUILD build
* fix SRCREV to match with glibc-2.36 tag
* refresh 0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch (just different commit SHA in master and 2.35 branch)
* add proposed fixes for build failure with DEBUG_BUILD:
http://errors.yoctoproject.org/Errors/Details/663898/
86_64-oe-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0=/usr/src/debug/glibc/2.36-r0 -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0=/usr/src/debug/glibc/2.36-r0 -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot= -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now -fuse-ld=bfd -nostdlib -nostartfiles -r -o TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/librtld.os '-Wl,-(' TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/dl-allobjs.os TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/rtld-libc.a -lgcc '-Wl,-)' \
-Wl,-Map,TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/librtld.os.map
x86_64-oe-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0=/usr/src/debug/glibc/2.36-r0 -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0=/usr/src/debug/glibc/2.36-r0 -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot= -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now -fuse-ld=bfd -nostdlib -nostartfiles -shared -o TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/ld.so.new \
-Wl,-z,relro -Wl,-z,defs -Wl,-z,now \
-Wl,-z,pack-relative-relocs \
TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/librtld.os -Wl,--version-script=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/ld.map \
-Wl,-soname=ld-linux-x86-64.so.2TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/12.1.0/ld.bfd: TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/librtld.os: in function `_dl_load_cache_lookup':/usr/src/debug/glibc/2.36-r0/git/elf/dl-cache.c:513: undefined reference to `strcpy'
collect2: error: ld returned 1 exit status
introduced in 2.36 version, with:
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=6b9006bfb0
upstream report with this fix proposed:
https://sourceware.org/bugzilla/show_bug.cgi?id=29454
--- meta/recipes-core/glibc/glibc-version.inc | 2 +- ...lement-a-useful-version-of-_startup_.patch | 8 ++--- .../0002-x86-Fix-STRCPY-symbol-name.patch | 23 ++++++++++++ .../glibc/0003-Add-RTLD-hook-for-strcpy.patch | 35 +++++++++++++++++++ meta/recipes-core/glibc/glibc_2.36.bb | 2 ++ 5 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-core/glibc/glibc/0002-x86-Fix-STRCPY-symbol-name.patch create mode 100644 meta/recipes-core/glibc/glibc/0003-Add-RTLD-hook-for-strcpy.patch
meta/recipes-core/glibc/glibc-version.inc +1 -1
@@ -1,6 +1,6 @@ SRCBRANCH ?= "release/2.36/master" PV = "2.36" -SRCREV_glibc ?= "c74bb93cfdb04d49155b0e30983a3c866167bbca" +SRCREV_glibc ?= "c804cd1c00adde061ca51711f63068c103e94eef" SRCREV_localedef ?= "794da69788cbf9bf57b59a852f9f11307663fa87" GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
meta/recipes-core/glibc/glibc/0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch +4 -4
@@ -1,13 +1,13 @@ -From 6b8959add09e425df262bf9178b39ca35bc4003c Mon Sep 17 00:00:00 2001 +From 464f0a4f53fc68758760a34199a257d0ec0775d4 Mon Sep 17 00:00:00 2001 From: Martin Jansa <[email protected]> -Date: Sun, 24 Jul 2022 19:41:41 +0200 +Date: Sun, 7 Aug 2022 12:51:48 +0200 Subject: [PATCH] Revert "Linux: Implement a useful version of _startup_fatal" -This reverts commit 2d05ba7f8ef979947e910a37ae8115a816eb4d08. +This reverts commit a2a6bce7d7e52c1c34369a7da62c501cc350bc31. + Upstream-Status: Inappropriate [temporary work around] Signed-off-by: Martin Jansa <[email protected]> - --- sysdeps/unix/sysv/linux/i386/startup.h | 23 ++++++++++++--- sysdeps/unix/sysv/linux/ia64/startup.h | 22 ---------------
meta/recipes-core/glibc/glibc/0002-x86-Fix-STRCPY-symbol-name.patch new file +23 -0
@@ -0,0 +1,23 @@ +From 67aa386a4b5ff54994e157875f3abe99763b5bf7 Mon Sep 17 00:00:00 2001 +From: Noah Goldstein <[email protected]> +Date: Sun, 7 Aug 2022 22:42:30 +0800 +Subject: [PATCH] x86: Fix STRCPY symbol name + +Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=29454] +--- + sysdeps/x86_64/multiarch/strcpy-sse2.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sysdeps/x86_64/multiarch/strcpy-sse2.S b/sysdeps/x86_64/multiarch/strcpy-sse2.S +index e29b411314..d6b9bae5f8 100644 +--- a/sysdeps/x86_64/multiarch/strcpy-sse2.S ++++ b/sysdeps/x86_64/multiarch/strcpy-sse2.S +@@ -22,7 +22,7 @@ + + # include <sysdep.h> + +-# ifndef STPCPY ++# ifndef STRCPY + # define STRCPY __strcpy_sse2 + # endif +
meta/recipes-core/glibc/glibc/0003-Add-RTLD-hook-for-strcpy.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 64351e4b48a02c453ca9ed667d358ad44df6bf93 Mon Sep 17 00:00:00 2001 +From: Noah Goldstein <[email protected]> +Date: Sun, 7 Aug 2022 23:54:19 +0800 +Subject: [PATCH] Add RTLD hook for strcpy + +Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=29454] +--- + sysdeps/x86_64/multiarch/rtld-strcpy.S | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + create mode 100644 sysdeps/x86_64/multiarch/rtld-strcpy.S + +diff --git a/sysdeps/x86_64/multiarch/rtld-strcpy.S b/sysdeps/x86_64/multiarch/rtld-strcpy.S +new file mode 100644 +index 0000000000..19439c553d +--- /dev/null ++++ b/sysdeps/x86_64/multiarch/rtld-strcpy.S +@@ -0,0 +1,18 @@ ++/* Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library 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 ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include "../strcpy.S"
meta/recipes-core/glibc/glibc_2.36.bb +2 -0
@@ -52,6 +52,8 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0024-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch \ \ file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ + file://0002-x86-Fix-STRCPY-symbol-name.patch \ + file://0003-Add-RTLD-hook-for-strcpy.patch \ " S = "${WORKDIR}/git" B = "${WORKDIR}/build-${TARGET_SYS}"
Signature · 1 line
2.35.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
The 2nd fix was updated in upstream:
https://sourceware.org/pipermail/libc-alpha/2022-August/141290.html (1st is the same https://sourceware.org/pipermail/libc-alpha/2022-August/141289.html
)
will send updated version, once the final fix is merged in master branch (or SRCREV update once it gets merged in releases/2.38/master branch).
Quoted 221 lines · Martin Jansa via lists.openembedded.org
* fix SRCREV to match with glibc-2.36 tag
* refresh 0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch (just different commit SHA in master and 2.35 branch)* add proposed fixes for build failure with
DEBUG_BUILD:
http://errors.yoctoproject.org/Errors/Details/663898/86_64-oe-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot
(quoted diff) +0
-6-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0=/usr/src/debug/glibc/2.36-r0 -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0=/usr/src/debug/glibc/2.36-r0 -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot= -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now -fuse-ld=bfd -nostdlib -nostartfiles -r -oTOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/librtld.os '-Wl,-(' TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/dl-allobjs.os TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/rtld-libc.a
(quoted diff) +0
-2-lgcc '-Wl,-)' \ -Wl,-Map,TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/librtld.os.mapx86_64-oe-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot
(quoted diff) +0
-6-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0=/usr/src/debug/glibc/2.36-r0 -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0=/usr/src/debug/glibc/2.36-r0 -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot= -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now -fuse-ld=bfd -nostdlib -nostartfiles -shared -oTOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/ld.so.new
\ -Wl,-z,relro -Wl,-z,defs -Wl,-z,now \ -Wl,-z,pack-relative-relocs \TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/librtld.os -Wl,--version-script=TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/ld.map
\ -Wl,-soname=ld-linux-x86-64.so.2TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/../../libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/12.1.0/ld.bfd:
TOPDIR/tmp-glibc/work/core2-64-oe-linux/glibc/2.36-r0/build-x86_64-oe-linux/elf/librtld.os:
in function `_dl_load_cache_lookup':/usr/src/debug/glibc/2.36-r0/git/elf/dl-cache.c:513: undefined reference
to `strcpy'
collect2: error: ld returned 1 exit statusintroduced in 2.36 version, with:
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=6b9006bfb0upstream report with this fix proposed:
https://sourceware.org/bugzilla/show_bug.cgi?id=29454Signed-off-by Martin Jansa <[email protected]>--- meta/recipes-core/glibc/glibc-version.inc | 2 +- ...lement-a-useful-version-of-_startup_.patch | 8 ++--- .../0002-x86-Fix-STRCPY-symbol-name.patch | 23 ++++++++++++ .../glibc/0003-Add-RTLD-hook-for-strcpy.patch | 35 +++++++++++++++++++ meta/recipes-core/glibc/glibc_2.36.bb | 2 ++ 5 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-core/glibc/glibc/0002-x86-Fix-STRCPY-symbol-name.patch create mode 100644
meta/recipes-core/glibc/glibc/0003-Add-RTLD-hook-for-strcpy.patchmeta/recipes-core/glibc/glibc-version.inc +1
-1@@ -1,6 +1,6 @@ SRCBRANCH ?= "release/2.36/master" PV = "2.36" -SRCREV_glibc ?= "c74bb93cfdb04d49155b0e30983a3c866167bbca" +SRCREV_glibc ?= "c804cd1c00adde061ca51711f63068c103e94eef" SRCREV_localedef ?= "794da69788cbf9bf57b59a852f9f11307663fa87" GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"diff --git
a/meta/recipes-core/glibc/glibc/0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patchb/meta/recipes-core/glibc/glibc/0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patchindex2421a63605..befac35e84100644
---a/meta/recipes-core/glibc/glibc/0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch
+++b/meta/recipes-core/glibc/glibc/0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patchmeta/recipes-core/glibc/glibc-version.inc +2
-2@@ -1,13 +1,13 @@ -From 6b8959add09e425df262bf9178b39ca35bc4003c Mon Sep 17 00:00:00 2001 +From 464f0a4f53fc68758760a34199a257d0ec0775d4 Mon Sep 17 00:00:00 2001 From: Martin Jansa <[email protected]> -Date: Sun, 24 Jul 2022 19:41:41 +0200 +Date: Sun, 7 Aug 2022 12:51:48 +0200 Subject: [PATCH] Revert "Linux: Implement a useful version of
_startup_fatal"meta/recipes-core/glibc/glibc-version.inc +2
-2-This reverts commit 2d05ba7f8ef979947e910a37ae8115a816eb4d08. +This reverts commit a2a6bce7d7e52c1c34369a7da62c501cc350bc31. + Upstream-Status: Inappropriate [temporary work around] Signed-off-by: Martin Jansa <[email protected]> - --- sysdeps/unix/sysv/linux/i386/startup.h | 23 ++++++++++++--- sysdeps/unix/sysv/linux/ia64/startup.h | 22 ---------------diff --git
a/meta/recipes-core/glibc/glibc/0002-x86-Fix-STRCPY-symbol-name.patchb/meta/recipes-core/glibc/glibc/0002-x86-Fix-STRCPY-symbol-name.patchnew file mode 100644
index 0000000000..326aca6e0cmeta/recipes-core/glibc/glibc/0002-x86-Fix-STRCPY-symbol-name.patch new file +6
-0@@ -0,0 +1,23 @@ +From 67aa386a4b5ff54994e157875f3abe99763b5bf7 Mon Sep 17 00:00:00 2001 +From: Noah Goldstein <[email protected]> +Date: Sun, 7 Aug 2022 22:42:30 +0800 +Subject: [PATCH] x86: Fix STRCPY symbol name + +Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=29454]
+--- + sysdeps/x86_64/multiarch/strcpy-sse2.S | 2 +-+ 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc/0002-x86-Fix-STRCPY-symbol-name.patch new file +2
-0+ +diff --git a/sysdeps/x86_64/multiarch/strcpy-sse2.S
b/sysdeps/x86_64/multiarch/strcpy-sse2.Smeta/recipes-core/glibc/glibc/0002-x86-Fix-STRCPY-symbol-name.patch new file +12
-0+index e29b411314..d6b9bae5f8 100644 +--- a/sysdeps/x86_64/multiarch/strcpy-sse2.S ++++ b/sysdeps/x86_64/multiarch/strcpy-sse2.S +@@ -22,7 +22,7 @@ + + # include <sysdep.h> + +-# ifndef STPCPY ++# ifndef STRCPY + # define STRCPY __strcpy_sse2 + # endif +diff --git
a/meta/recipes-core/glibc/glibc/0003-Add-RTLD-hook-for-strcpy.patchb/meta/recipes-core/glibc/glibc/0003-Add-RTLD-hook-for-strcpy.patchnew file mode 100644
index 0000000000..64a7a307femeta/recipes-core/glibc/glibc/0003-Add-RTLD-hook-for-strcpy.patch new file +6
-0@@ -0,0 +1,35 @@ +From 64351e4b48a02c453ca9ed667d358ad44df6bf93 Mon Sep 17 00:00:00 2001 +From: Noah Goldstein <[email protected]> +Date: Sun, 7 Aug 2022 23:54:19 +0800 +Subject: [PATCH] Add RTLD hook for strcpy + +Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=29454]
+--- + sysdeps/x86_64/multiarch/rtld-strcpy.S | 18 +++++++++++++++++++ 1 file changed, 18 insertions(+)
+ create mode 100644sysdeps/x86_64/multiarch/rtld-strcpy.Smeta/recipes-core/glibc/glibc/0003-Add-RTLD-hook-for-strcpy.patch new file +2
-0+ +diff --git a/sysdeps/x86_64/multiarch/rtld-strcpy.S
b/sysdeps/x86_64/multiarch/rtld-strcpy.Smeta/recipes-core/glibc/glibc/0003-Add-RTLD-hook-for-strcpy.patch new file +23
-0+new file mode 100644 +index 0000000000..19439c553d +--- /dev/null ++++ b/sysdeps/x86_64/multiarch/rtld-strcpy.S +@@ -0,0 +1,18 @@ ++/* Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library 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 ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include "../strcpy.S"meta/recipes-core/glibc/glibc_2.36.bb +2
-0@@ -52,6 +52,8 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0024-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch \ \ file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ + file://0002-x86-Fix-STRCPY-symbol-name.patch \ + file://0003-Add-RTLD-hook-for-strcpy.patch \"S = "${WORKDIR}/git"
B = "${WORKDIR}/build-${TARGET_SYS}"
--
2.35.1-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#168997):
https://lists.openembedded.org/g/openembedded-core/message/168997
Mute This Topic: https://lists.openembedded.org/mt/92874008/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-