Apply the following change from the main trunk:
authorRichard Levitte <levitte@openssl.org>
Wed, 14 Nov 2001 07:18:47 +0000 (07:18 +0000)
committerRichard Levitte <levitte@openssl.org>
Wed, 14 Nov 2001 07:18:47 +0000 (07:18 +0000)
2000-11-01 00:14  levitte

* Configure (1.234), config (1.68), CHANGES (1.638): Add
configuration option to build on Linux on both big-endian and
little-endian MIPS.  Submitted by Ralf Baechle
<ralf@uni-koblenz.de>

CHANGES
Configure
config

diff --git a/CHANGES b/CHANGES
index d9613f73d336ce7c3a56464a58e8e7beb6440580..fa339e4fc0ce3836208a0e5df36043361b3e22f3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
      be changed again when we can guarantee backward binary compatibility.
      [Richard Levitte]
 
+  *) Add configuration option to build on Linux on both big-endian and
+     little-endian MIPS.
+     [Ralf Baechle <ralf@uni-koblenz.de>]
+
   *) Add the possibility to create shared libraries on HP-UX
      [Richard Levitte]
 
index 3125e7b202520d5fb927af226830746cb425cc7f..329a7e9bd0b20cf38b5755f35fbd89c923077e29 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -329,7 +329,8 @@ my %table=(
 "debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 "debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall::-D_REENTRANT:-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn",
 "linux-aout",  "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall::(unknown)::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}",
-"linux-mips",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::",
+"linux-mipsel",   "gcc:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::",
+"linux-mips",   "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::(unknown)::BN_LLONG:::",
 "linux-ppc",    "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
 "linux-m68k",   "gcc:-DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
 "linux-s390",  "gcc:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::BN_LLONG::",
diff --git a/config b/config
index 8d522e87438c0c985c790918798440e264881cc6..f94cc3e58c0d6377823cd43bd21a5268335a948c 100755 (executable)
--- a/config
+++ b/config
@@ -455,7 +455,22 @@ case "$GUESSOS" in
            esac
        fi
        ;;
-  mips-*-linux?) OUT="linux-mips" ;;
+  mips-*-linux?)
+          cat >dummy.c <<EOF
+#include <stdio.h>  /* for printf() prototype */
+        int main (argc, argv) int argc; char *argv[]; {
+#ifdef __MIPSEB__
+  printf ("linux-%s\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+  printf ("linux-%sel\n", argv[1]);
+#endif
+  return 0;
+}
+EOF
+       ${CC} -o dummy dummy.c && OUT=`./dummy ${MACHINE}`
+       rm dummy dummy.c
+       ;;
   ppc-*-linux2) OUT="linux-ppc" ;;
   m68k-*-linux*) OUT="linux-m68k" ;;
   ia64-*-linux?) OUT="linux-ia64" ;;