* [Buildroot] [PATCH v2, 1/2] toolchain: add BR2_TOOLCHAIN_HAS_GCC_BUG_101766 @ 2024-01-16 6:58 Fabrice Fontaine 2024-01-16 6:58 ` [Buildroot] [PATCH v2, 2/2] package/attr: affected by gcc bug 101766 Fabrice Fontaine 0 siblings, 1 reply; 9+ messages in thread From: Fabrice Fontaine @ 2024-01-16 6:58 UTC (permalink / raw) To: buildroot Cc: Giulio Benetti, Sen Hastings, Thomas Petazzoni, Romain Naour, Fabrice Fontaine, Yann E . MORIN, Thomas De Schampheleire, Norbert Lange BR2_TOOLCHAIN_HAS_GCC_BUG_101766 will be used to fix a build a build failure on attr and elfutils with microblaze Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- toolchain/Config.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/toolchain/Config.in b/toolchain/Config.in index f1f9212f25..dc4e52bb3d 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -210,6 +210,14 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_101737 bool default y if BR2_sh +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766 +# Microblaze gcc can't use .symver attribute leading to: +# error: symver is only supported on ELF platforms +# however __has_attribute(symver) returns true +config BR2_TOOLCHAIN_HAS_GCC_BUG_101766 + bool + default y if BR2_microblaze || BR2_microblazeel + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101915 # ICE: in extract_insn, at recog.c:2294 on microblaze. # This bug still exists in gcc = 12.1.0 -- 2.43.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH v2, 2/2] package/attr: affected by gcc bug 101766 2024-01-16 6:58 [Buildroot] [PATCH v2, 1/2] toolchain: add BR2_TOOLCHAIN_HAS_GCC_BUG_101766 Fabrice Fontaine @ 2024-01-16 6:58 ` Fabrice Fontaine 2024-02-06 15:11 ` Thomas Petazzoni via buildroot 0 siblings, 1 reply; 9+ messages in thread From: Fabrice Fontaine @ 2024-01-16 6:58 UTC (permalink / raw) To: buildroot Cc: Giulio Benetti, Sen Hastings, Thomas Petazzoni, Romain Naour, Fabrice Fontaine, Yann E . MORIN, Thomas De Schampheleire, Norbert Lange attr is affected by gcc bug 101766 since version 1.5.2 and https://git.savannah.nongnu.org/cgit/attr.git/commit/?id=11b9069098b4d4c23efb06c9457a085b784354d4 resulting in the following build failure on microblaze since commit b31b91296e7f985b909f104f06a098adddef1fea: libattr/syscalls.c:133:10: error: symver is only supported on ELF platforms 133 | # pragma GCC visibility pop | ^~~ So let's disable package attr and packages depending on it. Fixes: - http://autobuild.buildroot.org/results/29c76e02becedf922bd7dc0533338c078bf77d2a Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- Changes v1 -> v2 (after review of Giulio Benetti): - Update commit log - Update casync and lua-flu package/acl/Config.in | 4 ++++ package/attr/Config.in | 4 ++++ package/casync/Config.in | 4 ++++ package/lua-flu/Config.in | 4 ++++ package/systemd/Config.in | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/package/acl/Config.in b/package/acl/Config.in index 92f2251878..132c6e8ad3 100644 --- a/package/acl/Config.in +++ b/package/acl/Config.in @@ -1,5 +1,6 @@ config BR2_PACKAGE_ACL bool "acl" + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_101766 # attr select BR2_PACKAGE_ATTR help POSIX Access Control Lists, which are used to define more @@ -8,3 +9,6 @@ config BR2_PACKAGE_ACL This package also provides libacl. http://savannah.nongnu.org/projects/acl + +comment "acl needs a toolchain not affected by GCC bug 101766" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_101766 diff --git a/package/attr/Config.in b/package/attr/Config.in index 554772b75d..b9d9f57d8f 100644 --- a/package/attr/Config.in +++ b/package/attr/Config.in @@ -1,7 +1,11 @@ config BR2_PACKAGE_ATTR bool "attr" + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_101766 help Commands for Manipulating Filesystem Extended Attributes. This package also provides libattr. http://savannah.nongnu.org/projects/attr + +comment "attr needs a toolchain not affected by GCC bug 101766" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_101766 diff --git a/package/casync/Config.in b/package/casync/Config.in index 89a9520e35..c5be9b521e 100644 --- a/package/casync/Config.in +++ b/package/casync/Config.in @@ -1,6 +1,7 @@ config BR2_PACKAGE_CASYNC bool "casync" depends on BR2_TOOLCHAIN_USES_GLIBC # scandirat() is not implemented by musl and uclibc-ng + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_101766 # acl select BR2_PACKAGE_ACL select BR2_PACKAGE_LIBCURL select BR2_PACKAGE_OPENSSL @@ -11,3 +12,6 @@ config BR2_PACKAGE_CASYNC comment "casync needs a glibc toolchain" depends on !BR2_TOOLCHAIN_USES_GLIBC + +comment "casync needs a toolchain not affected by GCC bug 101766" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_101766 diff --git a/package/lua-flu/Config.in b/package/lua-flu/Config.in index 9b55ce5ab0..ae343866c8 100644 --- a/package/lua-flu/Config.in +++ b/package/lua-flu/Config.in @@ -4,6 +4,7 @@ config BR2_PACKAGE_LUA_FLU depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse depends on BR2_USE_MMU # libfuse depends on !BR2_PACKAGE_LUA_5_4 + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_101766 # attr select BR2_PACKAGE_ATTR select BR2_PACKAGE_LIBFUSE help @@ -17,3 +18,6 @@ config BR2_PACKAGE_LUA_FLU comment "lua-flu needs a toolchain w/ threads, dynamic library, Lua <= 5.3" depends on BR2_USE_MMU depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || BR2_PACKAGE_LUA_5_4 + +comment "lua-flu needs a toolchain not affected by GCC bug 101766" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_101766 diff --git a/package/systemd/Config.in b/package/systemd/Config.in index 859332d9e4..f0f92b78b0 100644 --- a/package/systemd/Config.in +++ b/package/systemd/Config.in @@ -451,6 +451,7 @@ config BR2_PACKAGE_SYSTEMD_RFKILL config BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT bool "enable SMACK support" + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_101766 # attr select BR2_PACKAGE_ATTR select BR2_PACKAGE_SMACK help @@ -463,6 +464,9 @@ config BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT When this feature is enabled, Systemd mounts smackfs and manages security labels for sockets. +comment "SMACK support needs a toolchain not affected by GCC bug 101766" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_101766 + config BR2_PACKAGE_SYSTEMD_SYSEXT bool "enable sysext support" help -- 2.43.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Buildroot] [PATCH v2, 2/2] package/attr: affected by gcc bug 101766 2024-01-16 6:58 ` [Buildroot] [PATCH v2, 2/2] package/attr: affected by gcc bug 101766 Fabrice Fontaine @ 2024-02-06 15:11 ` Thomas Petazzoni via buildroot 2024-02-06 15:20 ` Giulio Benetti 2024-02-06 15:54 ` [Buildroot] [PATCH] package/attr: fix build failure on Microblaze architecture Giulio Benetti 0 siblings, 2 replies; 9+ messages in thread From: Thomas Petazzoni via buildroot @ 2024-02-06 15:11 UTC (permalink / raw) To: Fabrice Fontaine Cc: Sen Hastings, Yann E . MORIN, buildroot, Romain Naour, Giulio Benetti, Thomas De Schampheleire, Norbert Lange [-- Attachment #1: Type: text/plain, Size: 1564 bytes --] Hello Fabrice, On Tue, 16 Jan 2024 07:58:31 +0100 Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > attr is affected by gcc bug 101766 since version 1.5.2 and > https://git.savannah.nongnu.org/cgit/attr.git/commit/?id=11b9069098b4d4c23efb06c9457a085b784354d4 > resulting in the following build failure on microblaze since commit > b31b91296e7f985b909f104f06a098adddef1fea: > > libattr/syscalls.c:133:10: error: symver is only supported on ELF platforms > 133 | # pragma GCC visibility pop > | ^~~ > > So let's disable package attr and packages depending on it. > > Fixes: > - http://autobuild.buildroot.org/results/29c76e02becedf922bd7dc0533338c078bf77d2a > > Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> I don't like this very much. It's annoying to propagate this dependency to all reverse dependencies of attr, and make it unavailable on Microblaze for this silly reason. So I came up with the attached patch for attr, which rather detects if __attribute__(__symver__) works or not, and fall backs to another mechanism if not (this fallback already exists in the attr code). Could you have a look at my proposal, and if it suits you, submit it upstream and as a patch to Buildroot ? :-) (Yeah, I know I'm pushing some of the work for you, my goal is to be able to continue review/merge other patches) Thanks a lot! Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com [-- Attachment #2: 0001-configure.ac-add-detection-of-symver-gcc-attribute.patch --] [-- Type: text/x-patch, Size: 1668 bytes --] From 1be7c2251040f1152de9ceb5263e6e96fa5c3d75 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Date: Tue, 6 Feb 2024 15:33:15 +0100 Subject: [PATCH] configure.ac: add detection of symver gcc attribute Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> --- configure.ac | 15 +++++++++++++++ libattr/syscalls.c | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7e362e9..98477b5 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,21 @@ AS_CASE([$host_os], [linux*], [os_linux=yes]) AM_CONDITIONAL([OS_LINUX], [test "x$os_linux" = "xyes"]) +AC_CACHE_CHECK(whether __attribute__((__symver__())) is supported, + gcc_cv_symver_attribute, + [cat > conftest.c <<EOF +void foo (void) {} +__typeof(foo) foo __attribute__ ((__symver__("foo@foo"))); +EOF + gcc_cv_symver_attribute=no + if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then \ + gcc_cv_symver_attribute=yes + fi + rm -f conftest.[cs] +]) +AS_IF([test $gcc_cv_symver_attribute = yes], + [AC_DEFINE(HAVE_SYMVER_ATTRIBUTE, [], [GCC supports symver attribute])]) + AC_CONFIG_COMMANDS([include/attr], [dnl rm -rf include/attr diff --git a/libattr/syscalls.c b/libattr/syscalls.c index 907560a..caa70bc 100644 --- a/libattr/syscalls.c +++ b/libattr/syscalls.c @@ -32,7 +32,7 @@ * fall back to traditional .symver asm directive otherwise. */ #ifdef __has_attribute -# if __has_attribute(__symver__) +# if defined(HAVE_SYMVER_ATTRIBUTE) # define SYMVER(cn, vn) __typeof(cn) cn __attribute__((__symver__(vn))) # elif __has_attribute(__no_reorder__) /* -- 2.43.0 [-- Attachment #3: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Buildroot] [PATCH v2, 2/2] package/attr: affected by gcc bug 101766 2024-02-06 15:11 ` Thomas Petazzoni via buildroot @ 2024-02-06 15:20 ` Giulio Benetti 2024-02-06 15:54 ` [Buildroot] [PATCH] package/attr: fix build failure on Microblaze architecture Giulio Benetti 1 sibling, 0 replies; 9+ messages in thread From: Giulio Benetti @ 2024-02-06 15:20 UTC (permalink / raw) To: Thomas Petazzoni, Fabrice Fontaine Cc: Sen Hastings, Yann E . MORIN, buildroot, Romain Naour, Norbert Lange, Thomas De Schampheleire Hi Thomas, Fabrice, On 06/02/24 16:11, Thomas Petazzoni via buildroot wrote: > Hello Fabrice, > > On Tue, 16 Jan 2024 07:58:31 +0100 > Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > >> attr is affected by gcc bug 101766 since version 1.5.2 and >> https://git.savannah.nongnu.org/cgit/attr.git/commit/?id=11b9069098b4d4c23efb06c9457a085b784354d4 >> resulting in the following build failure on microblaze since commit >> b31b91296e7f985b909f104f06a098adddef1fea: >> >> libattr/syscalls.c:133:10: error: symver is only supported on ELF platforms >> 133 | # pragma GCC visibility pop >> | ^~~ >> >> So let's disable package attr and packages depending on it. >> >> Fixes: >> - http://autobuild.buildroot.org/results/29c76e02becedf922bd7dc0533338c078bf77d2a >> >> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com> >> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > > I don't like this very much. It's annoying to propagate this dependency > to all reverse dependencies of attr, and make it unavailable on > Microblaze for this silly reason. So I came up with the attached patch > for attr, which rather detects if __attribute__(__symver__) works or > not, and fall backs to another mechanism if not (this fallback already > exists in the attr code). > > Could you have a look at my proposal, and if it suits you, submit it > upstream and as a patch to Buildroot ? :-) I deal with attached patch. -- Giulio Benetti CEO&CTO@Benetti Engineering sas > (Yeah, I know I'm pushing some of the work for you, my goal is to be > able to continue review/merge other patches) > > Thanks a lot! > > Thomas > > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] package/attr: fix build failure on Microblaze architecture 2024-02-06 15:11 ` Thomas Petazzoni via buildroot 2024-02-06 15:20 ` Giulio Benetti @ 2024-02-06 15:54 ` Giulio Benetti 2024-02-06 16:05 ` [Buildroot] [External] - " Vincent Fazio 1 sibling, 1 reply; 9+ messages in thread From: Giulio Benetti @ 2024-02-06 15:54 UTC (permalink / raw) To: buildroot, Thomas Petazzoni; +Cc: Giulio Benetti, Fabrice Fontaine On Microblaze architecture __has_attribute(__symver__) support is broken and always return true even if symver is not supported so let's add a local patch pending upstream to detect if symver is supported during autoreconf. Fixes: http://autobuild.buildroot.org/results/29c76e02becedf922bd7dc0533338c078bf77d2a Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> --- ...dd-detection-of-symver-gcc-attribute.patch | 56 +++++++++++++++++++ package/attr/attr.mk | 3 + 2 files changed, 59 insertions(+) create mode 100644 package/attr/0002-configure.ac-add-detection-of-symver-gcc-attribute.patch diff --git a/package/attr/0002-configure.ac-add-detection-of-symver-gcc-attribute.patch b/package/attr/0002-configure.ac-add-detection-of-symver-gcc-attribute.patch new file mode 100644 index 0000000000..15bd266d7b --- /dev/null +++ b/package/attr/0002-configure.ac-add-detection-of-symver-gcc-attribute.patch @@ -0,0 +1,56 @@ +From 1be7c2251040f1152de9ceb5263e6e96fa5c3d75 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> +Date: Tue, 6 Feb 2024 15:33:15 +0100 +Subject: [PATCH] configure.ac: add detection of symver gcc attribute + +Upstream: https://lists.gnu.org/archive/html/savannah-hackers-public/2024-02/msg00009.html + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> +Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> +--- + configure.ac | 15 +++++++++++++++ + libattr/syscalls.c | 2 +- + 2 files changed, 16 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 7e362e9..98477b5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -57,6 +57,21 @@ AS_CASE([$host_os], + [linux*], [os_linux=yes]) + AM_CONDITIONAL([OS_LINUX], [test "x$os_linux" = "xyes"]) + ++AC_CACHE_CHECK(whether __attribute__((__symver__())) is supported, ++ gcc_cv_symver_attribute, ++ [cat > conftest.c <<EOF ++void foo (void) {} ++__typeof(foo) foo __attribute__ ((__symver__("foo@foo"))); ++EOF ++ gcc_cv_symver_attribute=no ++ if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then \ ++ gcc_cv_symver_attribute=yes ++ fi ++ rm -f conftest.[cs] ++]) ++AS_IF([test $gcc_cv_symver_attribute = yes], ++ [AC_DEFINE(HAVE_SYMVER_ATTRIBUTE, [], [GCC supports symver attribute])]) ++ + AC_CONFIG_COMMANDS([include/attr], + [dnl + rm -rf include/attr +diff --git a/libattr/syscalls.c b/libattr/syscalls.c +index 907560a..caa70bc 100644 +--- a/libattr/syscalls.c ++++ b/libattr/syscalls.c +@@ -32,7 +32,7 @@ + * fall back to traditional .symver asm directive otherwise. + */ + #ifdef __has_attribute +-# if __has_attribute(__symver__) ++# if defined(HAVE_SYMVER_ATTRIBUTE) + # define SYMVER(cn, vn) __typeof(cn) cn __attribute__((__symver__(vn))) + # elif __has_attribute(__no_reorder__) + /* +-- +2.43.0 + diff --git a/package/attr/attr.mk b/package/attr/attr.mk index 6ecf5c53f4..f4f911333a 100644 --- a/package/attr/attr.mk +++ b/package/attr/attr.mk @@ -11,6 +11,9 @@ ATTR_LICENSE = GPL-2.0+ (programs), LGPL-2.1+ (libraries) ATTR_LICENSE_FILES = doc/COPYING doc/COPYING.LGPL ATTR_CPE_ID_VENDOR = attr_project +# Flag added for patch dealing with symver in configure.ac +ATTR_AUTORECONF = YES + ATTR_INSTALL_STAGING = YES ATTR_CONF_OPTS = --disable-nls -- 2.34.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Buildroot] [External] - [PATCH] package/attr: fix build failure on Microblaze architecture 2024-02-06 15:54 ` [Buildroot] [PATCH] package/attr: fix build failure on Microblaze architecture Giulio Benetti @ 2024-02-06 16:05 ` Vincent Fazio 2024-02-06 16:15 ` Giulio Benetti 2024-02-06 16:25 ` Thomas Petazzoni via buildroot 0 siblings, 2 replies; 9+ messages in thread From: Vincent Fazio @ 2024-02-06 16:05 UTC (permalink / raw) To: Giulio Benetti, buildroot@buildroot.org, Thomas Petazzoni Cc: Fabrice Fontaine All, Would it make sense to patch GCC for Microblaze to address these at the compiler level instead of constantly patching the packages? I tested https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766#c6 back when we were solving this problem for xz and had no issues https://gcc.gnu.org/pipermail/gcc/2023-March/240834.html > -----Original Message----- > From: buildroot <buildroot-bounces@buildroot.org> On Behalf Of Giulio > Benetti > Sent: Tuesday, February 6, 2024 9:54 AM > To: buildroot@buildroot.org; Thomas Petazzoni > <thomas.petazzoni@bootlin.com> > Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>; Fabrice > Fontaine <fontaine.fabrice@gmail.com> > Subject: [External] - [Buildroot] [PATCH] package/attr: fix build failure on > Microblaze architecture > > On Microblaze architecture __has_attribute(__symver__) support is broken > and always return true even if symver is not supported so let's add a local > patch pending upstream to detect if symver is supported during autoreconf. > > Fixes: > http://autobuild.buildroot.org/results/29c76e02becedf922bd7dc0533338c078 > bf77d2a > > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> > --- > ...dd-detection-of-symver-gcc-attribute.patch | 56 +++++++++++++++++++ > package/attr/attr.mk | 3 + > 2 files changed, 59 insertions(+) > create mode 100644 package/attr/0002-configure.ac-add-detection-of- > symver-gcc-attribute.patch > > diff --git a/package/attr/0002-configure.ac-add-detection-of-symver-gcc- > attribute.patch b/package/attr/0002-configure.ac-add-detection-of-symver- > gcc-attribute.patch > new file mode 100644 > index 0000000000..15bd266d7b > --- /dev/null > +++ b/package/attr/0002-configure.ac-add-detection-of-symver-gcc-attribu > +++ te.patch > @@ -0,0 +1,56 @@ > +From 1be7c2251040f1152de9ceb5263e6e96fa5c3d75 Mon Sep 17 00:00:00 > 2001 > +From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > +Date: Tue, 6 Feb 2024 15:33:15 +0100 > +Subject: [PATCH] configure.ac: add detection of symver gcc attribute > + > +Upstream: > +https://lists.gnu.org/archive/html/savannah-hackers-public/2024-02/msg0 > +0009.html > + > +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > +Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> > +--- > + configure.ac | 15 +++++++++++++++ > + libattr/syscalls.c | 2 +- > + 2 files changed, 16 insertions(+), 1 deletion(-) > + > +diff --git a/configure.ac b/configure.ac index 7e362e9..98477b5 100644 > +--- a/configure.ac > ++++ b/configure.ac > +@@ -57,6 +57,21 @@ AS_CASE([$host_os], > + [linux*], [os_linux=yes]) > + AM_CONDITIONAL([OS_LINUX], [test "x$os_linux" = "xyes"]) > + > ++AC_CACHE_CHECK(whether __attribute__((__symver__())) is supported, > ++ gcc_cv_symver_attribute, > ++ [cat > conftest.c <<EOF > ++void foo (void) {} > ++__typeof(foo) foo __attribute__ ((__symver__("foo@foo"))); EOF > ++ gcc_cv_symver_attribute=no > ++ if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then \ > ++ gcc_cv_symver_attribute=yes > ++ fi > ++ rm -f conftest.[cs] > ++]) > ++AS_IF([test $gcc_cv_symver_attribute = yes], > ++ [AC_DEFINE(HAVE_SYMVER_ATTRIBUTE, [], [GCC supports symver > ++attribute])]) > ++ > + AC_CONFIG_COMMANDS([include/attr], > + [dnl > + rm -rf include/attr > +diff --git a/libattr/syscalls.c b/libattr/syscalls.c index > +907560a..caa70bc 100644 > +--- a/libattr/syscalls.c > ++++ b/libattr/syscalls.c > +@@ -32,7 +32,7 @@ > + * fall back to traditional .symver asm directive otherwise. > + */ > + #ifdef __has_attribute > +-# if __has_attribute(__symver__) > ++# if defined(HAVE_SYMVER_ATTRIBUTE) > + # define SYMVER(cn, vn) __typeof(cn) cn > +__attribute__((__symver__(vn))) # elif __has_attribute(__no_reorder__) > + /* > +-- > +2.43.0 > + > diff --git a/package/attr/attr.mk b/package/attr/attr.mk index > 6ecf5c53f4..f4f911333a 100644 > --- a/package/attr/attr.mk > +++ b/package/attr/attr.mk > @@ -11,6 +11,9 @@ ATTR_LICENSE = GPL-2.0+ (programs), LGPL-2.1+ > (libraries) ATTR_LICENSE_FILES = doc/COPYING doc/COPYING.LGPL > ATTR_CPE_ID_VENDOR = attr_project > > +# Flag added for patch dealing with symver in configure.ac > +ATTR_AUTORECONF = YES > + > ATTR_INSTALL_STAGING = YES > > ATTR_CONF_OPTS = --disable-nls > -- > 2.34.1 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Buildroot] [External] - [PATCH] package/attr: fix build failure on Microblaze architecture 2024-02-06 16:05 ` [Buildroot] [External] - " Vincent Fazio @ 2024-02-06 16:15 ` Giulio Benetti 2024-02-06 16:25 ` Thomas Petazzoni via buildroot 1 sibling, 0 replies; 9+ messages in thread From: Giulio Benetti @ 2024-02-06 16:15 UTC (permalink / raw) To: Vincent Fazio, buildroot@buildroot.org, Thomas Petazzoni; +Cc: Fabrice Fontaine Hi Vincent, my thought is, On 06/02/24 17:05, Vincent Fazio wrote: > All, > > Would it make sense to patch GCC for Microblaze to address these at the compiler level instead of constantly patching the packages? until gcc is not fixed yes, but, > I tested https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766#c6 back when we were solving this problem for xz and had no issues https://gcc.gnu.org/pipermail/gcc/2023-March/240834.html this absolutely makes sense. It would great if you could backport those patches for all gcc versions we deal with like I've done time ago fo OpenRisc and when they merge them upstream we can drop them after bumping gcc versions with that patch applied. -- Giulio Benetti CEO&CTO@Benetti Engineering sas > >> -----Original Message----- >> From: buildroot <buildroot-bounces@buildroot.org> On Behalf Of Giulio >> Benetti >> Sent: Tuesday, February 6, 2024 9:54 AM >> To: buildroot@buildroot.org; Thomas Petazzoni >> <thomas.petazzoni@bootlin.com> >> Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>; Fabrice >> Fontaine <fontaine.fabrice@gmail.com> >> Subject: [External] - [Buildroot] [PATCH] package/attr: fix build failure on >> Microblaze architecture >> >> On Microblaze architecture __has_attribute(__symver__) support is broken >> and always return true even if symver is not supported so let's add a local >> patch pending upstream to detect if symver is supported during autoreconf. >> >> Fixes: >> http://autobuild.buildroot.org/results/29c76e02becedf922bd7dc0533338c078 >> bf77d2a >> >> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> >> --- >> ...dd-detection-of-symver-gcc-attribute.patch | 56 +++++++++++++++++++ >> package/attr/attr.mk | 3 + >> 2 files changed, 59 insertions(+) >> create mode 100644 package/attr/0002-configure.ac-add-detection-of- >> symver-gcc-attribute.patch >> >> diff --git a/package/attr/0002-configure.ac-add-detection-of-symver-gcc- >> attribute.patch b/package/attr/0002-configure.ac-add-detection-of-symver- >> gcc-attribute.patch >> new file mode 100644 >> index 0000000000..15bd266d7b >> --- /dev/null >> +++ b/package/attr/0002-configure.ac-add-detection-of-symver-gcc-attribu >> +++ te.patch >> @@ -0,0 +1,56 @@ >> +From 1be7c2251040f1152de9ceb5263e6e96fa5c3d75 Mon Sep 17 00:00:00 >> 2001 >> +From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> >> +Date: Tue, 6 Feb 2024 15:33:15 +0100 >> +Subject: [PATCH] configure.ac: add detection of symver gcc attribute >> + >> +Upstream: >> +https://lists.gnu.org/archive/html/savannah-hackers-public/2024-02/msg0 >> +0009.html >> + >> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> >> +Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> >> +--- >> + configure.ac | 15 +++++++++++++++ >> + libattr/syscalls.c | 2 +- >> + 2 files changed, 16 insertions(+), 1 deletion(-) >> + >> +diff --git a/configure.ac b/configure.ac index 7e362e9..98477b5 100644 >> +--- a/configure.ac >> ++++ b/configure.ac >> +@@ -57,6 +57,21 @@ AS_CASE([$host_os], >> + [linux*], [os_linux=yes]) >> + AM_CONDITIONAL([OS_LINUX], [test "x$os_linux" = "xyes"]) >> + >> ++AC_CACHE_CHECK(whether __attribute__((__symver__())) is supported, >> ++ gcc_cv_symver_attribute, >> ++ [cat > conftest.c <<EOF >> ++void foo (void) {} >> ++__typeof(foo) foo __attribute__ ((__symver__("foo@foo"))); EOF >> ++ gcc_cv_symver_attribute=no >> ++ if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then \ >> ++ gcc_cv_symver_attribute=yes >> ++ fi >> ++ rm -f conftest.[cs] >> ++]) >> ++AS_IF([test $gcc_cv_symver_attribute = yes], >> ++ [AC_DEFINE(HAVE_SYMVER_ATTRIBUTE, [], [GCC supports symver >> ++attribute])]) >> ++ >> + AC_CONFIG_COMMANDS([include/attr], >> + [dnl >> + rm -rf include/attr >> +diff --git a/libattr/syscalls.c b/libattr/syscalls.c index >> +907560a..caa70bc 100644 >> +--- a/libattr/syscalls.c >> ++++ b/libattr/syscalls.c >> +@@ -32,7 +32,7 @@ >> + * fall back to traditional .symver asm directive otherwise. >> + */ >> + #ifdef __has_attribute >> +-# if __has_attribute(__symver__) >> ++# if defined(HAVE_SYMVER_ATTRIBUTE) >> + # define SYMVER(cn, vn) __typeof(cn) cn >> +__attribute__((__symver__(vn))) # elif __has_attribute(__no_reorder__) >> + /* >> +-- >> +2.43.0 >> + >> diff --git a/package/attr/attr.mk b/package/attr/attr.mk index >> 6ecf5c53f4..f4f911333a 100644 >> --- a/package/attr/attr.mk >> +++ b/package/attr/attr.mk >> @@ -11,6 +11,9 @@ ATTR_LICENSE = GPL-2.0+ (programs), LGPL-2.1+ >> (libraries) ATTR_LICENSE_FILES = doc/COPYING doc/COPYING.LGPL >> ATTR_CPE_ID_VENDOR = attr_project >> >> +# Flag added for patch dealing with symver in configure.ac >> +ATTR_AUTORECONF = YES >> + >> ATTR_INSTALL_STAGING = YES >> >> ATTR_CONF_OPTS = --disable-nls >> -- >> 2.34.1 >> >> _______________________________________________ >> buildroot mailing list >> buildroot@buildroot.org >> https://lists.buildroot.org/mailman/listinfo/buildroot >> CAUTION: This email originated from outside of the organization. Do not click >> links or open attachments unless you recognize the sender and know the >> content is safe. > _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Buildroot] [External] - [PATCH] package/attr: fix build failure on Microblaze architecture 2024-02-06 16:05 ` [Buildroot] [External] - " Vincent Fazio 2024-02-06 16:15 ` Giulio Benetti @ 2024-02-06 16:25 ` Thomas Petazzoni via buildroot 2024-02-06 16:38 ` Vincent Fazio 1 sibling, 1 reply; 9+ messages in thread From: Thomas Petazzoni via buildroot @ 2024-02-06 16:25 UTC (permalink / raw) To: Vincent Fazio; +Cc: Giulio Benetti, Fabrice Fontaine, buildroot@buildroot.org Hello Vincent, On Tue, 6 Feb 2024 16:05:31 +0000 Vincent Fazio <vfazio@xes-inc.com> wrote: > Would it make sense to patch GCC for Microblaze to address these at > the compiler level instead of constantly patching the packages? > > I tested https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766#c6 back > when we were solving this problem for xz and had no issues > https://gcc.gnu.org/pipermail/gcc/2023-March/240834.html It would definitely make sense of course. Have you been able to get the necessary changes accepted in upstream GCC ? Thanks! Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Buildroot] [External] - [PATCH] package/attr: fix build failure on Microblaze architecture 2024-02-06 16:25 ` Thomas Petazzoni via buildroot @ 2024-02-06 16:38 ` Vincent Fazio 0 siblings, 0 replies; 9+ messages in thread From: Vincent Fazio @ 2024-02-06 16:38 UTC (permalink / raw) To: Thomas Petazzoni Cc: Giulio Benetti, Fabrice Fontaine, buildroot@buildroot.org Thomas, > -----Original Message----- > From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > Sent: Tuesday, February 6, 2024 10:26 AM > To: Vincent Fazio <vfazio@xes-inc.com> > Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>; > buildroot@buildroot.org; Fabrice Fontaine <fontaine.fabrice@gmail.com> > Subject: Re: [External] - [Buildroot] [PATCH] package/attr: fix build failure on > Microblaze architecture > > Hello Vincent, > > On Tue, 6 Feb 2024 16:05:31 +0000 > Vincent Fazio <vfazio@xes-inc.com> wrote: > > > Would it make sense to patch GCC for Microblaze to address these at > > the compiler level instead of constantly patching the packages? > > > > I tested https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766#c6 back > > when we were solving this problem for xz and had no issues > > https://gcc.gnu.org/pipermail/gcc/2023-March/240834.html > > It would definitely make sense of course. Have you been able to get the > necessary changes accepted in upstream GCC ? > The mailing list conversation died out very quickly, but I can try to submit the patch for this specific fixup. I didn't feel comfortable with migrating all of Microblaze to elfos.h as that got very nasty, very quickly and the only change we (Buildroot) need is the `ASM_OUTPUT_SYMVER_DIRECTIVE` macro. > Thanks! > > Thomas > -- > Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel > engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-02-06 16:39 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-01-16 6:58 [Buildroot] [PATCH v2, 1/2] toolchain: add BR2_TOOLCHAIN_HAS_GCC_BUG_101766 Fabrice Fontaine 2024-01-16 6:58 ` [Buildroot] [PATCH v2, 2/2] package/attr: affected by gcc bug 101766 Fabrice Fontaine 2024-02-06 15:11 ` Thomas Petazzoni via buildroot 2024-02-06 15:20 ` Giulio Benetti 2024-02-06 15:54 ` [Buildroot] [PATCH] package/attr: fix build failure on Microblaze architecture Giulio Benetti 2024-02-06 16:05 ` [Buildroot] [External] - " Vincent Fazio 2024-02-06 16:15 ` Giulio Benetti 2024-02-06 16:25 ` Thomas Petazzoni via buildroot 2024-02-06 16:38 ` Vincent Fazio
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox