Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Jul 2012 15:33:01 +0500
From:      Jan Beich <jbeich@tormail.org>
To:        "Andrey V. Elsukov" <bu7cher@yandex.ru>
Cc:        freebsd-current <freebsd-current@freebsd.org>, Dimitry Andric <dim@FreeBSD.org>
Subject:   Re: [CFC/CFT] large changes in the loader(8) code
Message-ID:  <1SleGk-00080Z-9J@internal.tormail.org>
In-Reply-To: <1SlXxa-0007aK-Lz@internal.tormail.org> (Andrey V. Elsukov's message of "Mon, 02 Jul 2012 08:10:14 %2B0400")
References:  <4FE9B01C.30306@yandex.ru> <4FEB5B0E.8020009@FreeBSD.org> <1SkYxx-0007Fr-SA@internal.tormail.org> <1SlXxa-0007aK-Lz@internal.tormail.org>

next in thread | previous in thread | raw e-mail | index | archive | help
"Andrey V. Elsukov" <bu7cher@yandex.ru> 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
  <wait a bit for data to sync>
  $ 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1SleGk-00080Z-9J>