egcs-980102 configure bug

Blake A. Jones foo@hedono.ugcs.caltech.edu
Thu Jan 8 15:36:00 GMT 1998


I finally found out why egcs has been failing for me on irix6.  In the
INSTALL/SPECIFIC file, it said to use SGI's assembler on irix6, so I
configured with "--without-gnu-as".   But looking at a .s file compiled
with debugging, it said that "-mgas" has been enabled in my build.

Tracing through some of the configure scripts for egcs-2.90.23 (980102),
I think I found the problem.  In gcc/configure line 373, $with_gnu_as is
set to "no" for "--without-gnu-as":

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;

But then at line 562, if $with_gnu_as is set, $gas is set to "yes":

  # With GNU as
  # Check whether --with-gnu-as or --without-gnu-as was given.
  if test "${with_gnu_as+set}" = set; then
    withval="$with_gnu_as"
    gas=yes
  else
    gas=no
  fi

That clause comes from gcc/configure.in line 40:

  # With GNU as
  AC_ARG_WITH(gnu-as,
  [  --with-gnu-as           arrange to work with GNU as.],
  gas=yes,
  gas=no)

So it looks to me like gcc/configure.in:43 should read something like
  gas="$withval",
and similarly for --with-gnu-ld, --with-stabs, and --with-elf handling.
Hopefully those of you who've used autoconf more than I (read: those
who've used it at all) can decide on exactly the right thing to do.

Incidentally, I was pleased that the "workaround" was just to not specify
anything about the assembler when configuring.  I'm so used to software
that doesn't configure correctly, that it didn't even occur to me that I
might not have to force egcs to do the right thing.  Good work, folks.

Thanks,

Blake Jones



More information about the Gcc-bugs mailing list