Currently, the Rust module in clamav is built without default Fedora compiler flags for Rust code (i.e. "-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn") - essentially, the code is not fully optimized, and does not contain debuginfo or frame pointers. RUSTFLAGS are the standard environment variable for setting compiler flags for rustc (similar to CFLAGS / CXXFLAGS / LDFLAGS), but they aren't set by default (and not yet included in %set_build_flags, but I've reported an RFE about this). It appears that the 389-ds-base build system currently hard-codes these compiler flags: --release --verbose -- -C debuginfo=2 This results in Rust code compiled as part of 389-ds-base not being optimized at the same level as other Rust code in Fedora (i.e. `-Copt-level=3` is default in Fedora, but `--release` mode only implies `-Copt-level=2`), and it also doesn't include the other mandatory compiler flags, which result in better quality of generated code (and on rawhide, includes frame pointers on x86_64 and aarch64).
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle. Changing version to 38.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle. Changing version to 39.