Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Apr 2018 18:58:40 +0200
From:      Andre Albsmeier <Andre.Albsmeier@siemens.com>
To:        freebsd-stable@freebsd.org
Cc:        Andre.Albsmeier@siemens.com
Subject:   gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK
Message-ID:  <20180425165840.GA1330@bali>

next in thread | raw e-mail | index | archive | help
I have set up a new system disk for an i386 11.2-PRERELEASE box. I did the
usual

gpart create -s gpt $disk
gpart add -t freebsd-boot -s 984 $disk
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 $disk
...

thing, just to notice that the box wouldn't boot. It seems to hang where
stage 2 should be run -- when the '\' should start spinning the screen
turns white and the box hangs (tested on two machines, an Asus P5W and a
Supermicro A2SAV).

So I replaced gptboot on the new disk by the one from an older machine
and everything was fine. I wanted to find out what is actually causing
the issue and recompiled /usr/src/stand after updating the old sources
in several steps.

Eventually it turned out that it depends on the compiler. When compiling
the latest /usr/src/stand with clang 5.0.1 the resulting gptboot works.
When using 6.0.0 it doesn't. To be exact, it's gptboot.o which is causing
the problems. When using a gptboot.o from a clang 5 system it is OK, when
using a gptboot.o from a clang 6 system it fails. 

To add more confusion: I usually have WITHOUT_LOADER_GELI in my make.conf.
When removing this, the resulting gptboot works even when compiled with
clang 6...

I can reproduce this in case s.o. wants me to do some tests...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180425165840.GA1330>