[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: cvs
From: |
Camm Maguire |
Subject: |
[Gcl-devel] Re: cvs |
Date: |
05 Jun 2002 14:39:14 -0400 |
Greetings! OK, please try the latest and see if it works for you.
Take care,
address@hidden writes:
> Here is the result of the foo.c compilation
> $ gcc -t -o foo foo.c -lbfd -liberty
> /usr/local/sparc-sun-solaris2.6/bin/ld: mode elf32_sparc
> /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/crt1.o
> /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/crti.o
> /usr/ccs/lib/values-Xa.o
> /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/crtbegin.o
> /var/tmp/ccp2qgtU.o
> (/usr/local/lib/libbfd.a)init.o
> -lc (/usr/lib/libc.so)
> /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/crtend.o
> /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/crtn.o
> $
>
> Notice that libiberty is not included. if you use bfd_perror,
> sh xxx
> /usr/local/lib/libbfd.acpu-sparc.o /usr/local/lib/libiberty.axstrerror.o
> $ cat xxx
>
> echo "int main() {bfd_perror();return 0;}" >foo.c
> MP=`gcc -t -o foo foo.c -lbfd -liberty 2>&1 |tr -d '()' |
> nawk '
> /\/libbfd/ || /\/libiberty/ {for (j=1;j<=NF;j++) {sub("\.so$",".a",$j); if
> ($j ~
> "libbfd") a=$j; if ($j ~ "libiberty") b=$j;}} END {print a " " b}'`
> echo $MP
>
> $
> This will work if you change the tr command as follows:
> sh xxx
> /usr/local/lib/libbfd.a /usr/local/lib/libiberty.a
> $ cat xxx
>
> echo "int main() {bfd_perror();return 0;}" >foo.c
> MP=`gcc -t -o foo foo.c -lbfd -liberty 2>&1 |tr '()' ' ' |
> nawk
> '/\/libbfd/ || /\/libiberty/ {for (j=1;j<=NF;j++) {sub("\.so$",".a",$j); if
> ($j
> ~ "libbfd") a=$j; if ($j ~ "libiberty") b=$j;}} END {print a " " b}'`
> echo $MP
>
> $
> Dan
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gcl-devel] Re: cvs,
Camm Maguire <=