The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
Without the change `perf top` just crashes early as:
$ perf top
perf: Segmentation fault
-------- backtrace --------
/<<NIX>>/perf-linux-6.7.4/bin/perf[0x627382]
/<<NIX>>/glibc-2.38-27/lib/libc.so.6(+0x3deb0)[0x7f423a054eb0]
/<<NIX>>/perf-linux-6.7.4/bin/perf(__dsos__findnew_link_by_longname_id+0x34b)[0x53655b]
/<<NIX>>/perf-linux-6.7.4/bin/perf(map__new+0x35f)[0x55884f]
/<<NIX>>/perf-linux-6.7.4/bin/perf(machine__process_mmap2_event+0xb7)[0x557b27]
/<<NIX>>/perf-linux-6.7.4/bin/perf(perf_tool__process_synth_event+0x7e)[0x59e86e]
/<<NIX>>/perf-linux-6.7.4/bin/perf(perf_event__synthesize_mmap_events+0x370)[0x59f0e0]
/<<NIX>>/perf-linux-6.7.4/bin/perf[0x59fd5c]
/<<NIX>>/perf-linux-6.7.4/bin/perf[0x59ffcc]
/<<NIX>>/perf-linux-6.7.4/bin/perf[0x5a0093]
/<<NIX>>/glibc-2.38-27/lib/libc.so.6(+0x8b333)[0x7f423a0a2333]
/<<NIX>>/glibc-2.38-27/lib/libc.so.6(+0x10defc)[0x7f423a124efc]
It's a known `gcc-12+` bug not yet fixed in `gcc-13`: https://gcc.gnu.org/PR111009
Let's demote optimizations from `-O2` down to `-O1` to disable any
VRP-related effects for affected `gcc-13`.
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
Without the change perf build fails on binutils-2.39 due to API change:
util/annotate.c: In function 'symbol__disassemble_bpf':
util/annotate.c:1765:9: error: too few arguments to function 'init_disassemble_info'
1765 | init_disassemble_info(&info, s,
| ^~~~~~~~~~~~~~~~~~~~~