🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2594

gcc doesn't pass ld flag

#2594
From: Marianne Mueller
Date: Tue, 02 May 1989 21:17
37 lines
1520 bytes
In version 1.34 or 1.35, configured for sun4-os4, gcc doesn't pass
the ld flag -Bstatic to the link editor.  

Here's what gcc -v says:
-------------------------
sparc% gcc -o gcc.test -v test.c -lm -Bstatic
gcc version 1.35
 /usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dsparc -Dsun -Dunix
-D__sparc__ -\
D__sun__ -D__unix__ test.c /tmp/cca02001.cpp
GNU CPP version 1.35
 /usr/local/lib/gcc-cc1 /tmp/cca02001.cpp -quiet -dumpbase test.c
-version -o /\
tmp/cca02001.s
GNU C version 1.35 (sparc) compiled by GNU C version 1.35.
 as -o test.o /tmp/cca02001.s
 ld -o gcc.test -e start -dc -dp /lib/crt0.o test.o -lm /usr/local/lib/gcc-gnulib -lc


Here's the demo program:
------------------------
sparc% cat test.c
#include <math.h>
main ()
{
        double x;
        x = exp(1.0);
        printf("exp(1.00)=%8.7e\n", x);
}


p.s. You can accomplish static linking on Suns running SunOS4 by
being sure to tell the link editor an entry point (along with the
-Bstatic flag):

	gcc -c yourprog.c
	ld -e start -X -dc -dp /usr/lib/crt0.o yourprog.o -Bstatic -lm -lc
Technical Details
Message-ID: <102453@sun.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!eos!ames!amdcad!sun!puffin!mrm

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!eos!ames!amdcad!sun!puffin!mrm
From: mrm%puffin@Sun.COM (Marianne Mueller)
Newsgroups: gnu.gcc.bug
Subject: gcc doesn't pass ld flag
Message-ID: <102453@sun.Eng.Sun.COM>
Date: 2 May 89 21:17:03 GMT
Sender: news@sun.Eng.Sun.COM
Reply-To: mrm@sun.UUCP (Marianne Mueller)
Organization: Sun Microsystems, Mountain View
Lines: 37