Skip to contentSkip to conversation

package/igh-ethercat: backport upstream commit to fix build issue

PATCH In review Thomas Petazzoni via buildroot 2 participants 2 messages Jan 12, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/igh-ethercat: backport upstream commit to fix build issue

This patch backports an upstream igh-ethercat commit to fix build issues at -O0 or -Os. The commit message says -O0, but in the context of Buildroot, the issue was encountered at -Os, due to dead-code elimination.

Fixes:

https://autobuild.buildroot.org/results/bfa074afee8a70abe597b117ecf815e234f16b40/

---
 ...ry-inline-statement-causing-build-O0.patch | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 package/igh-ethercat/0004-Remove-unnecessary-inline-statement-causing-build-O0.patch
package/igh-ethercat/0004-Remove-unnecessary-inline-statement-causing-build-O0.patch new file +38 -0
new file mode 100644
index 0000000000..2cbb9c3ce7
@@ -0,0 +1,38 @@
+From 39d065d5fb56525c1171c4fcb643b798ee10c6b9 Mon Sep 17 00:00:00 2001
+From: Richard Hacker <[email protected]>
+Date: Mon, 18 Nov 2024 10:54:00 +0100
+Subject: [PATCH] Remove unnecessary inline statement causing build -O0
+ problems
+
+Fixes #147
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+Upstream: https://gitlab.com/etherlab.org/ethercat/-/commit/5802c72818df07d34469630a8943915cce738626
+---
+ lib/slave_config.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/slave_config.c b/lib/slave_config.c
+index 7bef3a99..58d6c7b4 100644
+--- a/lib/slave_config.c
++++ b/lib/slave_config.c
+@@ -40,6 +40,7 @@
+ void ec_slave_config_add_sdo_request(ec_slave_config_t *, ec_sdo_request_t *);
+ void ec_slave_config_add_reg_request(ec_slave_config_t *, ec_reg_request_t *);
+ void ec_slave_config_add_voe_handler(ec_slave_config_t *, ec_voe_handler_t *);
++void ec_slave_config_add_soe_request(ec_slave_config_t *, ec_soe_request_t *);
+ 
+ /****************************************************************************/
+ 
+@@ -625,7 +626,7 @@ ec_sdo_request_t *ecrt_slave_config_create_sdo_request(ec_slave_config_t *sc,
+ 
+ /****************************************************************************/
+ 
+-inline void ec_slave_config_add_soe_request(ec_slave_config_t *sc,
++void ec_slave_config_add_soe_request(ec_slave_config_t *sc,
+         ec_soe_request_t *req)
+ {
+     if (sc->first_soe_request) {
+-- 
+2.47.1
+
Signature · 6 lines
2.47.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 11 lines · Thomas Petazzoni via buildroot

This patch backports an upstream igh-ethercat commit to fix build issues at -O0 or -Os. The commit message says -O0, but in the context of Buildroot, the issue was encountered at -Os, due to dead-code elimination.

Fixes:

https://autobuild.buildroot.org/results/bfa074afee8a70abe597b117ecf815e234f16b40/

Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot