Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ouyT1-0005i2-4V for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Nov 2022 16:07:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ouySz-00063x-NF for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Nov 2022 16:07:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ouySy-00063m-Dd for pgsql-hackers@lists.postgresql.org; Tue, 15 Nov 2022 16:07:17 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ouySu-0002tm-5w for pgsql-hackers@lists.postgresql.org; Tue, 15 Nov 2022 16:07:15 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 2D46C5C022A; Tue, 15 Nov 2022 11:07:09 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 15 Nov 2022 11:07:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1668528429; x= 1668614829; bh=9prUKc57sqTdAMzl2iPljoxehV/4bJSaaOwJbaepRi4=; b=l kK8spGQPFC1l5EsMpj4ukHP97IxXCUXS8F3Yua4o8ecIioWTG/mg0WZuhQC99+Ot yGOnlnSITHd4OERQgmzNp5kabdvc20Q/68WxSKmdGFBunznUArvYWnO/U76CJ0D2 6FAj+L1iSDa+uVEt9tUC8RF4dTI6jCQlyxaOHEeRTGdw5eU8ijOwhK4s24pvSdJV 2canp0fieyNX3O/mGQmBBs8Yp65MCYsx98o3Ssd3sJct36H5LA3FARSKPlYdzia7 VNjUOSmmfo5KspIYVnCaBdtpJsw4OqFARAARh25v3SQeuSJBsAMLysuzEb1LdO19 7aUQjBfKQ3QLZ9XXnWV6A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrgeeggdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepheelffeggedujeetiefh leetuddvieffhfffvdejvdffgeejkeduleduheduieefnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 15 Nov 2022 11:07:06 -0500 (EST) Message-ID: <95767d55-0dfe-3e73-0373-9d910c4322f2@enterprisedb.com> Date: Tue, 15 Nov 2022 17:07:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: meson oddities Content-Language: en-US To: Andres Freund , Michael Paquier Cc: Andrew Dunstan , PostgreSQL Hackers References: <64c0517b-5504-68ea-1912-9f647a70a3cc@dunslane.net> <20221114234812.yjj6gxs2n6e4uvgm@awork3.anarazel.de> From: Peter Eisentraut In-Reply-To: <20221114234812.yjj6gxs2n6e4uvgm@awork3.anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 15.11.22 00:48, Andres Freund wrote: > We effectively do that with autoconf as well, except that we don't mention > that in pg_config --ldflags. Our linking rules include CFLAGS, see e.g.: > > %: %.o > $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X) > > postgres: $(OBJS) > $(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) $(LDFLAGS_EX) $(export_dynamic) $(LIBS) -o $@ > > ifdef PROGRAM > $(PROGRAM): $(OBJS) > $(CC) $(CFLAGS) $(OBJS) $(PG_LIBS_INTERNAL) $(LDFLAGS) $(LDFLAGS_EX) $(PG_LIBS) $(LIBS) -o $@$(X) > endif > > # Rule for building a shared library from a single .o file > %.so: %.o > $(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@ > > > Should we try that fact in pg_configin the meson build as well? It's up to the consumer of pg_config to apply CFLAGS and LDFLAGS as they need. But pg_config and pkg-config etc. should report them separately.