Created attachment 172194 [details] max_align_t.patch gnu lib wants max_align_t defined by the C compiler. If it doesn't find one, it generates its own version which conflicts with the version in libc++'s stddef.h. This breaks builds of GDB master on 11.0. I know dim@ (cc'd) has worked around this in various ports by forcing max_align_t to be defined via autoconf. However, defining max_align_t in C (not just C++) should fix this for real. This patch has survived make tinderbox, but I need to see what fallout it has in ports. Note that you will need to build a new world with this to get updated headers. It does not require a new kernel.
Buildworld fails with the patch: In file included from /poudriere/jails/headamd64PR210890/usr/src/lib/libcxxrt/../../contrib/libcxxrt/memory.cc:36: /usr/obj/poudriere/jails/headamd64PR210890/usr/src/tmp/usr/include/stddef.h:67:9: error: unknown type name '___max_align_t'; did you mean '__max_align _t'? typedef ___max_align_t max_align_t; ^ /usr/obj/poudriere/jails/headamd64PR210890/usr/src/tmp/usr/include/sys/_types.h:106:3: note: '__max_align_t' declared here } __max_align_t; ^
Created attachment 172467 [details] max_align_t.patch Oops, uploaded older version of the patch. This is the version that survived 'make tinderbox'.
On amd64 there is 1 new failure: www/mongrel2 Failure log: http://package18.nyi.freebsd.org/data/headamd64PR210890-default/2016-07-15_05h15m48s/logs/errors/mongrel2-1.7.5_2.log
On i386, there is 1 new failure, www/mongrel2 Failure log: http://package18.nyi.freebsd.org/data/headi386PR210890-default/2016-07-16_13h22m06s/logs/errors/mongrel2-1.7.5_2.log
A commit references this bug: Author: jhb Date: Fri Oct 21 23:50:02 UTC 2016 New revision: 307756 URL: https://svnweb.freebsd.org/changeset/base/307756 Log: Define max_align_t for C11. libc++'s stddef.h includes an existing definition of max_align_t for C++11, but it is only defined for C++, not for C. In addition, GCC and clang both define an alternate version of max_align_t that uses a union of multiple types rather than a plain long double as in libc++. This adds a __max_align_t to <sys/_types.h> that matches the GCC and clang definition that is mapped to max_align_t in <stddef.h>. PR: 210890 Reviewed by: dim MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D8194 Changes: head/include/stddef.h head/sys/sys/_types.h
A commit references this bug: Author: jhb Date: Mon Nov 28 18:36:37 UTC 2016 New revision: 309258 URL: https://svnweb.freebsd.org/changeset/base/309258 Log: MFC 307756: Define max_align_t for C11. libc++'s stddef.h includes an existing definition of max_align_t for C++11, but it is only defined for C++, not for C. In addition, GCC and clang both define an alternate version of max_align_t that uses a union of multiple types rather than a plain long double as in libc++. This adds a __max_align_t to <sys/_types.h> that matches the GCC and clang definition that is mapped to max_align_t in <stddef.h>. PR: 210890 Changes: _U stable/10/ stable/10/include/stddef.h stable/10/sys/sys/_types.h _U stable/11/ stable/11/include/stddef.h stable/11/sys/sys/_types.h
*** Bug 193594 has been marked as a duplicate of this bug. ***
Re-classify as a base issue (observed by/with ports build failures (eg: gdb)) as the resolution (commit) was done there (in base).
Record MFC's.
(In reply to Kubilay Kocak from comment #8) It was a ports issue solely because this was only an exp-run bug, not a but to track the actual issue of max_align_t (there wasn't a bug for that).