On 24 May 2025, at 08:07, Florian Weimer fw@deneb.enyo.de wrote:
- Jerry James:
I maintain the Fedora polyml package. All Fedora packages are built with a standard set of flags, including "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" to build binaries with annobin (https://sourceware.org/annobin/). The polyml build stashes the flags that were used to build polyml itself into polyc; see the CFLAGS definition. I could use some guidance here. We can do one of two things.
There's a variant of %build_cflags called %extension_cflags. It contains just flags that can be hard-coded into build tools because they do not have dependencies on separate files. It would have to be used in addition to polyml's own defaults (which presumably includes -O2 -g at least), unlike %build_cflags.
The polyc script only runs g++ to link executables. So I would imagine from the clue in the name that redhat-annobin-cc1 won’t have any effect on it. Also I don’t think “-g" affects linking.
The polyml default for CFLAGS is “-O3”. I think that’s probably belt-and-braces but it doesn’t seem inappropriate given what the ld man pages on Mac OS and linux say about the -O option (which is that you can do “-O0” to turn what optimisations it does off).
Experiments on Mac OS and Fedora indicate that the CFLAGS setting doesn’t make any significant difference to the generated object file.
Regards,
Rob.
Poly/ML mailing list -- polyml@lists.polyml.org To unsubscribe send an email to polyml-leave@lists.polyml.org