You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Passing parameters to the C compiler in iconc #628
I'm experimenting with this: simply put, generate param.c straight from configure, and add the set of compiler/linker options that were deduced by configure
then you just need to #include "param.c" at the right location in ccomp.c
This does actively get rid of most of the special cases (hello MacOS) having to do with paths not being taken into account, or stuff like -rdynamic not having the right name.
This could easily be extended to figure out appropriate -Wno-* options to remove warnings for auto-generated code.
The diff is more like a proof of concept for future work.
This allowed me to remove a lot of hand-made dirty stuff to make iconc work on OpenBSD.
@ryandesign , this will probably interest you a lot.
(if you find the inclusion of a .c in another one disgusting, you could always do a param.h file with just #define for those parameters, and then add the growcat directly into ccomp.c)
So I plain forgot I needed to put spaces around parameters in my command line, leading to iconc outrageously failing.
I've also added supplementary warning flags to silence iconc. It's comparatively trivial: you just define a new SUBST variable ICONCCFLAGS and add to it when you find the -Wno-* flag you want.
@marcespie , Thanks again for doing these fixes and supplying patches. I did create a PR off of every issue you included a patch with. those PRs are linked to their issues, please review and let me know if I missed anything.
Activity
marcespie commentedon Jul 16, 2026
(if you find the inclusion of a .c in another one disgusting, you could always do a param.h file with just #define for those parameters, and then add the growcat directly into ccomp.c)
marcespie commentedon Jul 16, 2026
So I plain forgot I needed to put spaces around parameters in my command line, leading to iconc outrageously failing.
I've also added supplementary warning flags to silence iconc. It's comparatively trivial: you just define a new SUBST variable ICONCCFLAGS and add to it when you find the -Wno-* flag you want.
diff9bis.txt
Jafaral commentedon Jul 16, 2026
Can you please open PRs instead of submitting code as diffs?
marcespie commentedon Jul 16, 2026
That specific issue needs some discussing before it can even become an actual PR.
I was raised on diffs and emails, and I actually find it way more convenient to work with than github PRs...
marcespie commentedon Jul 16, 2026
but I'll try to do at least a basic PR to let most of unicon compile on OpenBSD systems.
Jafaral commentedon Jul 17, 2026
What is your environment and how are you compiling? The readme file has a small section for BSD systems, see
https://github.com/uniconproject/unicon#bsd
Unicon already works on FreeBSD, and it is part of the test platforms we have test coverage for:
https://github.com/uniconproject/unicon/actions/runs/29460183761/job/87501835177
If you open a PR, then all tests will be run automatically to validate the changes on all supported platforms including FreeBSD.
Jafaral commentedon Jul 17, 2026
@marcespie , Thanks again for doing these fixes and supplying patches. I did create a PR off of every issue you included a patch with. those PRs are linked to their issues, please review and let me know if I missed anything.
marcespie commentedon Jul 18, 2026
Wow, thank you very much. I was slowly getting geared to doing similar stuff
marcespie commentedon Jul 18, 2026
I will probably wait until some of these are merged before I push forward
Pass configure CFLAGS/LDFLAGS into iconc via generated param.c