From c9f5a00ad200c503ffa9c7411dbaee517ff35945 Mon Sep 17 00:00:00 2001 From: dim Date: Mon, 13 Feb 2017 20:13:29 +0000 Subject: [PATCH] For now, compile all of contrib/gdtoa without requiring strict aliasing, since it is using type punning of union members, and clang does not yet support gcc's extensions which allow this (refer to https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Type%2dpunning for more information). This should fix strtod(3) return values for the lang/julia port, so it does not fail on an assertion during its build. PR: 216770 --- lib/libc/gdtoa/Makefile.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/gdtoa/Makefile.inc b/lib/libc/gdtoa/Makefile.inc index 61dbf34adbae..c900a24e3899 100644 --- a/lib/libc/gdtoa/Makefile.inc +++ b/lib/libc/gdtoa/Makefile.inc @@ -17,4 +17,5 @@ MISRCS+=gdtoa_${src} CLEANFILES+=gdtoa_${src} gdtoa_${src}: ${SRCTOP}/contrib/gdtoa/${src} .NOMETA ln -sf ${.ALLSRC} ${.TARGET} +CFLAGS.gdtoa_${src}+=-fno-strict-aliasing .endfor