maintainer-feedback requested: [Bug 275 014] audio/linux-c7-alsa-plugins-oss: fails t o build with -enable-trivial-auto-var-init-ze ro-knowing-it-will-be-removed-from-clang

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 10 Nov 2023 17:58:54 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-emulation (Nobody)
<emulation@FreeBSD.org> for maintainer-feedback:
Bug 275014: audio/linux-c7-alsa-plugins-oss: fails to build with
-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275014



--- Description ---
I build my own packages with poudriere.

I recently globally added the clang
`-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang` flag
and that broke `audio/linux-c7-alsa-plugins-oss` from building.  The other 419
packages I build had no problem.

The error is:

```
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... Segmentation fault (core dumped)
configure: error: in
`/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work/32/alsa-plugins-1.1.6'
:
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
*** Error code 77

Stop.
make: stopped in /usr/ports/audio/linux-c7-alsa-plugins-oss
```

The `-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang`
flag has a dubious name I agree, but that's only because FreeBSD 13.2's clang
14 is rather old.  In newer clang the flag was promoted from experimental to
fully legit and is now named `-ftrivial-auto-var-init=zero`.  See
https://discourse.llvm.org/t/making-ftrivial-auto-var-init-zero-a-first-class-o
ption/55143

My reason for using the flag is the same as others: security.  Android, Chrome
OS, Windows, Apple, and others use this in production builds too.

From the error output, I would guess that something is building and running a C
program to test something, and that program is crashing.