Re: Build with LTO / -flto on macOS

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Wolfgang Walther <walther(at)technowledgy(dot)de>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Build with LTO / -flto on macOS
Date: 2024-07-19 10:40:58
Message-ID: CAJ7c6TMG5h1tBar_HkXzUNRsauTXaG+oYgQJJGOorsC6iciCOw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> So I tested both HEAD and v12 on current and current-5, both successful.
> That should cover current-1 and current-2, too. If you want me to test
> any other macOS versions inbetween, or any other PG versions, I can do that.
>
> I would really like to upstream those kind of patches and see them
> backpatched - otherwise we need to carry around those patches for up to
> 5 years in the distros. And in light of the discussion in [1] my goal is
> to reduce the number of patches carried to a minimum. Yes - those
> patches are simple enough - but the more patches you have, the less
> likely you are going to spot a malicious patch inbetween.

The patch was marked as "Needs review" so I decided to take a look at it.

I tested v2-0001 on macOS Sonoma 14.5 with Autotools.

configure said:

```
checking whether gcc supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... no
checking whether gcc supports -Wl,-export_dynamic, for LDFLAGS_EX_BE... yes
```

I also checked that -Wl,-export_dynamic was used when linking postgres binary.

On Linux configure says:

```
checking whether gcc supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... yes
```

... and `-Wl,--export-dynamic` is used when linking postgres.

cfbot is happy with the patch too.

There is not much to say about the code. It's Autotools and it's ugly,
but it gets the job done.

It seems to me that the patch is not going to become any better and it
doesn't need any more attention from the reviewers. Thus I changed the
status of the CF entry to "Ready for Committer".

--
Best regards,
Aleksander Alekseev

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Devrim Gündüz 2024-07-19 11:29:41 Re: d844cd75a and postgres_fdw
Previous Message Masahiro.Ikeda 2024-07-19 10:17:23 RE: Showing applied extended statistics in explain Part 2