[comp.lang.c] Another GCC 1.39 and Sys Vr4 problem.

toma@swsrv1.cirr.com (Tom Armistead) (04/22/91)

Thanks to the replies about hot to fix the messed up header files for Sys Vr4
so that GCC doesn't barf on them.  The solution was the fixinclude script
that comes with GCC 1.39.

Now for the next problem: This is on Unix System Vr4

I have gcc compiled just fine and it will produce executable files just fine,
but if I use the -g command line option, I get an error from cc1 saying that
'-g' is an invalid option - Here's an example of the error?

    /home/src/gcc$ make CC=stage1/gcc CFLAGS="-v -g -O -Bstage1/"

	    stage1/gcc -v -g -O -Bstage1/ -I. -I. -I./config \
	      -DSTANDARD_STARTFILE_PREFIX=\"/usr/local/lib/\" \
	      -DSTANDARD_EXEC_PREFIX=\"/usr/local/lib/gcc-\" -c \
	      `echo ./gcc.c | sed 's,^\./,,'`
    gcc version 1.39
     stage1/cpp -v -DSTANDARD_STARTFILE_PREFIX="/usr/local/lib/" -DSTANDARD_EXEC_PREFIX="/usr/local/lib/gcc-" -I. -I. -I./config -undef -D__GNUC__ -Dunix -Di386 -D__unix__ -D__i386__ -D__OPTIMIZE__ gcc.c /var/tmp/cca0028J.cpp
    GNU CPP version 1.39
     stage1/cc1 /var/tmp/cca0028J.cpp -quiet -dumpbase gcc.c -g -O -version -o /var/tmp/cca0028J.s

    cc1: Invalid option `-g'

    GNU C version 1.39 (80386, ATT syntax) compiled by CC.
    default target switches: -m80387
    *** Error code 1 (bu21)

    make: fatal error.


Again, if I don't use '-g' all works fine, I can even build gcc using itself.

I used i386v4 for the config type.  I uncommented the line that allowed
linking to /usr/ucblib/libucb.a to get the alloca routine.  I took the defines
for 'long double' out of hard-params.c (was causing comile errors).  And
that's it...

Any suggestion or Ideas?

Tom
-- 
Tom Armistead - Software Services - 2918 Dukeswood Dr. - Garland, Tx  75040
===========================================================================
toma@swsrv1.cirr.com                {egsner,letni,ozdaltx,void}!swsrv1!toma

herbie@dec18.cs.monash.edu.au (Andrew Herbert) (04/23/91)

In <1991Apr22.005126.425@swsrv1.cirr.com> toma@swsrv1.cirr.com (Tom Armistead) writes:

>I have gcc compiled just fine and it will produce executable files just fine,
>but if I use the -g command line option, I get an error from cc1 saying that
>'-g' is an invalid option - Here's an example of the error?

gcc 1.39 can't produce debugging information for R4's ELF object file format
(hope this isn't too tautological :), so the compiler -g option is disabled.
I assume Dell have modified gcc to produce symbol and line number info with
ELF - has anyone else done any work on this?

Andrew Herbert
herbie@dec18.cs.monash.edu.au

tony@mcrsys.UUCP (Tony Becker) (04/23/91)

From article <1991Apr22.005126.425@swsrv1.cirr.com>, by toma@swsrv1.cirr.com (Tom Armistead):
> 
>     cc1: Invalid option `-g'
> 

tom:

in ./config/tm-i386v4.h sdb debugging is turned off. It is my understanding
that gcc realy wants berkly a.out headers to use gdb. It  can tolerate
coff format using coff-encap, but you have elf.

-- 
tony ,....

scotte@applix.com (Scott Evernden) (04/23/91)

In article <1991Apr22.005126.425@swsrv1.cirr.com> toma@swsrv1.cirr.com (Tom Armistead) writes:
>Thanks to the replies about hot to fix the messed up header files for Sys Vr4
>so that GCC doesn't barf on them.  The solution was the fixinclude script
>that comes with GCC 1.39.
>
>Now for the next problem: This is on Unix System Vr4
>
>I have gcc compiled just fine and it will produce executable files just fine,
>but if I use the -g command line option, I get an error from cc1 saying that
>'-g' is an invalid option - Here's an example of the error?

I don't yet have 1.39 but do have a 1.37.1 hacked for SVr4.  I couldn't
make the -g option work because the compiler apparently does not emit 
assembler debugger directives in the format expected by as.

I would suspect that this capability was "tied off" in 1.39, maybe?

-scott

dcm@baldur.dell.com (Dave McCracken) (04/24/91)

scotte@applix.com (Scott Evernden) writes:

>In article <1991Apr22.005126.425@swsrv1.cirr.com> toma@swsrv1.cirr.com (Tom Armistead) writes:
>>I have gcc compiled just fine and it will produce executable files just fine,
>>but if I use the -g command line option, I get an error from cc1 saying that
>>'-g' is an invalid option - Here's an example of the error?

>I don't yet have 1.39 but do have a 1.37.1 hacked for SVr4.  I couldn't
>make the -g option work because the compiler apparently does not emit 
>assembler debugger directives in the format expected by as.

>I would suspect that this capability was "tied off" in 1.39, maybe?

Yes, it has been temporarily disabled.  There is at least one project
underway to teach gcc how to emit ELF debug statements (the format is
called DWARF), but as far as I know, it's not released yet.  It is
passed to the assembler in a particularly ugly fashion and is totally
different than a.out or COFF, so it's a non-trivial task.


--
Dave McCracken      dcm@dell.dell.com      (512) 343-3720
Dell Computer       9505 Arboretum Blvd    Austin, TX 78759-7299

meissner@osf.org (Michael Meissner) (04/25/91)

In article <1991Apr23.033656.22411@mcrsys.UUCP> tony@mcrsys.UUCP (Tony Becker) writes:

| From article <1991Apr22.005126.425@swsrv1.cirr.com>, by toma@swsrv1.cirr.com (Tom Armistead):
| > 
| >     cc1: Invalid option `-g'
| > 
| 
| tom:
| 
| in ./config/tm-i386v4.h sdb debugging is turned off. It is my understanding
| that gcc realy wants berkly a.out headers to use gdb. It  can tolerate
| coff format using coff-encap, but you have elf.

No it can produce normal COFF debug information without COFF encap.
It's just the dwarf information that SV.4 uses is not COFF.  GCC 2.00
will support this (the work is being done by Ron Guilmette).  Whether
or not the 386 assembler is up to the task, I knoweth not.

Because adding a new debug format is a 'feature' rather than fixing a
bug, the two new debug formats (dwarf and MIPS) will probably not be
added to the FSF 1.xx releases.  Patches may be around though.....
--
Michael Meissner	email: meissner@osf.org		phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142

Considering the flames and intolerance, shouldn't USENET be spelled ABUSENET?