From owner-freebsd-current@FreeBSD.ORG Mon Jul 2 10:55:49 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AAB71065670; Mon, 2 Jul 2012 10:55:49 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from server2.allsitecontrol.com (server2.allsitecontrol.com [63.143.36.210]) by mx1.freebsd.org (Postfix) with ESMTP id 5E6018FC12; Mon, 2 Jul 2012 10:55:49 +0000 (UTC) Received: from [199.48.147.45] (port=48874 helo=internal.tormail.org) by server2.allsitecontrol.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.77) (envelope-from ) id 1SleIC-003iLa-UA; Mon, 02 Jul 2012 06:55:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:In-Reply-To:Subject:Cc:To:From; bh=NVW93FutpTUl3OOmnvfcIxwzLRvBvjZNc2+f6eog4/g=; b=NAQNl4tSbFLquW5ccZybf4do7CS0Ahv7x+zImU4QB28sTB46uafShrpTwCUubctRHS8cnWpZfKwGU+EaGHLi1gtwsV0Dycbo4uNIFN4cmou8+qBI5n9fOeHfZ4H1/4OZ+uW1KhzGha6BPjZXdmhMcb5ofCiR6Qx1j8Z1/9/exf8=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1SleGk-00080Z-9J; Mon, 02 Jul 2012 10:54:15 +0000 From: Jan Beich To: "Andrey V. Elsukov" In-Reply-To: <1SlXxa-0007aK-Lz@internal.tormail.org> (Andrey V. Elsukov's message of "Mon, 02 Jul 2012 08:10:14 +0400") Date: Mon, 02 Jul 2012 15:33:01 +0500 References: <4FE9B01C.30306@yandex.ru> <4FEB5B0E.8020009@FreeBSD.org> <1SkYxx-0007Fr-SA@internal.tormail.org> <1SlXxa-0007aK-Lz@internal.tormail.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1SleGk-00080Z-9J@internal.tormail.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server2.allsitecontrol.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tormail.org X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-current , Dimitry Andric Subject: Re: [CFC/CFT] large changes in the loader(8) code X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Jul 2012 10:55:49 -0000 "Andrey V. Elsukov" writes: > On 29.06.2012 15:01, Jan Beich wrote: > >>>> So, i have created the branch and committed the changes: >>>> http://svnweb.freebsd.org/base/user/ae/bootcode/ >>>> The patch is here: >>>> http://people.freebsd.org/~ae/boot.diff >>> >>> FWIW, I verified it compiles OK with clang, and especially boot2's size >>> isn't increased at all. >> Does it boot for you? Same if I build zfs.c with gcc -O0: >> >> FreeBSD/x86 ZFS enabled bootstrap loader, Revision 1.1 >> (foo@bar, Tue Jun 26 18:52:52 UTC 2012) >> ZFS: can't find pool by guid >> ZFS: can't find pool by guid >> >> can't load 'kernel' >> > > Does zfsloader without patches compiled with CLANG work for you? It does. I did test before using $ cd /usr/src/sys/boot $ env -i __MAKE_CONF= PATH=/bin:/sbin:/usr/bin:/usr/sbin make CC=clang $ make install $ sudo qemu-system-x86_64 -curses -drive file=/dev/ada0 -drive file=/dev/ada1 In gcc -O0 case $ touch zfs/zfs.c $ rm i386/zfsloader/zfsloader* $ echo CFLAGS+=-O0 >>zfs/Makefile $ env -i ... make CC=gcc And for gcc47 $ touch zfs/zfs.c $ rm i386/zfsloader/zfsloader* $ env -i ... make CC=/usr/local/bin/gcc47 -C zfs I haven't tried to further track down which flag(s) within -O1 make zfsloader from your branch work when compiled with base gcc.