When building with ports gcc, compile the C parts with -std=gnu11
to match the visibility of max_align_t between C and C++. GCC 4.9 defaults to C89 and does not accept the "restrict" keyword by default. This causes a configure check to add -std=gnu99 to the compiler flags. Since max_align_t is from C11, the -std=gnu99 flag removes it from visibility and gnutls's copy of gnulib then provides its own replacement definition of max_align_t. When gnutls builds its C++ library, the C++ visibility rules are different. The max_align_t from stddef.h reappears and collides with the gnulib replacement.
This commit is contained in:
parent
6324ebf7d2
commit
74ac1bc33b
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.148 2018/11/05 14:57:09 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.149 2018/11/05 21:29:50 naddy Exp $
|
||||
|
||||
COMMENT= GNU Transport Layer Security library
|
||||
|
||||
@ -74,3 +74,8 @@ pre-test:
|
||||
${WRKSRC}/tests/*.c
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
# gcc 4.9: match visibility of max_align_t between CC and CXX
|
||||
.if ${CHOSEN_COMPILER} == "ports-gcc"
|
||||
CFLAGS += -std=gnu11
|
||||
.endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user