Configure broken on MIPS when uname returns mipsel or mips64el

Ao Qi aoqi at loongson.cn
Wed May 23 10:18:11 UTC 2018


Hi all,
I tried to configure jdk/jdk on MIPS, but I failed. The output of configure:
...
checking for pandoc... no
checking build system type...
/home/loongson/aoqi/jdk/make/autoconf/build-aux/config.guess: unable
to guess system type

This script, last modified 2012-02-10, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

If the version you run
(/home/loongson/aoqi/jdk/make/autoconf/build-aux/config.guess) is
already up to date, please
send the following data and any information you think might be
pertinent to <config-patches at gnu.org> in order to provide the needed
information to handle your system.

config.guess timestamp = 2012-02-10

uname -m = mips64el
uname -r = 3.10.0-693.5.2.ns7.032.mips64el
uname -s = Linux
uname -v = #1 SMP PREEMPT Fri Dec 29 16:42:48 CST 2017

/usr/bin/uname -p = mips64el
/bin/uname -X     =

hostinfo               =
/bin/universe          =
/usr/bin/arch -k       =
/bin/arch              = mips64el
/usr/bin/oslevel       =
/usr/convex/getsysinfo =

UNAME_MACHINE = mips64el
UNAME_RELEASE = 3.10.0-693.5.2.ns7.032.mips64el
UNAME_SYSTEM  = Linux
UNAME_VERSION = #1 SMP PREEMPT Fri Dec 29 16:42:48 CST 2017
configure: error: cannot guess build type; you must specify one
configure exiting with result code 1
...

I think the reason is that uname returns mips64el.
autoconf-config.guess can handle mips and mips64, but cannot handle
mipsel and mips64el.
I made a patch to pass the configure:

$ hg diff
diff -r 31361382634b make/autoconf/build-aux/autoconf-config.guess
--- a/make/autoconf/build-aux/autoconf-config.guess Tue May 22
10:08:04 2018 -0700
+++ b/make/autoconf/build-aux/autoconf-config.guess Wed May 23
18:06:52 2018 +0800
@@ -977,6 +977,9 @@
  eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
  test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  ;;
+    mipsel:Linux:*:* | mips64el:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
     or32:Linux:*:*)
  echo ${UNAME_MACHINE}-unknown-linux-gnu
  exit ;;


I think ppc has the same problem, but it is fixed in
make/autoconf/build-aux/config.guess.

Thanks,
Ao Qi



More information about the build-dev mailing list