From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from quark.didntduck.org ([69.55.226.66]:41271 "EHLO quark.didntduck.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753685AbXGKBVO (ORCPT ); Tue, 10 Jul 2007 21:21:14 -0400 Message-ID: <46942496.2050205@didntduck.org> Date: Tue, 10 Jul 2007 20:30:14 -0400 From: Brian Gerst MIME-Version: 1.0 Subject: Re: [x86 setup 13/33] Header file to produce 16-bit code with gcc References: <11840359321823-git-send-email-hpa@zytor.com> <11840373002601-git-send-email-hpa@zytor.com> <108510B6-B9BE-49D4-BDCA-E25CA20CB29B@kernel.crashing.org> <200707101721.58937.ak@suse.de> <4693EF48.1080209@zytor.com> <20070710214315.GD3492@stusta.de> In-Reply-To: <20070710214315.GD3492@stusta.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org To: Adrian Bunk Cc: "H. Peter Anvin" , Segher Boessenkool , Andi Kleen , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, akpm@linux-foundation.org List-ID: Adrian Bunk wrote: > On Tue, Jul 10, 2007 at 01:42:48PM -0700, H. Peter Anvin wrote: >> Segher Boessenkool wrote: >>> Well at least with -fno-toplevel-reorder it is guaranteed >>> to work (not the same thing as "is working", heh, but fairly >>> close). >>> >>> It seems to me GCC should grow an option to insert .code16gcc >>> by itself (-m16 perhaps?) Or GAS could get a flag to include >>> a file as a prelude before the main thing. Neither will help >>> Linux right now of course. >> -m16 is the right thing, and it also provides a proper hook for >> eventually having a real 16-bit backend (there are at least two >> projects for doing that.) >> >> For now, I have: > > Can't you use the global CFLAGS and append your specific ones? > >> CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ > > -g ??? > >> $(cflags-$(ARCH)) \ >> -Wall -Wstrict-prototypes \ >> -march=i386 -mregparm=3 \ > > Why -march=i386 ? To prevent gcc from using instructions (particularly cmovxx) that not all processors will understand. -- Brian Gerst