public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: PATCH: Re: other/9031
Date: Sat, 04 Jan 2003 21:06:00 -0000	[thread overview]
Message-ID: <20030104210601.29689.qmail@sources.redhat.com> (raw)

The following reply was made to PR other/9031; it has been noted by GNATS.

From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: aoliva@redhat.com (Alexandre Oliva)
Cc: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, dave.anglin@nrc.ca,
   gcc-patches@gcc.gnu.org, binutils@sources.redhat.com, neroden@twcny.rr.com
Subject: Re: PATCH: Re: other/9031
Date: Sat, 4 Jan 2003 15:58:55 -0500 (EST)

 > > Ok, but I wouldn't mind if you waited for Nathan's patch to go in
 > > before adjusting yours.  If you agree, consider the updated patch
 > > pre-approved, but please post it, for the record.
 > 
 > In fact, consider now sinclude()ing libtool.m4 and using its
 > AC_PROG_LD macro.
 
 I have installed the following revised version of the patch on the main.
 The code now checks to see if LD is set.  There are some minor variable
 name changes and other revisions due to the fact that the code is now
 processed by autoconf.
 
 Tested on hppa64-hp-hpux11.11 and hppa2.0w-hp-hpux11.11.
 
 Dave
 -- 
 J. David Anglin                                  dave.anglin@nrc.ca
 National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)
 
 2003-01-04 John David Anglin  <dave.anglin@nrc.ca>
 
 	* configure.in (LD): Improve test for gcc.  Try to set LD to the ld used
 	by gcc if LD is not defined and we are not doing a Canadian Cross.
 	* configure: Rebuilt.
 
 Index: configure.in
 ===================================================================
 RCS file: /cvsroot/gcc/gcc/configure.in,v
 retrieving revision 1.202
 diff -u -3 -p -r1.202 configure.in
 --- configure.in	28 Dec 2002 17:57:14 -0000	1.202
 +++ configure.in	29 Dec 2002 19:01:47 -0000
 @@ -1456,12 +1456,14 @@ else
    YACC="\$(USUAL_YACC)"
  
    # If CC is still not set, try to get gcc.
 +  cc_prog_is_gcc=
    if test -z "${CC}" ; then
      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
      for dir in $PATH; do
        test -z "$dir" && dir=.
        if test -f $dir/gcc; then
  	CC="gcc"
 +	cc_prog_is_gcc=yes
  	echo 'void f(){}' > conftest.c
  	if test -z "`${CC} -g -c conftest.c 2>&1`"; then
  	  CFLAGS=${CFLAGS-"-g -O2"}
 @@ -1477,11 +1479,20 @@ else
      IFS="$save_ifs"
      CC=${CC-cc}
    else
 +    # Determine if we are using gcc.
 +    cat > conftest.c <<EOF
 +#ifdef __GNUC__
 +  yes;
 +#endif
 +EOF
 +    if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
 +      cc_prog_is_gcc=yes
 +    fi
 +    rm -f conftest.c
      if test -z "${CFLAGS}"; then
        # Here CC is set but CFLAGS is not.  Use a quick hack to use -O2 if CC
        # is set to a version of gcc.
 -      case "${CC}" in
 -      *gcc)
 +      if test "$cc_prog_is_gcc" = yes; then
  	echo 'void f(){}' > conftest.c
  	if test -z "`${CC} -g -c conftest.c 2>&1`"; then
  	  CFLAGS=${CFLAGS-"-g -O2"}
 @@ -1491,7 +1502,25 @@ else
  	  CXXFLAGS=${CXXFLAGS-"-O2"}
  	fi
  	rm -f conftest*
 -	;;
 +      fi
 +    fi
 +  fi
 +
 +  # We must set the default linker to the linker used by gcc for the correct
 +  # operation of libtool.  If LD is not defined and we are using gcc, try to
 +  # set the LD default to the ld used by gcc.
 +  if test -z "$LD"; then
 +    if test "$cc_prog_is_gcc" = yes; then
 +      case $build 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
 +      case $gcc_prog_ld in
 +      # Accept absolute paths.
 +      [[\\/]* | [A-Za-z]:[\\/]*)]
 +        LD="$gcc_prog_ld" ;;
        esac
      fi
    fi


             reply	other threads:[~2003-01-04 21:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-04 21:06 John David Anglin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-28  1:26 Alexandre Oliva
2002-12-27 22:36 Alexandre Oliva
2002-12-27 22:26 John David Anglin
2002-12-26 20:16 John David Anglin
2002-12-26 19:16 Alexandre Oliva
2002-12-26 14:26 John David Anglin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030104210601.29689.qmail@sources.redhat.com \
    --to=dave@hiauly1.hia.nrc.ca \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).