From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JIokK-0004mj-U8 for mharc-grub-devel@gnu.org; Sat, 26 Jan 2008 12:23:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIokJ-0004me-41 for grub-devel@gnu.org; Sat, 26 Jan 2008 12:23:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIokG-0004lb-IY for grub-devel@gnu.org; Sat, 26 Jan 2008 12:23:09 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIokG-0004lS-Fw for grub-devel@gnu.org; Sat, 26 Jan 2008 12:23:08 -0500 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JIokG-0003Kk-4J for grub-devel@gnu.org; Sat, 26 Jan 2008 12:23:08 -0500 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JIokE-0004lR-0z for grub-devel@gnu.org; Sat, 26 Jan 2008 18:23:07 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1JIoiW-00017L-8g for grub-devel@gnu.org; Sat, 26 Jan 2008 18:21:20 +0100 Date: Sat, 26 Jan 2008 18:21:20 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080126172120.GA4119@thorin> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: Compiling grub2 on *BSD? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jan 2008 17:23:11 -0000 On Sat, Jan 26, 2008 at 09:08:59AM -0800, walt wrote: > As a test of my tolerance for frustration I'm building grub2 on FreeBSD, > DragonFlyBSD, NetBSD, and OpenBSD, and (naturally) each build fails in a > different way, but all the problems seem related to mutations of gcc. > > NetBSD: > > The problem is the -nostdlib flag when linking kernel.exec. What is the problem initially? > Adding -lc > and -lgcc solves part of the problem, but then libc wants crt0.o: > > # nm --defined-only /usr/lib/crt0.o > 00000018 T ___start > 00000000 D __progname <---- Needed by libc > 00000000 B __ps_strings > 00000000 T __start > 000000f0 T _rtld_setup > 00000000 T _start <----- Conflicts with i386/pc/startup.S > 00000004 C environ <----- Needed by libc You don't want -lc, adding that is wrong. > OpenBSD: > > OBSD is off on another planet, as usual. They use a non-standard > definition of memcpy in : > void *memcpy(void *, const void *, size_t) > __attribute__ ((__bounded__(__buffer__,1,3))) > __attribute__ ((__bounded__(__buffer__,2,3))); What's the error? > FreeBSD: > > lnxboot.S: Assembler messages: > lnxboot.S:49: Error: `0x200+data_start - data_next(%ebx,%eax)' is not a > valid 16 bit base/index expression > lnxboot.S:264: Error: `(%esi,%eax)' is not a valid 16 bit base/index > expression > lnxboot.S:265: Error: `(%edi,%eax)' is not a valid 16 bit base/index > expression I recall having seen this before. Please, can you check the list archives? I think we solved it for other files, but it might have been respawned in lnxboot.S. > DragonFlyBSD: > > This was easy. All I did was add -lc and -lgcc to kernel_img_LDFLAGS in > i386-pc.mk. I have no idea why the same trick doesn't work for NetBSD. I'm surprised -lc works. Maybe gcc/ld skips it. Anyway, you should tell us the initial error. Thanks! -- Robert Millan I know my rights; I want my phone call! What use is a phone call… if you are unable to speak? (as seen on /.)