From owner-freebsd-current@FreeBSD.ORG Thu Mar 20 14:29:17 2014 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4A1B590; Thu, 20 Mar 2014 14:29:17 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 63512C44; Thu, 20 Mar 2014 14:29:17 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WQdy7-00057n-Vh; Thu, 20 Mar 2014 14:29:16 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s2KETDYP070832; Thu, 20 Mar 2014 08:29:13 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/3agaT66DxanF5n6QgIbJ1 Subject: Re: Building with external toolchain was broken 6 months ago with r255187 From: Ian Lepore To: John Baldwin In-Reply-To: <201403201008.48610.jhb@freebsd.org> References: <323697891.20140319013757@serebryakov.spb.ru> <20140318220140.GA32089@funkthat.com> <7423EF12-9DD4-4C03-9FF6-7BAAB75820F6@lists.zabbadoz.net> <201403201008.48610.jhb@freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Thu, 20 Mar 2014 08:29:12 -0600 Message-ID: <1395325752.80941.16.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: "Bjoern A. Zeeb" , John-Mark Gurney , freebsd-current@FreeBSD.org, Lev Serebryakov 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: Thu, 20 Mar 2014 14:29:17 -0000 On Thu, 2014-03-20 at 10:08 -0400, John Baldwin wrote: > On Tuesday, March 18, 2014 6:20:50 pm Bjoern A. Zeeb wrote: > > > > 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). > > >> > > >> I have very fresh -CURRENT (r263296) > > >> > > >> I have these settings for my buildworld & buildkernel targets: > > >> > > >> XCC=/usr/bin/cc > > >> XCXX=/usr/bin/c++ > > >> XCPP=/usr/bin/cpp > > >> XAS=/usr/bin/as > > >> XAR=/usr/bin/ar > > >> XLD=/usr/bin/ld > > >> XNM=/usr/bin/nm > > >> XOBJDUMP=/usr/bin/objdump > > >> XRANLIB=/usr/bin/ranlib > > >> XSTRINGS=/usr/bin/strings > > >> COMPILER_TYPE=clang > > >> WITHOUT_CROSS_COMPILER=yes > > >> WITHOUT_BINUTILS=yes > > >> WITHOUT_CLANG=yes > > >> > > >> It worked 7 months ago. Now it works for "buildworld" but not for > > >> "buildkernel: > > >> > > >> --- aeskeys_amd64.o --- > > >> /usr/bin/cc --sysroot=/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=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno- > asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899: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 > > >> > > >> It could not find header file with intrinsics from "system" ("external") > > >> clang. I could disable building of this module with > WITHOUT_MODULES=aesni, > > >> and it works, but what if I need this module? > > >> > > >> Could it be fixed, pleeeeeeease? > > > > > > 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: > > No, the compiler should provide a working "wmmintrin.h" header in one of > its built-in paths if it supports the AES instructions. This is akin to > saying that code that uses "stdio.h" should use -I/usr/src/include. > But it's a module, built with -nostdinc, so the appropriate -I has to be on the command line. I notice that -no-aes is also on the command line, which seems like a strange thing for compiling a file named aeskeys_amd64. -- Ian