This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: invalid assembly language generated on Solaris


>  > The following source generates invalid assembly language on
>  > Solaris 2.x with gcc-2.8.x and egcs-1.0.x:
>  > 
>  > 	#include <set>
>  > 	#include <string>
>  > 	set< set<string> > foo;
>  > 
>  > More precisely, it compiles smoothly with -g:
>  > 	$ g++ -g -c foo.cc
>  > 	$ 
>  > but not without -g:
>  > 	$ g++ -c foo.cc
>  > 	/usr/ccs/bin/as: "/var/tmp/cc090YoK.s", line 229: error: can't compute value of an expression involving an external symbol
>  > 	$ 
> 
> I'm not having any problems on Solaris 2.6 using GNU as and
> Solaris' native as:
> 
> $ /tools/gnu/packages/egcs/1.0.3a/bin/egcc -v
> Reading specs from /tools/gnu/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.90.29/specs
> gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
> $ /tools/gnu/packages/egcs/1.0.3a/bin/egcc -g -c foo.cc 
> $ /tools/gnu/packages/egcs/1.0.3a/bin/egcc -g -c foo.cc -B/usr/ccs/bin/
> $ 

You're using the -g option.
That's probably the reason why you don't have any problem.
Try again without -g.
See:
	$ g++ -v
	Reading specs from /home/papadopo/egcs-19980621/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.42/specs
	gcc version egcs-2.91.42 19980621 (gcc2 ss-980502 experimental)
	$ g++ -c foo.cc 
/usr/ccs/bin/as: "/var/tmp/ccewDlO_.s", line 235: error: can't compute value of an expression involving an external symbol
	$ g++ -c ~/GRAPH/essai.cc -B/usr/ccs/bin
	/usr/ccs/bin/as: "/var/tmp/ccSX7SK_.s", line 235: error: can't compute value of an expression involving an external symbol
	g++: file path prefix `/usr/ccs/bin' never used
	$ 

Dimitri


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]