Skip to contentSkip to conversation

package/am335x-pru-package: fix host build with GCC 15

PATCH In review Yegor Yefremov via buildroot 2 participants 4 messages Nov 11

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/am335x-pru-package: fix host build with GCC 15

The host pasm assembler fails to build with GCC >= 15 on the host:

pasm.c: In function 'main':
pasm.c:437:9: error: too many arguments to function 'ppCleanup'; expected 0, have 1

    437 |         ppCleanup(Pass);
        |         ^~~~~~~~~ ~~~~
  In file included from pasm.c:75:
  pasm.h:576:6: note: declared here
    576 | void ppCleanup();
        |      ^~~~~~~~~

ppCleanup() takes no arguments, but main() passes one. The empty parameter list in pasm.h hid the mismatch until GCC 15, which defaults to C23, where "()" means "no parameters".

Add a patch, submitted upstream, that drops the extra argument.

This issue has been present since commit 725efef8313a ("am335x-pru-package: new package"), as the bogus call has been in pasm since 2012, but it only shows up with a GCC 15 host compiler. It therefore affects 2014.11 and later, including the 2025.02.x and 2026.02.x LTS branches.

Fixes:
https://autobuild.buildroot.org/results/d6e70d200a3a7003a1d3fb03000fcfbd6b9dcc56

Fixes 725efef8313ae5591bb497fec3aa7e62717af9a2 ("am335x-pru-package: new package")
Assisted-by Claude:claude-opus-5-5
---
 ...Cleanup-call-with-too-many-arguments.patch | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 package/am335x-pru-package/0002-pasm-fix-ppCleanup-call-with-too-many-arguments.patch
package/am335x-pru-package/0002-pasm-fix-ppCleanup-call-with-too-many-arguments.patch new file +41 -0
new file mode 100644
index 0000000000..1f0f853882
@@ -0,0 +1,41 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Yegor Yefremov <[email protected]>
+Date: Wed, 11 Nov 2026 09:13:45 +0100
+Subject: [PATCH] pasm: fix ppCleanup() call with too many arguments
+
+ppCleanup() takes no arguments, but main() calls it as ppCleanup(Pass).
+This went unnoticed because pasm.h declares it with an empty parameter
+list. Since GCC 15 defaults to C23, where "()" means "no parameters",
+the build fails:
+
+  pasm.c:437:9: error: too many arguments to function 'ppCleanup'; expected 0, have 1
+    437 |         ppCleanup(Pass);
+        |         ^~~~~~~~~ ~~~~
+  pasm.h:576:6: note: declared here
+    576 | void ppCleanup();
+
+Drop the extra argument.
+
+Upstream: https://github.com/beagleboard/am335x_pru_package/pull/73
+Assisted-by: Claude:claude-opus-5-5
+Signed-off-by: Yegor Yefremov <[email protected]>
+---
+ pru_sw/utils/pasm_source/pasm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pru_sw/utils/pasm_source/pasm.c b/pru_sw/utils/pasm_source/pasm.c
+index f8051ff..06fa9bc 100644
+--- a/pru_sw/utils/pasm_source/pasm.c
++++ b/pru_sw/utils/pasm_source/pasm.c
+@@ -434,7 +434,7 @@ USAGE:
+         CloseSourceFile( mainsource );
+ 
+         /* Cleanup the PP and DOT modules */
+-        ppCleanup(Pass);
++        ppCleanup();
+         DotCleanup(Pass);
+ 
+         if( Pass==1 )
+-- 
+2.34.1
+
Signature · 6 lines
2.34.1

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

"Yegor" == Yegor Yefremov via buildroot <[email protected]> writes:

The host pasm assembler fails to build with GCC >= 15 on the host:
pasm.c: In function 'main':
pasm.c:437:9: error: too many arguments to function 'ppCleanup'; expected 0, have 1

    437 |         ppCleanup(Pass);
        |         ^~~~~~~~~ ~~~~
  In file included from pasm.c:75:
  pasm.h:576:6: note: declared here
    576 | void ppCleanup();
        |      ^~~~~~~~~

ppCleanup() takes no arguments, but main() passes one. The empty parameter list in pasm.h hid the mismatch until GCC 15, which defaults to C23, where "()" means "no parameters".

Add a patch, submitted upstream, that drops the extra argument.

This issue has been present since commit 725efef8313a ("am335x-pru-package: new package"), as the bogus call has been in pasm since 2012, but it only shows up with a GCC 15 host compiler. It therefore affects 2014.11 and later, including the 2025.02.x and 2026.02.x LTS branches.

Quoted 6 lines

Fixes:
https://autobuild.buildroot.org/results/d6e70d200a3a7003a1d3fb03000fcfbd6b9dcc56

Fixes 725efef8313ae5591bb497fec3aa7e62717af9a2 ("am335x-pru-package: new package")
Assisted-by Claude:claude-opus-5-5

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hi Peter,

Quoted 25 lines · Peter Korsgaard
Quoted 24 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Yegor" == Yegor Yefremov via buildroot <[email protected]> writes:

The host pasm assembler fails to build with GCC >= 15 on the host:
pasm.c: In function 'main':
pasm.c:437:9: error: too many arguments to function 'ppCleanup'; expected 0, have 1

    437 |         ppCleanup(Pass);
        |         ^~~~~~~~~ ~~~~
  In file included from pasm.c:75:
  pasm.h:576:6: note: declared here
    576 | void ppCleanup();
        |      ^~~~~~~~~

ppCleanup() takes no arguments, but main() passes one. The empty parameter list in pasm.h hid the mismatch until GCC 15, which defaults to C23, where "()" means "no parameters".

Add a patch, submitted upstream, that drops the extra argument.

This issue has been present since commit 725efef8313a ("am335x-pru-package: new package"), as the bogus call has been in pasm since 2012, but it only shows up with a GCC 15 host compiler. It therefore affects 2014.11 and later, including the 2025.02.x and 2026.02.x LTS branches.

Quoted 8 lines
Quoted 6 lines

Fixes:
https://autobuild.buildroot.org/results/d6e70d200a3a7003a1d3fb03000fcfbd6b9dcc56

Fixes 725efef8313ae5591bb497fec3aa7e62717af9a2 ("am335x-pru-package: new package")
Assisted-by Claude:claude-opus-5-5

Committed, thanks.

Thanks. Should we keep this package at all? The last commit was in 2018. It looks abandoned.

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

#3 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yegor" == Yegor Yefremov <[email protected]> writes:

Hi,

Quoted 4 lines
Quoted 1 line

Committed, thanks.

Thanks. Should we keep this package at all? The last commit was in 2018. It looks abandoned.

Ehh, no idea. I've added Frank, who is listed in DEVELOPERS for it. What do people use to program the PRUs nowadays?

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot