common/autoconf/build-aux/config.sub

Wed, 11 Mar 2015 14:22:43 -0400

author
aph
date
Wed, 11 Mar 2015 14:22:43 -0400
changeset 1321
2025e237b2a1
parent 576
b66c81dfa291
child 1324
281cff475536
permissions
-rw-r--r--

8064357: AARCH64: Top-level JDK changes
Reviewed-by: ihse, twisti

aph@1321 1 #!/bin/sh
ohair@576 2 #
aph@1321 3 # Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
ohair@576 4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@576 5 #
ohair@576 6 # This code is free software; you can redistribute it and/or modify it
ohair@576 7 # under the terms of the GNU General Public License version 2 only, as
aph@1321 8 # published by the Free Software Foundation.
ohair@576 9 #
ohair@576 10 # This code is distributed in the hope that it will be useful, but WITHOUT
ohair@576 11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@576 12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@576 13 # version 2 for more details (a copy is included in the LICENSE file that
ohair@576 14 # accompanied this code).
ohair@576 15 #
ohair@576 16 # You should have received a copy of the GNU General Public License version
ohair@576 17 # 2 along with this work; if not, write to the Free Software Foundation,
ohair@576 18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@576 19 #
ohair@576 20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@576 21 # or visit www.oracle.com if you need additional information or have any
ohair@576 22 # questions.
ohair@576 23 #
ohair@576 24
aph@1321 25 # This is a wrapper for the config.guess from autoconf. The latter
aph@1321 26 # does not know about all of our platforms. Instead of patching the
aph@1321 27 # autoconf system (which might easily get lost in a future update), we
aph@1321 28 # wrap it and fix the broken property, if needed.
ohair@425 29
aph@1321 30 DIR=`dirname $0`
ohair@425 31
aph@1321 32 # First, filter out everything that doesn't begin with "aarch64-"
aph@1321 33 if ! echo $* | grep '^aarch64-' >/dev/null ; then
aph@1321 34 . $DIR/autoconf-config.sub "$@"
aph@1321 35 # autoconf-config.sub exits, so we never reach here, but just in
aph@1321 36 # case we do:
aph@1321 37 exit
aph@1321 38 fi
ohair@425 39
ohair@425 40 while test $# -gt 0 ; do
aph@1321 41 case $1 in
aph@1321 42 -- ) # Stop option processing
aph@1321 43 shift; break ;;
aph@1321 44 aarch64-gnu )
aph@1321 45 sub_args="$sub_args aarch64-unknown-gnu"
aph@1321 46 shift; ;;
aph@1321 47 aarch64-linux )
aph@1321 48 sub_args="$sub_args aarch64-unknown-linux-gnu"
aph@1321 49 shift; ;;
aph@1321 50 aarch64-*-linux )
aph@1321 51 os=`echo $1 | sed 's/aarch64-\(.*\)-linux/\1/'`
aph@1321 52 config="aarch64-unknown-linux-gnu"
aph@1321 53 sub_args="$sub_args $config"
aph@1321 54 shift; ;;
aph@1321 55 aarch64-*-gnu )
aph@1321 56 os=`echo $1 | sed 's/aarch64-\(.*\)-gnu.*$/\1/'`
aph@1321 57 config="aarch64-unknown-gnu"
aph@1321 58 sub_args="$sub_args $config"
aph@1321 59 shift; ;;
aph@1321 60 aarch64-*-linux-* )
aph@1321 61 os=`echo $1 | sed 's/aarch64-\(.*\)-linux-.*$/'`
aph@1321 62 config="aarch64-unknown-linux-gnu"
aph@1321 63 sub_args="$sub_args $config"
aph@1321 64 shift; ;;
aph@1321 65 - ) # Use stdin as input.
aph@1321 66 sub_args="$sub_args $1"
aph@1321 67 shift; break ;;
aph@1321 68 * )
aph@1321 69 sub_args="$sub_args $1"
aph@1321 70 shift; ;;
aph@1321 71 esac
ohair@425 72 done
ohair@425 73
aph@1321 74 result=`. $DIR/autoconf-config.sub $sub_args "$@"`
aph@1321 75 exitcode=$?
ohair@425 76
aph@1321 77 if [ "x$os" != "x" ] ; then
aph@1321 78 result=`echo $result | sed "s/-unknown-/-$os-/"`
ohair@425 79 fi
ohair@425 80
aph@1321 81 echo $result
aph@1321 82 exit $exitcode
ohair@425 83

mercurial