Re: Strip -mmacosx-version-min options from plperl build

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Strip -mmacosx-version-min options from plperl build
Дата
Msg-id 2369869.1660830828@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Strip -mmacosx-version-min options from plperl build  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: Strip -mmacosx-version-min options from plperl build  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> This is because the link command uses the option
> -mmacosx-version-min=11.3, which comes in from perl_embed_ldflags (perl
> -MExtUtils::Embed -e ldopts), but the compile commands don't use that
> option, which creates a situation that ld considers inconsistent.

> I think an appropriate fix is to strip out the undesired option from
> perl_embed_ldflags.  We already do that for other options.  Proposed
> patch attached.

Agreed on rejecting -mmacosx-version-min, but I wonder if we should
think about adopting a whitelist-instead-of-blacklist approach to
adopting stuff from perl_embed_ldflags.  ISTR that in pltcl we already
use the approach of accepting only -L and -l, and perhaps similar
strictness would serve us well here.

As an example, on a not-too-new MacPorts install, I see

$ /opt/local/bin/perl -MExtUtils::Embed -e ldopts
    -L/opt/local/lib -Wl,-headerpad_max_install_names   -fstack-protector-strong
-L/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE-lperl 

I can't see any really good reason why we should allow perl
to be injecting that sort of -f option into the plperl build,
and I'm pretty dubious about the -headerpad_max_install_names
bit too.

I think also that this would allow us to drop the weird dance of
trying to subtract ccdlflags.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nikita Malakhov
Дата:
Сообщение: Re: RFC: Moving specific attributes from pg_attribute column into attoptions
Следующее
От: Melih Mutlu
Дата:
Сообщение: Summary function for pg_buffercache