*BSD News Article 18763


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!haven.umd.edu!uunet!math.fu-berlin.de!uni-paderborn.de!urmel.informatik.rwth-aachen.de!gmd.de!mururoa!veit
From: veit@mururoa.gmd.de (Holger Veit)
Subject: Re: how do I build a kernel with gcc-2.4.5
Message-ID: <1993Jul23.070101.12288@gmd.de>
Sender: veit@mururoa (Holger Veit)
Nntp-Posting-Host: mururoa
Organization: GMD - German National Research Center for Computer Science
References:  <RAM.93Jul21221352@xor.epi.wisc.edu>
Date: Fri, 23 Jul 1993 07:01:01 GMT
Lines: 54

In article <RAM.93Jul21221352@xor.epi.wisc.edu>, ram@xor.epi.wisc.edu (Ram Bhamidipaty) writes:
|> 
|> I guess the subject line says it all.
|> 
|> I build gcc-2.4.5 from scratch using these compile/configure flags:
|> 
|> ./configure --target=i386-ibm-bsd --prefix=/tools/gcc

You are quite out of luck if you haven't at least the option
#define HANDLE_SYSV_PRAGMA 1
in gcc-2.4.5/config/i386/i386bsd.h
Also, in the 386bsd code there are a number of "unaligned" structures,
which must be embraced by 
#pragma pack(1)
struct {...}
#pragma pack(4)

Unaligned structures are structures with record elements that if contiguously
allocated overlap a double word boundary, e.g.
struct foo {
   char a;	/* at offset 0 */
   long b;	/* at offset 1 to 4, i.e. overlapping
};

Fortunately, this is only relevant for low level structures the 386 cpu directly
deals with. From memory I remember at least "segments.h" having this problem.

|> 
|> Is that correct? Also do I need to get and special libraried to work
|> with gcc or should the libraries that come with NetBSD-0.8 work?

The NetBSD-libs and includes might or might not help with the enquire problem,
but do not fix the reboot. The NetBSD kernel sources together with the
gnu sources from there should fix this (they should have HANDLE_SYSV_PRAGMA
defined).

|> 
|> When I do build the kernel I get something that constantly reboots.
|> 
|> Thanks for any info.
|> -Ram
|> --
|> --------------
|> Ram Bhamidipaty                     use this ->ram@epidat.epi.wisc.edu
|> Department of Preventive Medicine   ignore the return address in the header
|> University of Wisconsin, Madison    of this message. It may be wrong.

-- 
         Dr. Holger Veit                   | INTERNET: Holger.Veit@gmd.de
|  |   / GMD-SET German National Research  | Phone: (+49) 2241 14 2448
|__|  /  Center for Computer Science       | Fax:   (+49) 2241 14 2342
|  | /   P.O. Box 13 16                    | Had a nightmare yesterday:
|  |/    Schloss Birlinghoven              | My system started up with
         53731 St. Augustin, Germany       | ... Booting vmunix.el ...