LibBSD | Draft: gcc15: Fix warnings building with gcc15 (!100)

Chris Johns (@chris) gitlab at rtems.org
Wed Sep 17 21:54:21 UTC 2025




Chris Johns commented on a discussion: https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/100#note_131120


There is a `defines` section so global defines are passed cleanly to `waf` however I did not implement that bit back in 2018. I have added that support. The FDT decls are keyed on `#ifdef FDT` in the FreeBSD headers so without that being defined the build breaks with gcc15 because functions have no prototype.

The success of the build depends on the BSP. Some will have `BSP_FDT_IS_SUPPORTED` defined in `bsp.h` to signal FDT support and will build. The problem I am seeing is with the Microzed (zynq) because the Cadence NIC driver uses `FDT` to call `bsp_get_fdt()` and that results in linker errors because it is unresolved.

The solution is:

1. Add global `defines` support to the build system and set `FDT=1` as a global define
2. Add a configure check on `bsp.h` and check for `BSP_FDT_IS_SUPPORTED` in that header setting a new global define call `RTEMS_BSP_FDT` if present. Update the `if_cgem.c` source to support the new define.

I am not sure how `main` builds? I do not know if this is due to a clean up in FreeBSD 15, it was fixed on `main` or it was hacked around?

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/merge_requests/100#note_131120
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250917/94d470e9/attachment.htm>


More information about the bugs mailing list