Re: [CFC/CFT] large changes in the loader(8) code

From: Jan Beich <jbeich_at_tormail.org>
Date: Mon, 02 Jul 2012 15:33:01 +0500
"Andrey V. Elsukov" <bu7cher_at_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_at_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.
Received on Mon Jul 02 2012 - 08:55:49 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:28 UTC