Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jul 2016 13:07:00 -0700
From:      "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        Roman Divacky <rdivacky@freebsd.org>, Pedro Giffuni <pfg@freebsd.org>, FreeBSD current <freebsd-current@freebsd.org>
Subject:   clang 3.3/3.4 fails to build items that use stdlib.h because of __alloc_size attribute assigned to posix_memalign
Message-ID:  <838A69F7-343D-4398-928B-E54FB966B574@gmail.com>

next in thread | raw e-mail | index | archive | help

--Apple-Mail=_963CBE16-1326-4285-B49A-2D85A56C5A1B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Hi,
	It looks like clang 3.3/3.4 from ports both don=E2=80=99t like =
__alloc_size being attached to posix_memalign. This only concerns me =
because it might make the src upgrade path from 9.3/10.3 to 11.0 =
painful.
	Thoughts on how this should be fixed or whether or not we care?
Thanks,
-Ngie

$ cd usr.sbin/bhyve; make clean; script ts make all CC=3Dclang34
...
In file included from /usr/src/svn/usr.sbin/bhyve/atkbdc.c:40:
/usr/include/stdlib.h:176:6: error: '__alloc_size__' attribute only =
applies to functions that return a pointer =
[-Werror,-Wignored-attributes]
            __alloc_size(3);                    /* (ADV) */
            ^
/usr/include/sys/cdefs.h:241:40: note: expanded from macro =
'__alloc_size'
#define __alloc_size(x) __attribute__((__alloc_size__(x)))
                                       ^
1 error generated.
*** Error code 1

Stop.
make: stopped in /usr/src/svn/usr.sbin/bhyve
$ (set -x; clang33 --version; clang34 --version)
+ clang33 --version
clang version 3.3 (tags/RELEASE_33/final)
Target: x86_64-portbld-freebsd11.0
Thread model: posix
+ clang34 --version
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: x86_64-portbld-freebsd11.0
Thread model: posix

282988        pfg int    posix_memalign(void **, size_t, size_t) =
__nonnull(1) __alloc_align(2)
281130        pfg           __alloc_size(3);                    /* (ADV) =
*/

--Apple-Mail=_963CBE16-1326-4285-B49A-2D85A56C5A1B
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJXfBNlAAoJEPWDqSZpMIYVWX4P/3XoY69EIwaTEudGgBzM5AhM
f0gqZftUMSDdtYkEg6TUMHu/4clxfwuqUtN3DvP+fe+zKQEg+pVActDY1ZIGhsgj
AwdEfIu2M0oOXwD84AwDLQ1guf6ZxDnE9ba9h9c2uvb+zjLsC28yVF4OsK8MdpR8
jc7rQYFS6yf76NRlOkL7yrZFoWiNJ366yL3q1n4m/XKxAFg8+Y+Zmpoi1SVEifwz
9cep276B+kqS0yem6ZJiq23q+FqSeIRLF1i+01NYa5dxi6HT3N7bxNU+VjICw/d9
HdzIXcEsd7IdHRZxgurp1PjZNUHABbg6IBCFywML95iwLExsGEk2kk0r7w/QDutI
DmagAzaI4642XhlILF9CsxHTzjSa0mlFgBKpl5oOyFFUsvCefh/+BsJT0TiH5PzJ
VYZyBA3rr0iN+Yg9JQJ5vViiurMiN0/XkyrQncdrPJVnc/IWUd29hBoJP2MQsRKo
Qc6YOQR09Zw0tWLdMOt+OSt3NTUmR/gTgM+nD5RZpxLkB9TZ97Nijbp7x0uWDt4b
EcNTllOmgKvcU9zEGpY2h5aTdf3HNnElWYJkueYuBuLHVdKIemaick6RBqZHmp1s
5LYQ8pMMb0pC45z+PuYx51QxFtihaET36dIuqw8o0igATuqIfhB1WsrVeU/33+8g
elCeONSs8PDoJovgX6HB
=EEM4
-----END PGP SIGNATURE-----

--Apple-Mail=_963CBE16-1326-4285-B49A-2D85A56C5A1B--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?838A69F7-343D-4398-928B-E54FB966B574>