From nobody@FreeBSD.ORG Wed May 12 07:57:31 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 4275C15383; Wed, 12 May 1999 07:57:31 -0700 (PDT)
Message-Id: <19990512145731.4275C15383@hub.freebsd.org>
Date: Wed, 12 May 1999 07:57:31 -0700 (PDT)
From: murphyp1@msu.edu
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: gcc 2.7.2.1 gets bad magic error linking aout binary
X-Send-Pr-Version: www-1.0

>Number:         11669
>Category:       bin
>Synopsis:       gcc 2.7.2.1 gets bad magic error linking aout binary
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 12 08:00:00 PDT 1999
>Closed-Date:    Thu May 24 02:01:02 PDT 2001
>Last-Modified:  Thu May 24 02:01:13 PDT 2001
>Originator:     Patrick Murphy
>Release:        3.1-RELEASE
>Organization:
Michigan State University
>Environment:
FreeBSD voyager.ais.msu.edu 3.1-RELEASE 
FreeBSD 3.1-RELEASE #4: Fri Apr  2 13:59:12 EST 1999
murphyp1@voyager.ais.msu.edu:/usr/src/sys/compile/VOYAGER  i386
>Description:
I am using the gcc 2.7.2.1 compiler provided with FreeBSD to build
a program that needs to link with the interbase FreeBSD port which
was built for 2.2.8 (it is in aout format).  I can compile fine with 
the -aout flag, but when the link step is run I get the following
error message:

cc -o d20upd01 -aout d20upd01.o d20misc.o d20trmio.o -lgds -L/usr/interbase/lib/
ld: /usr/lib/libgcc.a(): bad magic
*** Error code 1

Stop.

I have also tried setting the OBJFORMAT to aout and have verified that
the ld version being invoked is the one in /usr/libexec/aout.  I do have
aout support (2.2 Compatability) loaded on my system.  I can run aout
binaries just fine.  The interbase DB works as does netscape.  I also
tried copying the /usr/lib/libgcc.a file from another 3.1-RELEASE box
but that did not correct the problem either.

I did compile a small test program that does not use the interbase 
library with -aout, and it will not link either.  That full compile
output is below:
cc -g -aout -c d65mkupd.c
cc -g -aout -c d65misc.c
cc -o d65mkupd -g -aout d65mkupd.o d65misc.o 
ld: /usr/lib/libgcc.a(): bad magic
*** Error code 1

Stop.




>How-To-Repeat:
setenv OBJFORMAT aout
cc -g -aout -c d65mkupd.c
cc -g -aout -c d65misc.c
cc -o d65mkupd -g -aout d65mkupd.o d65misc.o 

>Fix:


>Release-Note:
>Audit-Trail:

From: Brian Topping <topping@digidemic.com>
To: freebsd-gnats-submit@freebsd.org, murphyp1@msu.edu
Cc:  
Subject: Re: bin/11669: gcc 2.7.2.1 gets bad magic error linking aout binary
Date: Thu, 21 Oct 1999 14:25:26 -0700

 Hello,
 
 I am having the same problem using 3.2-RELEASE, GCC 2.7.2.3 while
 building the 3.3-STABLE tree using 'make upgrade'.  Any ideas
 appreciated.
 
 Brian Topping
 topping@digidemic.com
 
 
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Thu May 24 02:01:02 PDT 2001 
State-Changed-Why:  
overtaken by events 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=11669 
>Unformatted:
