getting rid of some -mno-* flags under sys/boot

John Baldwin jhb at freebsd.org
Mon Dec 20 14:59:09 UTC 2010


On Sunday, December 19, 2010 12:42:01 pm Garrett Cooper wrote:
> On Sun, Dec 19, 2010 at 3:23 AM, Alexander Best <arundel at freebsd.org> wrote:
> > hi there,
> >
> > i think some of the -mno-* flags in sys/boot/* can be scrubbed, since they're
> > already being included from ../Makefile.inc.
> 
>     Looks good.
> 
> > also TARGET cleandir leaves some files behind in i386/gptboot which should be
> > fixed by this patch.
> 
>     AHA. This might fix the issue I've seen rebuilding stuff with
> gptzfsboot for a good while now where I have to (on mostly rare
> occasions with -j24, etc typically after updating my source tree)
> rebuild it manually. gptzfsboot and zfsboot also need the fix, BTW.
> The only thing is that these files live under the common directory, so
> shouldn't common clean them up (I see that common doesn't have a
> Makefile though, only a Makefile.inc -- ouch)?
>     FWIW though, wouldn't it be better to avoid this accidental bug
> and unnecessary duplication by doing something like the following?
> 
> # ...
> 
> OBJS=    zfsboot.o sio.o gpt.o drv.o cons.o util.o
> CLEANFILES+= gptzfsboot.out ${OBJS}
> 
> gptzfsboot.out: ${BTXCRT} ${OBJS}
> # ...

Yes, an OBJS would be good.  Also, gptboot.c was recently changed to not
#include ufsread.c, so that explicit dependency can be removed, as can the
GPTBOOT_UFS variable.

Similar fixes probably apply to gptzfsboot.

BTW, the code in common/ is not built into a library, but specific boot
programs (typically /boot/loader on different platforms) include specific
objects.

-- 
John Baldwin


More information about the freebsd-hackers mailing list