[Buildroot] [PATCH 1/1] package/vde2: fix build with BR2_OPTIMIZE_0

Fabrice Fontaine fontaine.fabrice at gmail.com
Thu Apr 21 09:19:07 UTC 2022


Fix the following build failure with BR2_OPTIMIZE_0:

/home/autobuild/autobuild/instance-11/output-1/host/lib/gcc/mips64-buildroot-linux-uclibc/10.3.0/../../../../mips64-buildroot-linux-uclibc/bin/ld: vde_l3.o: in function `ip_output_ready':
vde_l3.c:(.text+0xb30): undefined reference to `iphead'

Fixes:
 - http://autobuild.buildroot.org/results/5eeefcdac0b8974a424a885fdc2e82f7cb4b617d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
---
 ...de_l3-Add-static-to-inline-functions.patch | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/vde2/0003-vde_l3-Add-static-to-inline-functions.patch

diff --git a/package/vde2/0003-vde_l3-Add-static-to-inline-functions.patch b/package/vde2/0003-vde_l3-Add-static-to-inline-functions.patch
new file mode 100644
index 0000000000..7f771dfc7e
--- /dev/null
+++ b/package/vde2/0003-vde_l3-Add-static-to-inline-functions.patch
@@ -0,0 +1,37 @@
+vde_l3: Add static to inline functions
+
+Add static to inline functions to avoid the following build failure
+with BR2_OPTIMIZE_0:
+
+/home/autobuild/autobuild/instance-11/output-1/host/lib/gcc/mips64-buildroot-linux-uclibc/10.3.0/../../../../mips64-buildroot-linux-uclibc/bin/ld: vde_l3.o: in function `ip_output_ready':
+vde_l3.c:(.text+0xb30): undefined reference to `iphead'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/5eeefcdac0b8974a424a885fdc2e82f7cb4b617d
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+
+diff -Nura vde2-2.3.2.orig/src/vde_l3/vde_l3.c vde2-2.3.2/src/vde_l3/vde_l3.c
+--- vde2-2.3.2.orig/src/vde_l3/vde_l3.c	2022-04-21 11:05:17.393452698 +0200
++++ vde2-2.3.2/src/vde_l3/vde_l3.c	2022-04-21 11:10:36.509804404 +0200
+@@ -100,17 +100,17 @@
+ };
+ 
+ 
+-inline struct vde_ethernet_header *ethhead(struct vde_buff *vdb)
++static inline struct vde_ethernet_header *ethhead(struct vde_buff *vdb)
+ {
+ 	return (struct vde_ethernet_header*)(vdb->data);
+ }
+ 
+-inline struct iphdr *iphead(struct vde_buff *vdb)
++static inline struct iphdr *iphead(struct vde_buff *vdb)
+ {
+ 	return (struct iphdr*)(vdb->data + 14);
+ }
+ 
+-inline void *payload(struct vde_buff *vdb)
++static inline void *payload(struct vde_buff *vdb)
+ {
+ 	return (uint8_t*)(vdb->data + 14 + sizeof(struct iphdr));
+ }
-- 
2.35.1




More information about the buildroot mailing list