diff options
author | Eric Wong <e@80x24.org> | 2023-08-30 05:10:43 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-08-30 05:27:35 +0000 |
commit | b78cd406ff28d8c25081dd81072c362c001bad5b (patch) | |
tree | 9583305ea251ea2543f56fb313e30ca9e9ba6273 /lib/PublicInbox/XapHelperCxx.pm | |
parent | d71ff0e20e05d7d468a6c08d3f14f3b3a7032d73 (diff) | |
download | public-inbox-b78cd406ff28d8c25081dd81072c362c001bad5b.tar.gz |
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.
Diffstat (limited to 'lib/PublicInbox/XapHelperCxx.pm')
-rw-r--r-- | lib/PublicInbox/XapHelperCxx.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/XapHelperCxx.pm b/lib/PublicInbox/XapHelperCxx.pm index 4571676b..a22dda1e 100644 --- a/lib/PublicInbox/XapHelperCxx.pm +++ b/lib/PublicInbox/XapHelperCxx.pm @@ -15,8 +15,10 @@ my $bin = "$dir/xap_helper"; 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 () { |