Kernel compilation failures with gcc 4.9

Warner Losh imp at bsdimp.com
Tue Mar 31 23:55:16 UTC 2015


> On Mar 31, 2015, at 4:53 PM, Rui Paulo <rpaulo at me.com> wrote:
> 
> On Mar 31, 2015, at 14:04, Craig Rodrigues <rodrigc at FreeBSD.org> wrote:
>> 
>> Hi,
>> 
>> I put this in make.conf:
>> 
>> NO_WERROR=yes
>> WERROR=
>> WITHOUT_BOOT=yes
>> WITHOUT_RESCUE=yes
>> 
>> and used this script to build:
>> https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/cross-build.sh
>> 
>> I managed to build a lot of stuff, but then got build failures
>> in the aesni part of the kernel build.
>> 
>> See the full build log here:
>> https://jenkins.freebsd.org/job/FreeBSD_HEAD_external_toolchain_gcc/30/console
>> 
>> I think this is the error:
>> 
>> In file included from
>> /usr/local/lib/gcc/x86_64-portbld-freebsd10.0/4.9.1/include/mm_malloc.h:27:0,
>>                from
>> /usr/local/lib/gcc/x86_64-portbld-freebsd10.0/4.9.1/include/xmmintrin.h:34,
>>                from
>> /usr/local/lib/gcc/x86_64-portbld-freebsd10.0/4.9.1/include/emmintrin.h:31,
>>                from
>> /usr/local/lib/gcc/x86_64-portbld-freebsd10.0/4.9.1/include/wmmintrin.h:31,
>>                from
>> /builds/FreeBSD_HEAD_external_toolchain_gcc/sys/modules/aesni/../../crypto/aesni/aesni_ghash.c:74:
>> /builds/FreeBSD_HEAD_external_toolchain_gcc/obj/builds/FreeBSD_HEAD_external_toolchain_gcc/tmp/usr/include/stdlib.h:93:7:
>> error: conflicting types for 'free' void  free(void *);
>> 
>>      ^
>> In file included from
>> /builds/FreeBSD_HEAD_external_toolchain_gcc/sys/crypto/aesni/aesni.h:33:0,
>>                from
>> /builds/FreeBSD_HEAD_external_toolchain_gcc/sys/modules/aesni/../../crypto/aesni/aesni_ghash.c:69:
>> /builds/FreeBSD_HEAD_external_toolchain_gcc/sys/sys/malloc.h:177:6: note:
>> previous declaration of 'free' was here
>> void free(void *addr, struct malloc_type *type);
> 
> It shouldn't be using the stdlib when it's built with -ffreestanding or -nostdlib.  Can you make sure?

The AES stuff breaks the rules, and this is a consequence of it :( That stuff should be fixed.

Warner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-toolchain/attachments/20150331/b239a912/attachment.sig>


More information about the freebsd-toolchain mailing list