public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Eisentraut <[email protected]>
To: Andres Freund <[email protected]>
To: Michael Paquier <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: meson oddities
Date: Tue, 15 Nov 2022 17:07:05 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
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.
view thread (14+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: meson oddities
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox