On Fri, Mar 08, 2019 at 08:22:33PM +0000, Andrew Gierth wrote:
! >>>>> "Peter" == Peter <
pmc@xxxxxxxxxxxxxxxxxxxxxxx> writes:
!
! Peter> Extra Compiler-Options:
! Peter> -march=pentium3
!
! I CC'd you on my response to Palle, but to spell it out, what you need
! to do to fix this is either:
!
! 1. Remove the -march=pentium3 option.
!
! 2. Add the -mstackrealign option as well.
Yes, thank You, this got clear to me in the afternoon.
! Either way should work. Could you try (one or both, your preference) and
! report back?
Yes, -mstackrealign helps. So, as my local problem is now solved,
I am thinking about that "greater good for mankind" thing. ;)
At least one other person did run into the issue, and from Your
explanation I understand that this is not a postgres issue, but
could happen to any piece of software that decides to use gcc.
Now it seems easy to put this compiler option into the port's
specific makefile for postgreSQL, but it should actually be fixed
systemwide.
But, while it gets recommended to set the cpu-type systemwide on
FreeBSD, it is not recommend for the system owner to set CFLAGS
systemwide (even less specific ones for gcc - and I didn't find
a proper way to do that, anyway).
So my proposal is that this one belongs into /usr/ports/Mk/bsd.gcc.mk
+ .if ${MACHINE_CPU:Msse} && ${MACHINE_ARCH} == i386
+ CFLAGS+= -mstackrealign
+ .endif
That seems to work. Palle, Your opinion?