From owner-freebsd-current@FreeBSD.ORG Tue Mar 18 22:20:55 2014 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62380E2E; Tue, 18 Mar 2014 22:20:55 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE65983A; Tue, 18 Mar 2014 22:20:54 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id DEC1725D37D1; Tue, 18 Mar 2014 22:20:51 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 19D12C22C11; Tue, 18 Mar 2014 22:20:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id bXg2BTTdWrcU; Tue, 18 Mar 2014 22:20:49 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:592d:a076:4198:c7ae] (unknown [IPv6:fde9:577b:c1a9:4410:592d:a076:4198:c7ae]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id BDA69C22C0D; Tue, 18 Mar 2014 22:20:47 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: Building with external toolchain was broken 6 months ago with r255187 From: "Bjoern A. Zeeb" In-Reply-To: <20140318220140.GA32089@funkthat.com> Date: Tue, 18 Mar 2014 22:20:50 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <7423EF12-9DD4-4C03-9FF6-7BAAB75820F6@lists.zabbadoz.net> References: <323697891.20140319013757@serebryakov.spb.ru> <20140318220140.GA32089@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.1874) Cc: Lev Serebryakov , freebsd-current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Mar 2014 22:20:55 -0000 On 18 Mar 2014, at 22:01 , John-Mark Gurney wrote: > Lev Serebryakov wrote this message on Wed, Mar 19, 2014 at 01:37 = +0400: >> I did't build my NanoBSD images for almost year, and in this time our >> not-finished and fragile support for using "external" toolchain is = rotten, >> due to r255187 (and, may meb, some other commits too). >>=20 >> I have very fresh -CURRENT (r263296) >>=20 >> I have these settings for my buildworld & buildkernel targets: >>=20 >> XCC=3D/usr/bin/cc >> XCXX=3D/usr/bin/c++ >> XCPP=3D/usr/bin/cpp >> XAS=3D/usr/bin/as >> XAR=3D/usr/bin/ar >> XLD=3D/usr/bin/ld >> XNM=3D/usr/bin/nm >> XOBJDUMP=3D/usr/bin/objdump >> XRANLIB=3D/usr/bin/ranlib >> XSTRINGS=3D/usr/bin/strings >> COMPILER_TYPE=3Dclang >> WITHOUT_CROSS_COMPILER=3Dyes >> WITHOUT_BINUTILS=3Dyes >> WITHOUT_CLANG=3Dyes >>=20 >> It worked 7 months ago. Now it works for "buildworld" but not for >> "buildkernel: >>=20 >> --- aeskeys_amd64.o --- >> /usr/bin/cc --sysroot=3D/data/obj.nano/gateway.v2/data/src/tmp = -B/data/obj.nano/gateway.v2/data/src/tmp/usr/bin -O2 -pipe = -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc = -DHAVE_KERNEL_OPTION_HEADERS -include = /data/obj.nano/gateway.v2/data/src/sys/D2500CC/opt_global.h -I. -I@ = -I@/contrib/altq -fno-common -g -fno-omit-frame-pointer = -mno-omit-leaf-frame-pointer = -I/data/obj.nano/gateway.v2/data/src/sys/D2500CC -mno-aes -mno-avx = -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float = -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector = -std=3Diso9899:1999 -Qunused-arguments -fstack-protector -Wall = -Wredundant-decls -Wnested-externs -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef = -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs = -fdiagnostics-show-option -Wno-error-tautological-compare = -Wno-error-empty-body -Wno-error-parentheses-equality = -Wno-unused-function -c /data/src/sys/modules/aesni/../../cryp > to/aesni/aeskeys_amd64.S >> --- aesni_wrap.o --- >> In file included from = /data/src/sys/modules/aesni/../../crypto/aesni/aesni_wrap.c:40: >> /data/src/sys/modules/aesni/../../crypto/aesni/aesencdec.h:30:10: = fatal error: 'wmmintrin.h' file not found >> #include >> ^ >> 1 error generated. >> *** [aesni_wrap.o] Error code 1 >>=20 >> It could not find header file with intrinsics from "system" = ("external") >> clang. I could disable building of this module with = WITHOUT_MODULES=3Daesni, >> and it works, but what if I need this module? >>=20 >> Could it be fixed, pleeeeeeease? >=20 > Sounds like your tool chain doesn't have the necessary support for > AES-NI... Are you using gcc as cc? If so, do you have the necessary > tool chain work that I did in r255185 in your local tree? The problem is that the kernel is deepening on a compiler header which = is not in the right place in objdir if the compiler is not built. I = thought I had reported this before (maybe just informally). I have been = helping myself locally using this: Index: sys/modules/aesni/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/modules/aesni/Makefile (revision 263176) +++ sys/modules/aesni/Makefile (working copy) @@ -11,7 +11,8 @@ OBJS+=3D aesni_wrap.o =20 # Remove -nostdinc so we can get the intrinsics. aesni_wrap.o: aesni_wrap.c - ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} \ + ${CC} -I${.CURDIR}/../../../contrib/llvm/tools/clang/lib/Headers = \ + -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} \ -mmmx -msse -maes ${.IMPSRC} ${CTFCONVERT_CMD} =97=20 Bjoern A. Zeeb ????????? ??? ??????? ??????: '??? ??? ???? ?????? ??????? ?? ?? ??????? ??????? ??? ????? ????? ???? ?????? ?? ????? ????', ????????? ?????????, "??? ????? ?? ?????", ?.???