ld(1) on OpenBSD 7.3 doesn't appear to support zlib-compressed
debug sections out-of-the-box. Oh well, being able to build
this C++ bit at all is required to get acceptable performance
with -cindex --associate.
my ($srcpfx) = (__FILE__ =~ m!\A(.+/)[^/]+\z!);
my @srcs = map { $srcpfx.$_ } qw(xap_helper.h);
my @pm_dep = map { $srcpfx.$_ } qw(Search.pm CodeSearch.pm);
+my $ldflags = '-Wl,-O1';
+$ldflags .= ' -Wl,--compress-debug-sections=zlib' if $^O ne 'openbsd';
my $xflags = ($ENV{CXXFLAGS} // '-Wall -ggdb3 -O0') . ' ' .
- ($ENV{LDFLAGS} // '-Wl,-O1 -Wl,--compress-debug-sections=zlib') .
+ ($ENV{LDFLAGS} // $ldflags) .
qq{ -DTHREADID=}.PublicInbox::Search::THREADID;
sub xflags_chg () {