From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 20 14:59:09 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E18641065679; Mon, 20 Dec 2010 14:59:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B27D78FC18; Mon, 20 Dec 2010 14:59:08 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 697A346B32; Mon, 20 Dec 2010 09:59:08 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 682458A01D; Mon, 20 Dec 2010 09:59:07 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 20 Dec 2010 08:02:21 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <20101219112356.GA18388@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201012200802.21334.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 20 Dec 2010 09:59:07 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Alexander Best , Garrett Cooper Subject: Re: getting rid of some -mno-* flags under sys/boot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2010 14:59:09 -0000 On Sunday, December 19, 2010 12:42:01 pm Garrett Cooper wrote: > On Sun, Dec 19, 2010 at 3:23 AM, Alexander Best 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