Skip to contentSkip to conversation

package/libyang: needs __sync_*_4 intrinsics

PATCH Applied Fabrice Fontaine 2 participants 2 messages Dec 7, 2021 – Dec 12, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libyang: needs __sync_*_4 intrinsics

libyang needs __sync_*_4 intrinsics since bump to version 2.0.112 in commit 2a3edc5e00b38f4f927894d0911990c9060e4415 and
https://github.com/CESNET/libyang/commit/080064b7906aecd7454e58e1c34c1c2198809e4e:

/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/9.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: ../../libyang.so.2.13.7: undefined reference to `__sync_fetch_and_sub_4'

Fixes:
- http://autobuild.buildroot.org/results/c1f090bde4891ac1cc84e59c51ff9561869d42b9

---
 package/frr/Config.in         | 2 +-
 package/libnetconf2/Config.in | 2 ++
 package/libyang/Config.in     | 2 ++
 package/netopeer2/Config.in   | 2 ++
 package/sysrepo/Config.in     | 2 ++
 5 files changed, 9 insertions(+), 1 deletion(-)
package/frr/Config.in +1 -1
index 911913292f..877b75b107 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_FRR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS # libyang
 	depends on BR2_USE_MMU # fork()
-	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c, libyang
 	select BR2_PACKAGE_BASH
 	select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
 	select BR2_PACKAGE_C_ARES
package/libnetconf2/Config.in +2 -0
index 0a735b5ed6..7865f9e487 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBNETCONF2
 	bool "libnetconf2"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libyang
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU
@@ -12,4 +13,5 @@ config BR2_PACKAGE_LIBNETCONF2
 
 comment "libnetconf2 needs a toolchain w/ threads, dynamic libraray"
 	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
 	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
package/libyang/Config.in +2 -0
index 54df061b58..d08f8fd42f 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBYANG
 	bool "libyang"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # __sync_*_4 intrinsics
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
 	select BR2_PACKAGE_PCRE2
@@ -10,4 +11,5 @@ config BR2_PACKAGE_LIBYANG
 	  https://github.com/CESNET/libyang
 
 comment "libyang needs a toolchain w/ threads, dynamic library"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
package/netopeer2/Config.in +2 -0
index 763b1f234b..db31a786a1 100644
@@ -1,11 +1,13 @@
 comment "netopeer2 needs a toolchain w/ gcc >= 4.8, C++, threads, dynamic library"
 	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
 	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP \
 		|| !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 
 config BR2_PACKAGE_NETOPEER2
 	bool "netopeer2"
 	depends on BR2_USE_MMU # libnetconf2, libssh, sysrepo
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libyang
 	depends on !BR2_STATIC_LIBS # libnetconf2, libssh, libyang, sysrepo
 	depends on BR2_INSTALL_LIBSTDCPP # sysrepo
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
package/sysrepo/Config.in +2 -0
index 52df1bc4c3..b1535bed9f 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_SYSREPO
 	bool "sysrepo"
 	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libyang
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
@@ -24,5 +25,6 @@ endif
 
 comment "sysrepo needs a toolchain w/ C++, NPTL, dynamic library, gcc >= 4.8"
 	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
 	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP \
 		|| !BR2_TOOLCHAIN_HAS_THREADS_NPTL
Signature · 6 lines
2.33.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 10 lines · Fabrice Fontaine

libyang needs __sync_*_4 intrinsics since bump to version 2.0.112 in commit 2a3edc5e00b38f4f927894d0911990c9060e4415 and
https://github.com/CESNET/libyang/commit/080064b7906aecd7454e58e1c34c1c2198809e4e:

/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/9.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: ../../libyang.so.2.13.7: undefined reference to `__sync_fetch_and_sub_4'

Fixes:
- http://autobuild.buildroot.org/results/c1f090bde4891ac1cc84e59c51ff9561869d42b9

Applied to master, thanks.

Regards,
Arnout

Quoted 87 lines
---
  package/frr/Config.in         | 2 +-
  package/libnetconf2/Config.in | 2 ++
  package/libyang/Config.in     | 2 ++
  package/netopeer2/Config.in   | 2 ++
  package/sysrepo/Config.in     | 2 ++
  5 files changed, 9 insertions(+), 1 deletion(-)
package/frr/Config.in +1 -1
index 911913292f..877b75b107 100644
@@ -3,7 +3,7 @@ config BR2_PACKAGE_FRR
  	depends on BR2_TOOLCHAIN_HAS_THREADS
  	depends on !BR2_STATIC_LIBS # libyang
  	depends on BR2_USE_MMU # fork()
-	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c, libyang
  	select BR2_PACKAGE_BASH
  	select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
  	select BR2_PACKAGE_C_ARES
package/libnetconf2/Config.in +2 -0
index 0a735b5ed6..7865f9e487 100644
@@ -1,5 +1,6 @@
  config BR2_PACKAGE_LIBNETCONF2
  	bool "libnetconf2"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libyang
  	depends on BR2_TOOLCHAIN_HAS_THREADS
  	depends on !BR2_STATIC_LIBS
  	depends on BR2_USE_MMU
@@ -12,4 +13,5 @@ config BR2_PACKAGE_LIBNETCONF2
 
  comment "libnetconf2 needs a toolchain w/ threads, dynamic libraray"
  	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
  	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
package/libyang/Config.in +2 -0
index 54df061b58..d08f8fd42f 100644
@@ -1,5 +1,6 @@
  config BR2_PACKAGE_LIBYANG
  	bool "libyang"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # __sync_*_4 intrinsics
  	depends on BR2_TOOLCHAIN_HAS_THREADS
  	depends on !BR2_STATIC_LIBS
  	select BR2_PACKAGE_PCRE2
@@ -10,4 +11,5 @@ config BR2_PACKAGE_LIBYANG
  	  https://github.com/CESNET/libyang
 
  comment "libyang needs a toolchain w/ threads, dynamic library"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
  	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
package/netopeer2/Config.in +2 -0
index 763b1f234b..db31a786a1 100644
@@ -1,11 +1,13 @@
  comment "netopeer2 needs a toolchain w/ gcc >= 4.8, C++, threads, dynamic library"
  	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
  	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP \
  		|| !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 
  config BR2_PACKAGE_NETOPEER2
  	bool "netopeer2"
  	depends on BR2_USE_MMU # libnetconf2, libssh, sysrepo
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libyang
  	depends on !BR2_STATIC_LIBS # libnetconf2, libssh, libyang, sysrepo
  	depends on BR2_INSTALL_LIBSTDCPP # sysrepo
  	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
package/sysrepo/Config.in +1 -0
index 52df1bc4c3..b1535bed9f 100644
@@ -1,6 +1,7 @@
  config BR2_PACKAGE_SYSREPO
  	bool "sysrepo"
  	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libyang
  	depends on !BR2_STATIC_LIBS
  	depends on BR2_INSTALL_LIBSTDCPP
  	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL

package/sysrepo/Config.in endif · line 30

Quoted 6 lines
package/sysrepo/Config.in +1 -0
@@ -24,5 +25,6 @@ endif
 
  comment "sysrepo needs a toolchain w/ C++, NPTL, dynamic library, gcc >= 4.8"
  	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
  	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP \
  		|| !BR2_TOOLCHAIN_HAS_THREADS_NPTL

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot