From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 278A41F51A for ; Wed, 30 Aug 2023 05:10:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1693372246; bh=y9AT9sV1BsafgYyg5CYp9ZRLoihvzRzGBXXakK+ob3k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XFFVOHCzoDNSRWfI+7oQQSu2RDbllHCu72b6NAf8n+5PlS1zcwKKU9omYm/b30PZZ qlh/zbAsOKqCTjGEvwaxBFs6bF35ngbDGj2OIGZa6ASvtChIkh0jLMoq1k5dS7Nit3 dullfDMIBdIYPWdVBJvbfBrpkuVnm9AXyxyzTqJU= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 5/7] xap_helper.h: don't compress debug sections on OpenBSD Date: Wed, 30 Aug 2023 05:10:43 +0000 Message-Id: <20230830051045.330641-6-e@80x24.org> In-Reply-To: <20230830051045.330641-1-e@80x24.org> References: <20230830051045.330641-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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. --- lib/PublicInbox/XapHelperCxx.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 () {