This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Re: other/9031
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: gcc-gnats at gcc dot gnu dot org, nobody at gcc dot gnu dot org, dave dot anglin at nrc dot ca, gcc-patches at gcc dot gnu dot org, binutils at sources dot redhat dot com
- Date: 27 Dec 2002 01:11:11 -0200
- Subject: Re: PATCH: Re: other/9031
- Organization: GCC Team, Red Hat
- References: <200212262216.gBQMG2v2000775@hiauly1.hia.nrc.ca>
On Dec 26, 2002, "John David Anglin" <dave@hiauly1.hia.nrc.ca> wrote:
> The enclosed patch fixes the problem reported in other/9031. The
> technique for determining LD is derived from that used by the
> libtool AC_PROG_LD macro.
> + case $host in
> + *-*-mingw*)
> + gcc_prog_ld="`$CC -print-prog-name=ld 2>&1 | tr -d '\015'`" ;;
> + *)
> + gcc_prog_ld="`$CC -print-prog-name=ld 2>&1`" ;;
> + esac
I don't think this is appropriate. If mingw's CRs are causing
trouble, they'd cause trouble when mingw is the build machine, not the
host. So perhaps it would be more reasonable to change case $host to
case $build. Besides, I suppose the problem may actually be caused by
the unnecessary use of double quotes in the assignment. I *think*
taking them out may cause the needless CR to go away without affecting
anything else.
Another issue is that CC's ending with gcc may not be a good test for
whether the host compiler is CC. I realize this is not the only
occurrence of case $CC in *gcc) in the configure script, but even that
one should IMHO be changed so as to use something more similar to
autoconf's test for whether we are using GNU C.
Also, pathname canonicalization is tricky business. Replacing
foo/../ with / is only a good idea when foo is not a soft link. Do we
really need this?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer