Re: LLVM strip -x fails

2023-04-21 Thread Tom Lane
Peter Eisentraut writes: > On 21.04.23 19:00, Tom Lane wrote: >> If you use both -x and -S, you get the same file sizes as with -x >> alone. Not sure why we should change anything here. > The complaint was that -x doesn't work correctly, no? The complaint was that it doesn't work correctly if y

Re: LLVM strip -x fails

2023-04-21 Thread Peter Eisentraut
On 21.04.23 19:00, Tom Lane wrote: Peter Eisentraut writes: On 20.04.23 17:33, Andres Freund wrote: Peter, it's unlikely given the timeframe, but do you happen to remember why you specified -x when stripping static libs? I suspect this was copied from GNU Libtool. Libtool still has that bu

Re: LLVM strip -x fails

2023-04-21 Thread Tom Lane
Peter Eisentraut writes: > On 20.04.23 17:33, Andres Freund wrote: >> Peter, it's unlikely given the timeframe, but do you happen to remember why >> you specified -x when stripping static libs? > I suspect this was copied from GNU Libtool. Libtool still has that but > later changed the strippin

Re: LLVM strip -x fails

2023-04-21 Thread Peter Eisentraut
On 21.04.23 18:41, Peter Eisentraut wrote: On 20.04.23 17:33, Andres Freund wrote: Peter, it's unlikely given the timeframe, but do you happen to remember why you specified -x when stripping static libs? This seems to be all the way back from commit 563673e15db995b6f531b44be7bb162330ac157a Au

Re: LLVM strip -x fails

2023-04-21 Thread Peter Eisentraut
On 20.04.23 17:33, Andres Freund wrote: Peter, it's unlikely given the timeframe, but do you happen to remember why you specified -x when stripping static libs? This seems to be all the way back from commit 563673e15db995b6f531b44be7bb162330ac157a Author: Peter Eisentraut Date: 2002-04-10 16:4

Re: LLVM strip -x fails

2023-04-20 Thread Tom Lane
Andres Freund writes: > On 2023-04-20 12:43:48 -0400, Tom Lane wrote: >> The previous complaint about this [1] suggested we use --strip-unneeded >> for all cases with GNU strip, same as we've long done for shared libs. >> It's an easy enough change, but I wonder if anyone will complain. > I doubt

Re: LLVM strip -x fails

2023-04-20 Thread Andres Freund
Hi, On 2023-04-20 12:43:48 -0400, Tom Lane wrote: > Andres Freund writes: > > Afaict the only safe thing to use when stripping static libs is > > -g/--strip-debug. > > The previous complaint about this [1] suggested we use --strip-unneeded > for all cases with GNU strip, same as we've long done f

Re: LLVM strip -x fails

2023-04-20 Thread Tom Lane
Andres Freund writes: > Afaict the only safe thing to use when stripping static libs is > -g/--strip-debug. The previous complaint about this [1] suggested we use --strip-unneeded for all cases with GNU strip, same as we've long done for shared libs. It's an easy enough change, but I wonder if an

Re: LLVM strip -x fails

2023-04-20 Thread Andres Freund
Hi, Moving this to -hackers. On 2023-04-20 11:49:23 +0200, Palle Girgensohn wrote: > I was recently made aware of a problem building postgresql using LLVM > binutils. > > A summary: > > -- > > pgsql's build has requested to strip all non-global symbols (strip -x), but > there is at least one