🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #42620

trouble building gcc on SCO

#42620
From: Bill Gerlt
Date: Thu, 16 Nov 1995 00:00
130 lines
5158 bytes
(If this isn't the right place to send email about problems with
building gcc, please direct me to the correct place.)

I'm having some problems building gcc for SCO.  I only have these
problems when I use the --with-gnu-as --with-gnu-ld --with-stabs
options to "configure".  It builds fine if I don't use these options.

I was a little confused as to whether I really need those options or
not.  I want to be able to use gdb to debug C++ code.  I thought that
I needed to specify --with-stabs to do that.  I then gathered that if
I specify --with-stabs I should also specify --with-gnu-as and
--with-gnu-ld for this platform (i386-unknown-sco3.2v4.2).

Question 1
----------

Do I need to specify those options to get full gdb debugging support
for this platform for both C and C++?


Before I build gcc, I build and install bison, flex, ld, gas, and the
other stuff in the binutils distribution.  They seem to build and
install fine.  I then run configure with the options shown above,
followed by a "make LANGUAGES=c".

Everything goes OK until it tries to build the "enquire" program.  ld
dies because it cannot find gcc.ifile.  The exact message:

        ./xgcc -B./  -DIN_GCC   -g -I./include  enquire.o -o enquire
/usr/local/i386-unknown-sco3.2v4.2/bin/ld: cannot open gcc.ifile: No such file or director
y
*** Error code 1

After some poking around, I found svr3.ifile and svr3z.ifile in the
gcc-2.6.3 directory.  Those files contain comments saying that they
should be installed in 
/usr/local/lib/gcc-lib/i386-unknown-sco3.2v4.2/2.6.3 as gcc.ifile and
gccz.ifile, respectively.  I did that and then tried "make
LANGUAGES=c" again.  Again I broke trying to build the enquire
program.  The exact message:

        ./xgcc -B./  -DIN_GCC   -g -I./include  enquire.o -o enquire
/usr/local/i386-unknown-sco3.2v4.2/bin/ld:/usr/local/lib/gcc-lib/i386-unknown-sco3.2v4.2/2
.6.3/gcc.ifile: file format not recognized; treating as linker script
/usr/local/i386-unknown-sco3.2v4.2/bin/ld:/usr/local/lib/gcc-lib/i386-unknown-sco3.2v4.2/2
.6.3/gcc.ifile:23: parse error
*** Error code 1

I have verified that the GNU tools are being used.  They are installed
in /usr/local/bin, which is the first thing in my PATH.  ld -v and as
-v both show that I'm getting the GNU stuff and not what's native to
my machine.  I sort of tried to figure out what's going on, but I'm
puzzled.  I figured either ld, bison, or flex might have been built
in correctly with the rcc compiler on the platform.  I went back and
tried to rebuild them with the gcc I built without the configure
options listed above.  It didn't seem to help.  I have the same
problems.

Question 2
----------

Any ideas how to get past the problems with ld?  I do have a clean
gcc now to work with.  I built stage3 and the "make compare"
afterwards was clean.


In case it's useful:

	ld -v => ld version 2.5.2 (with BFD 2.5)
	gcc -v => gcc version 2.6.3

Contents of svr3.ifile (same as gcc.ifile):
/*
 *      svr3.ifile - for collectless G++ on i386 System V.
 *	Leaves memory configured at address 0.
 *	
 *      Install this file as $prefix/gcc-lib/TARGET/VERSION/gcc.ifile
 *
 *	BLOCK to an offset that leaves room for many headers ( the value
 *	here allows for a file header, an outheader, and up to 11 section 
 *	headers on most systems.
 *	BIND to an address that includes page 0 in mapped memory. The value
 *	used for BLOCK should be or'd into this value. Here I'm setting BLOCK
 *	to 0x200 and BIND to ( value_used_for(BLOCK) )
 *	If you are using shared libraries, watch that you don't overlap the
 *	address ranges assigned for shared libs.
 *
 *	GROUP BIND to a location in the next segment.  Here, the only value
 *	that you should change (I think) is that within NEXT, which I've set
 *	to my hardware segment size. You can always use a larger size, but not
 *	a smaller one.
 */
SECTIONS
{
	.text BIND(0x000200) BLOCK (0x200) :
	{
		 /* plenty for room for headers */
		*(.init)
		*(.text)
		vfork = fork; /* I got tired of editing peoples sloppy code */
		*(.fini)
	}
	GROUP BIND( NEXT(0x400000) + (ADDR(.text) + (SIZEOF(.text)) % 0x1000)):
	{
			.data : {
				__CTOR_LIST__ = . ; 
				. += 4 ;	/* leading NULL */
				*(.ctor) 
				. += 4 ;	/* trailing NULL */
				__DTOR_LIST__ = . ;
				. += 4 ;	/* leading NULL */
				*(.dtor) 
				. += 4 ; 	/* trailing NULL */
			 }
			.bss : { }
	}
}

Any help or hints are greatly appreciated.  I don't have a real
internet connection all the time, but email works.

Thanks,

Bill Gerlt

bill_gerlt@i2.com


P.S. - No, I don't really want to use SCO, but I'm being forced to :^)
Technical Details
Message-ID: <9511152356.AA07522@nak.intellection.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,4b2c038ddca268f0,start
X-Google-Attributes: gid11318c,public
From: gerlt@i2.COM (Bill Gerlt)
Subject: trouble building gcc on SCO
Date: 1995/11/16
Message-ID: <9511152356.AA07522@nak.intellection.com>
X-Deja-AN: 119515610
distribution: gnu
sender: daemon@cis.ohio-state.edu
organization: GNUs Not Usenet
reply-to: bill_gerlt@i2.com
newsgroups: gnu.gcc.help