On Mon, Dec 03, 2018 at 09:47:46PM +0000, Stuart Henderson wrote: > On 2018/12/02 11:40, Stuart Henderson wrote: > > On 2018/11/08 18:35, Pierre-Emmanuel André wrote: > > > Hi, > > > > > > Here is a diff to update PostgreSQL to it's latest version (10.6). > > > Release note : https://www.postgresql.org/about/news/1905/ > > > (It fixes CVE-2018-16850) > > > > > > Tested on @amd64. > > > Comments, ok ? > > > > > > Regards, > > > > Fails on i386: > > > > checking whether the C compiler still works... yes > > configure: error: Compiling PostgreSQL with clang, on 32bit x86, requires > > SSE2 support. Use -msse2 or use gcc. > > > > > > A special check was added for this, description as follows: > > # Defend against clang being used on x86-32 without SSE2 enabled. As current > # versions of clang do not understand -fexcess-precision=standard, the use of > # x87 floating point operations leads to problems like isinf possibly > returning > # false for a value that is infinite when converted from the 80bit register to > # the 8byte memory representation. > > I'm unsure which approach I like least, gcc or -msse2... > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/databases/postgresql/Makefile,v > retrieving revision 1.246 > diff -u -p -r1.246 Makefile > --- Makefile 3 Dec 2018 16:22:08 -0000 1.246 > +++ Makefile 3 Dec 2018 21:46:42 -0000 > @@ -79,6 +79,18 @@ CONFIGURE_ARGS= --disable-rpath --with-o > CONFIGURE_ARGS+=--disable-spinlocks > .endif > > +# To avoid problems with missed floating point overflow checks. > +# pgsql 10.6+ refuses to build on i386 clang unless -msse2 is set. > +# If clang gains "-fexcess-precision=standard" support then this > +# should be removed. > +MODULES+= gcc4 > +MODGCC4_ARCHS= i386 > +MODGCC4_LANGS= c > +# An alternative workaround: > +# .if ${MACHINE_ARCH} == "i386" > +# CFLAGS += -msse2 > +# .endif > + > MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}/config > > ALL_TARGET= world >
Go for the fix. ok pea@