Skip to contentSkip to conversation

fix build issues with modern GCC versions

PATCH Applied Florian Larysch 2 participants 5 messages Aug 10, 2025 – Aug 14, 2025

lore
Share & tools
lore
#0 lore raw

v2 cover fix build issues with modern GCC versions

This is a new version of [1] that splits up the GCC 14 and GCC 15 changes as discussed there. I was under the mistaken impression that I had seen autobuild failures with GCC 15 but that must just have been on my machine (outside of Buildroot).

Nonetheless, I think it makes sense to also fix the GCC 15 issue now too.

The version I've submitted to upstream is the combination of both of them, but I strongly expect that either both or none will get applied - the project seems to be pretty much abandoned.

[1] https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Florian Larysch (2):
package/nanocom: fix build with GCC 14
package/nanocom: fix build with GCC 15

 .../nanocom/0002-fix-build-with-gcc-14.patch  | 19 +++++++++++++++++++
 .../nanocom/0003-fix-build-with-gcc-15.patch  | 19 +++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 package/nanocom/0002-fix-build-with-gcc-14.patch
 create mode 100644 package/nanocom/0003-fix-build-with-gcc-15.patch
Signature · 6 lines
2.50.1

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

PATCH v2 1/2 package/nanocom: fix build with GCC 14

GCC 14 made implicit function definitions an error and the forward declaration for display_state() was using the wrong name, causing a compilation failure at the call site.

---
 .../nanocom/0002-fix-build-with-gcc-14.patch  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 package/nanocom/0002-fix-build-with-gcc-14.patch
package/nanocom/0002-fix-build-with-gcc-14.patch new file +19 -0
new file mode 100644
index 0000000000..87df33a04d
@@ -0,0 +1,19 @@
+GCC 14 made implicit function definitions an error and the forward declaration
+for display_state() was using the wrong name, causing a compilation
+failure at the call site.
+
+Upstream: Submitted to author via email
+Signed-off-by: Florian Larysch <[email protected]>
+
+diff -purN old/nanocom.h new/nanocom.h
+--- old/nanocom.h	2025-08-10 01:34:12.000284003 +0200
++++ new/nanocom.h	2025-08-10 01:27:59.545821909 +0200
+@@ -56,7 +56,7 @@ void cleanup_termios(int signal);
+ void init_stdin(struct termios *sts);
+ void init_comm();
+ void usage( char *str);
+-void display_status();
++void display_state();
+ 
+ 
+ /*typedef to represent the current line state
Signature · 6 lines
2.50.1

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

Re: [Buildroot] [PATCH v2 1/2] package/nanocom: fix build with GCC 14

In reply of:

Quoted 7 lines

GCC 14 made implicit function definitions an error and the forward declaration for display_state() was using the wrong name, causing a compilation failure at the call site.

Applied to 2025.02.x & 2025.05.x. Thanks

Quoted 37 lines
---
 .../nanocom/0002-fix-build-with-gcc-14.patch  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 package/nanocom/0002-fix-build-with-gcc-14.patch
package/nanocom/0002-fix-build-with-gcc-14.patch new file +19 -0
new file mode 100644
index 0000000000..87df33a04d
@@ -0,0 +1,19 @@
+GCC 14 made implicit function definitions an error and the forward declaration
+for display_state() was using the wrong name, causing a compilation
+failure at the call site.
+
+Upstream: Submitted to author via email
+Signed-off-by: Florian Larysch <[email protected]>
+
+diff -purN old/nanocom.h new/nanocom.h
+--- old/nanocom.h	2025-08-10 01:34:12.000284003 +0200
++++ new/nanocom.h	2025-08-10 01:27:59.545821909 +0200
+@@ -56,7 +56,7 @@ void cleanup_termios(int signal);
+ void init_stdin(struct termios *sts);
+ void init_comm();
+ void usage( char *str);
+-void display_status();
++void display_state();
+ 
+ 
+ /*typedef to represent the current line state
Signature · 6 lines
2.50.1

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

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

#3 lore raw

PATCH v2 2/2 package/nanocom: fix build with GCC 15

In reply to Florian Larysch

GCC 15 switched to C23 by default, which made "void foo()" equivalent to "void foo(void)". This causes a build error because init_comm() doesn't actually take any arguments.

---
 .../nanocom/0003-fix-build-with-gcc-15.patch  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 package/nanocom/0003-fix-build-with-gcc-15.patch
package/nanocom/0003-fix-build-with-gcc-15.patch new file +19 -0
new file mode 100644
index 0000000000..59a2095337
@@ -0,0 +1,19 @@
+GCC 15 switched to C23 by default, which made "void foo()" equivalent to
+"void foo(void)". This causes a build error because init_comm() doesn't
+actually take any arguments.
+
+Upstream: Submitted to author via email
+Signed-off-by: Florian Larysch <[email protected]>
+
+diff -purN old/nanocom.c new/nanocom.c
+--- old/nanocom.c	2025-08-10 01:34:12.000284003 +0200
++++ new/nanocom.c	2025-08-10 01:31:05.639050630 +0200
+@@ -329,7 +329,7 @@ int main(int argc, char *argv[]) {
+     memcpy(&pots, &pts, sizeof(pots));
+     
+     /*setup serial port with new settings*/
+-    init_comm(&pts);
++    init_comm();
+         
+     fprintf(stderr,"Press CTRL+T for menu options");   
+     display_state();
Signature · 6 lines
2.50.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw
In reply to Florian Larysch

Hello Florian, All,

Le 10/08/2025 à 18:30, Florian Larysch a écrit :

Quoted 11 lines

This is a new version of [1] that splits up the GCC 14 and GCC 15 changes as discussed there. I was under the mistaken impression that I had seen autobuild failures with GCC 15 but that must just have been on my machine (outside of Buildroot).

Nonetheless, I think it makes sense to also fix the GCC 15 issue now too.

The version I've submitted to upstream is the combination of both of them, but I strongly expect that either both or none will get applied - the project seems to be pretty much abandoned.

Thanks for the respin.

Indeed, nanocom 1.0 was released back in 2005!
https://sourceforge.net/projects/nanocom/files/nanocom/v1.0/

It's a good candidate for removal...

For now, I'll apply you patches.
Series applied to master, thanks.

Best regards,
Romain

Quoted 7 lines

[1] https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Florian Larysch (2):
package/nanocom: fix build with GCC 14
package/nanocom: fix build with GCC 15

Quoted 6 lines
 .../nanocom/0002-fix-build-with-gcc-14.patch  | 19 +++++++++++++++++++
 .../nanocom/0003-fix-build-with-gcc-15.patch  | 19 +++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 package/nanocom/0002-fix-build-with-gcc-14.patch
 create mode 100644 package/nanocom/0003-fix-build-with-gcc-15.patch

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