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: -fPIC flag does'nt work on freebsd


Yes, you are correct. There exists 2 aseemblers on my machine, and
the wrong one is in my path for egcs-gcc.

Since both the gcc and egcs-gcc are passing the -k flag, they both
are assuming the old assembler.

Satish
*********
snowy:/homes/balay/junk>gcc -v -fPIC -c sizeof.c 
gcc version 2.6.3
 /usr/libexec/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=6 -Dunix -Di386 -D__FreeBSD__=2 -D__unix__ -D__i386__ -D__FreeBSD__=2 -D__unix -D__i386 -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386) sizeof.c /var/tmp/cc012484.i
GNU CPP version 2.6.3 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
End of search list.
 /usr/libexec/cc1 /var/tmp/cc012484.i -quiet -dumpbase sizeof.c -version -fPIC -o /var/tmp/cc012484.s
GNU C version 2.6.3 (80386, BSD syntax) compiled by GNU C version 2.6.3.
 /usr/bin/as -k -o sizeof.o /var/tmp/cc012484.s
snowy:/homes/balay/junk>/home/alice/egcs/freebsd/bin/gcc -v -fPIC -c sizeof.c 
Reading specs from /home/alice/egcs/freebsd/lib/gcc-lib/i386-unknown-freebsd2.1.0/egcs-2.90.23/specs
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
 /home/alice/egcs/freebsd/lib/gcc-lib/i386-unknown-freebsd2.1.0/egcs-2.90.23/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=90 -Dunix -Di386 -D__FreeBSD__ -D__386BSD__ -D__unix__ -D__i386__ -D__FreeBSD__ -D__386BSD__ -D__unix -D__i386 -Asystem(unix) 
-Asystem(FreeBSD) -Acpu(i386) -Amachine(i386) -Di386 -Asystem(unix) -Acpu(i386) -Amachine(i386) -D__i386__ -Asystem(unix) -Acpu(i386) -Amachine(i386) sizeof.c /var/tmp/cc012488.i
GNU CPP version egcs-2.90.23 980102 (egcs-1.0.1 release) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /home/alice/egcs/freebsd/i386-unknown-freebsd2.1.0/include
 /home/alice/egcs/freebsd/lib/gcc-lib/i386-unknown-freebsd2.1.0/egcs-2.90.23/include
 /usr/include
End of search list.
 /home/alice/egcs/freebsd/lib/gcc-lib/i386-unknown-freebsd2.1.0/egcs-2.90.23/cc1 /var/tmp/cc012488.i -quiet -dumpbase sizeof.c -version -fPIC -o /var/tmp/cc012488.s
GNU C version egcs-2.90.23 980102 (egcs-1.0.1 release) (i386-unknown-freebsd2.1.0) compiled by GNU C version egcs-2.90.23 980102 (egcs-1.0.1 release).
 as -k -o sizeof.o /var/tmp/cc012488.s
as: unrecognized option `-k'
snowy:/homes/balay/junk>where as
/usr/local/bin/as
/usr/bin/as
snowy:/homes/balay/junk>/usr/local/bin/as -v
GNU assembler version 2.7 (386bsd)
^C
snowy:/homes/balay/junk>/usr/bin/as -v
GNU assembler version 1.92.3, FreeBSD $Revision: 1.4 $
^C

On Thu, 19 Mar 1998, Jim Wilson wrote:

> Try using the -v flag with both the old gcc and the new egcs gcc to see
> what the difference in assembler flags is.
> 
> Also check to see what assembler each compiler is using.  It may be that
> egcs is using a different assembler.  I would guess that is the problem
> here.  The old gcc is perhaps using the very old as that comes with freebsd
> and which requires the -k flag, whereas the new egcs gcc may perhaps be using
> a new as that you installed from a recent binutils which doesn't want the
> -k option.  If that is the case, then we need some kind of configuration
> change to handle the old assembler differently than the new assembler.
> 
> Jim
> 
> 



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