package/glibc: Fix x86_64 builds with -Os
PATCH 1/1 package/glibc: Fix x86_64 builds with -Os
Backport upstream commit for x86_64 builds with -Os reported by [1].
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=29576
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/3134229902
https://gitlab.com/buildroot.org/buildroot/-/jobs/3134229956
--- .../0002-x86-Fix-Os-build-BZ-29576.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/glibc/0002-x86-Fix-Os-build-BZ-29576.patch
package/glibc/0002-x86-Fix-Os-build-BZ-29576.patch new file +48 -0
@@ -0,0 +1,48 @@ +From 3935b543adcb9a46ab79f8931bc489068b049378 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella Netto <[email protected]> +Date: Wed, 21 Sep 2022 10:51:08 -0300 +Subject: [PATCH] x86: Fix -Os build (BZ #29576) + +The compiler might transform __stpcpy calls (which are routed to +__builtin_stpcpy as an optimization) to strcpy and x86_64 strcpy +multiarch implementation does not build any working symbol due +ISA_SHOULD_BUILD not being evaluated for IS_IN(rtld). + +Checked on x86_64-linux-gnu. +Reviewed-by: Carlos O'Donell <[email protected]> +Tested-by: Carlos O'Donell <[email protected]> + +(cherry picked from commit 9dc4e29f630c6ef8299120b275e503321dc0c8c7) +Signed-off-by: Romain Naour <[email protected]> +--- + 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" +-- +2.34.3 +
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines · Romain Naour
Backport upstream commit for
x86_64builds with -Os reported by [1].[1] https://sourceware.org/bugzilla/show_bug.cgi?id=29576
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/3134229902
https://gitlab.com/buildroot.org/buildroot/-/jobs/3134229956
I think this also fixes an issue in autobuilders, see:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
http://autobuild.buildroot.net/results/5b4/5b442f95587ddc65a995bbd9e310c88a66c55b1f
Quoted 2 lines
Signed-off-by Romain Naour <[email protected]>
Quoted 16 lines
--- .../0002-x86-Fix-Os-build-BZ-29576.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/glibc/0002-x86-Fix-Os-build-BZ-29576.patchpackage/glibc/0002-x86-Fix-Os-build-BZ-29576.patch new file +5
-0@@ -0,0 +1,48 @@ +From 3935b543adcb9a46ab79f8931bc489068b049378 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella Netto <[email protected]> +Date: Wed, 21 Sep 2022 10:51:08 -0300 +Subject: [PATCH] x86: Fix -Os build (BZ #29576) +
package/glibc/0002-x86-Fix-Os-build-BZ-29576.patch line 15
Quoted 10 lines
package/glibc/0002-x86-Fix-Os-build-BZ-29576.patch new file +10
-0+The compiler might transform __stpcpy calls (which are routed to +__builtin_stpcpy as an optimization) to strcpy and x86_64 strcpy +multiarch implementation does not build any working symbol due +ISA_SHOULD_BUILD not being evaluated for IS_IN(rtld). + +Checked on x86_64-linux-gnu. +Reviewed-by: Carlos O'Donell <[email protected]> +Tested-by: Carlos O'Donell <[email protected]> + +(cherry picked from commit 9dc4e29f630c6ef8299120b275e503321dc0c8c7)
This is probably better than mine since I had applied from patchwork before it was applied upstream.
Quoted 36 lines
package/glibc/0002-x86-Fix-Os-build-BZ-29576.patch new file +33
-1+Signed-off-by: Romain Naour <[email protected]> +--- + 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" +-- +2.34.3 + --2.34.3
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello James,
Le 10/10/2022 à 01:37, James Hilliard a écrit :
Quoted 12 lines · Romain Naour
Quoted 8 lines
Backport upstream commit for
x86_64builds with -Os reported by [1].[1] https://sourceware.org/bugzilla/show_bug.cgi?id=29576
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/3134229902
https://gitlab.com/buildroot.org/buildroot/-/jobs/3134229956I think this also fixes an issue in autobuilders, see:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
Sorry I missed it in the patchwork it was on the second page already...
Quoted 29 lines
http://autobuild.buildroot.net/results/5b4/5b442f95587ddc65a995bbd9e310c88a66c55b1f
Quoted 2 lines
Signed-off-by Romain Naour <[email protected]>Reviewed-by James Hilliard <[email protected]>Quoted 21 lines
--- .../0002-x86-Fix-Os-build-BZ-29576.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/glibc/0002-x86-Fix-Os-build-BZ-29576.patchpackage/glibc/0002-x86-Fix-Os-build-BZ-29576.patch new file +10
-0@@ -0,0 +1,48 @@ +From 3935b543adcb9a46ab79f8931bc489068b049378 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella Netto <[email protected]> +Date: Wed, 21 Sep 2022 10:51:08 -0300 +Subject: [PATCH] x86: Fix -Os build (BZ #29576) + +The compiler might transform __stpcpy calls (which are routed to +__builtin_stpcpy as an optimization) to strcpy and x86_64 strcpy +multiarch implementation does not build any working symbol due +ISA_SHOULD_BUILD not being evaluated for IS_IN(rtld). +
Quoted 8 lines
package/glibc/0002-x86-Fix-Os-build-BZ-29576.patch line 15
Quoted 5 lines
package/glibc/0002-x86-Fix-Os-build-BZ-29576.patch new file +5
-0+Checked on x86_64-linux-gnu. +Reviewed-by: Carlos O'Donell <[email protected]> +Tested-by: Carlos O'Donell <[email protected]> + +(cherry picked from commit 9dc4e29f630c6ef8299120b275e503321dc0c8c7)This is probably better than mine since I had applied from patchwork before it was applied upstream.
Yes maybe... even it doesn't come from the 2.36 stable branch. I replied on the bug report, so the commit may be backported soon.
Best regards,
Romain
Quoted 37 lines
Quoted 37 lines
package/glibc/0002-x86-Fix-Os-build-BZ-29576.patch new file +33
-1+Signed-off-by: Romain Naour <[email protected]> +--- + 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" +-- +2.34.3 + --2.34.3
Quoted 8 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi there,
Not sure if this is the correct place to follow-up but I'm wondering why this patch/backport hasn't yet been committed to 'master' (these x86_64 'glibc' autobuild failures appear to still be occurring)?
Regards,
-David
Quoted 91 lines · On Monday, October 10, 2022 12:35 AM, buildroot…
Hello James,
Quoted 29 lines · James Hilliard
Quoted 12 lines · Romain Naour
Backport upstream commit for
x86_64builds with -Os reported by [1].[1]
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fso
urceware.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D29576&data=05%7C01% 7Cdavidh%40netacquire.com%7C1d8703ac22ce434eb90108daaa91f777%7Cec65e1 8eede24cedbdab49355e3f602d%7C0%7C0%7C638009841155558315%7CUnknown%7CT WFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVC I6Mn0%3D%7C3000%7C%7C%7C&sdata=kM71qKfb2s%2FJpdiq7raXX5QGiCZSgYG5 %2BF7sDJsivHs%3D&reserved=0Quoted 15 lines
Fixes:
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fgi
tlab.com%2Fbuildroot.org%2Fbuildroot%2F-%2Fjobs%2F3134229902&data =05%7C01%7Cdavidh%40netacquire.com%7C1d8703ac22ce434eb90108daaa91f777 %7Cec65e18eede24cedbdab49355e3f602d%7C0%7C0%7C638009841155558315%7CUn known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1ha WwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=nLa36c%2FtkIs3S6dkSlmJ2QA 6C4sHpmeg5ZxrXheTjes%3D&reserved=0
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fgi
tlab.com%2Fbuildroot.org%2Fbuildroot%2F-%2Fjobs%2F3134229956&data =05%7C01%7Cdavidh%40netacquire.com%7C1d8703ac22ce434eb90108daaa91f777 %7Cec65e18eede24cedbdab49355e3f602d%7C0%7C0%7C638009841155558315%7CUn known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1ha WwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=z7VVflV9eoBkHtPjL6DF8qQnC %2FyBUmXxARjDgo6DErA%3D&reserved=0Quoted 9 lines
I think this also fixes an issue in autobuilders, see:
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fpat
chwork.ozlabs.org%2Fproject%2Fbuildroot%2Fpatch%2F20220927031702.29184 14-1-james.hilliard1%40gmail.com%2F&data=05%7C01%7Cdavidh%40netacq uire.com%7C1d8703ac22ce434eb90108daaa91f777%7Cec65e18eede24cedbdab4935 5e3f602d%7C0%7C0%7C638009841155558315%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7 C%7C&sdata=%2Fk1U8hJG0c8ms2%2F0zEeQu2Z8PQA%2BvSVoGTjO50qMfIo%3D&am p;reserved=0Sorry I missed it in the patchwork it was on the second page already...
Quoted 38 lines
https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Fauto
build.buildroot.net%2Fresults%2F5b4%2F5b442f95587ddc65a995bbd9e310c88a 66c55b1f&data=05%7C01%7Cdavidh%40netacquire.com%7C1d8703ac22ce434e b90108daaa91f777%7Cec65e18eede24cedbdab49355e3f602d%7C0%7C0%7C63800984 1155558315%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=rn7GhsxgoxAG Qofv375ApEGTHMKtCiAz4s6e10yLe9A%3D&reserved=0Quoted 2 lines
Signed-off-by Romain Naour <[email protected]>Reviewed-by James Hilliard <[email protected]>Quoted 24 lines
--- .../0002-x86-Fix-Os-build-BZ-29576.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644
package/glibc/0002-x86-Fix-Os-build-BZ-29576.patchpackage/glibc/0002-x86-Fix-Os-build-BZ-29576.patch new file +11
-0@@ -0,0 +1,48 @@ +From 3935b543adcb9a46ab79f8931bc489068b049378 Mon Sep 17 00:00:00 +2001 +From: Adhemerval Zanella Netto <[email protected]> +Date: Wed, 21 Sep 2022 10:51:08 -0300 +Subject: [PATCH] x86: Fix -Os build (BZ #29576) + +The compiler might transform __stpcpy calls (which are routed to +__builtin_stpcpy as an optimization) to strcpy and x86_64 strcpy +multiarch implementation does not build any working symbol due +ISA_SHOULD_BUILD not being evaluated for IS_IN(rtld). +Quoted 8 lines
package/glibc/0002-x86-Fix-Os-build-BZ-29576.patch line 15
Quoted 5 lines
package/glibc/0002-x86-Fix-Os-build-BZ-29576.patch new file +5
-0+Checked on x86_64-linux-gnu. +Reviewed-by: Carlos O'Donell <[email protected]> +Tested-by: Carlos O'Donell <[email protected]> + +(cherry picked from commit 9dc4e29f630c6ef8299120b275e503321dc0c8c7)This is probably better than mine since I had applied from patchwork before it was applied upstream.
Quoted 72 lines
Yes maybe... even it doesn't come from the 2.36 stable branch. I replied on the bug report, so the commit may be backported soon.
Best regards,
RomainQuoted 65 lines
Quoted 45 lines
package/glibc/0002-x86-Fix-Os-build-BZ-29576.patch new file +41
-1+Signed-off-by: Romain Naour <[email protected]> +--- + 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://usg02.safelinks.protection.office365.us/?url=https%3A%2F% ++ 2Fwww.gnu.org%2Flicenses%2F&data=05%7C01%7Cdavidh%40netacquire ++ .com%7C1d8703ac22ce434eb90108daaa91f777%7Cec65e18eede24cedbdab4935 ++ 5e3f602d%7C0%7C0%7C638009841155558315%7CUnknown%7CTWFpbGZsb3d8eyJW ++ IjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3 ++ 000%7C%7C%7C&sdata=HK7%2FnPI%2Fo9tp%2FG2N3gDgo%2BIo5vMUfQdrh7d ++ 1JIPRYgU%3D&reserved=0>. */ ++ ++#include "../strcpy.S" +-- +2.34.3 + --2.34.3
Quoted 10 lines
_______________________________________________
buildroot mailing list
[email protected]
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fli
sts.buildroot.org%2Fmailman%2Flistinfo%2Fbuildroot&data=05%7C01%7 Cdavidh%40netacquire.com%7C1d8703ac22ce434eb90108daaa91f777%7Cec65e18 eede24cedbdab49355e3f602d%7C0%7C0%7C638009841155558315%7CUnknown%7CTW FpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI 6Mn0%3D%7C3000%7C%7C%7C&sdata=iK4ThBYjF%2BC4i9HrvoUnw%2FUQCK4Sn%2 B6mrl0m6txsY5g%3D&reserved=0_______________________________________________
buildroot mailing list
[email protected]
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Flis
ts.buildroot.org%2Fmailman%2Flistinfo%2Fbuildroot&data=05%7C01%7Cd avidh%40netacquire.com%7C1d8703ac22ce434eb90108daaa91f777%7Cec65e18eed e24cedbdab49355e3f602d%7C0%7C0%7C638009841155558315%7CUnknown%7CTWFpbG Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0% 3D%7C3000%7C%7C%7C&sdata=iK4ThBYjF%2BC4i9HrvoUnw%2FUQCK4Sn%2B6mrl0 m6txsY5g%3D&reserved=0
_______________________________________________ buildroot mailing list [email protected]
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Flists.buildroot.org%2Fmailman
%2Flistinfo%2Fbuildroot&data=05%7C01%7Cdavidh%40netacquire.com%7C1d8703ac22ce434eb9 0108daaa91f777%7Cec65e18eede24cedbdab49355e3f602d%7C0%7C0%7C638009841155558315%7CUn known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0% 3D%7C3000%7C%7C%7C&sdata=iK4ThBYjF%2BC4i9HrvoUnw%2FUQCK4Sn%2B6mrl0m6txsY5g%3 D&reserved=0 External Email Warning! Use caution before clicking links or opening attachments.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 8 lines · On Sun, 9 Oct 2022 17:35:21 +0200 Romain Naour <[email protected]> wrote:
Backport upstream commit for
x86_64builds with -Os reported by [1].[1] https://sourceware.org/bugzilla/show_bug.cgi?id=29576
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/3134229902
https://gitlab.com/buildroot.org/buildroot/-/jobs/3134229956
Quoted 5 lines
Signed-off-by Romain Naour <[email protected]>--- .../0002-x86-Fix-Os-build-BZ-29576.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/glibc/0002-x86-Fix-Os-build-BZ-29576.patch
Applied to master, thanks.
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot