common/autoconf/build-aux/config.sub
author prr
Fri, 05 Aug 2016 12:03:58 -0700
changeset 40427 592a43ff92cd
parent 29164 5307d5d020ff
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
     1
#!/bin/sh
15070
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
     2
#
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
     3
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
15070
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
     4
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
     5
#
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
     6
# This code is free software; you can redistribute it and/or modify it
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
     7
# under the terms of the GNU General Public License version 2 only, as
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
     8
# published by the Free Software Foundation.
15070
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
     9
#
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    10
# This code is distributed in the hope that it will be useful, but WITHOUT
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    13
# version 2 for more details (a copy is included in the LICENSE file that
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    14
# accompanied this code).
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    15
#
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    16
# You should have received a copy of the GNU General Public License version
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    17
# 2 along with this work; if not, write to the Free Software Foundation,
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    18
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    19
#
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    20
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    21
# or visit www.oracle.com if you need additional information or have any
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    22
# questions.
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    23
#
f8c9af9daf6f 8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents: 12258
diff changeset
    24
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    25
# This is a wrapper for the config.guess from autoconf. The latter
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    26
# does not know about all of our platforms. Instead of patching the
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    27
# autoconf system (which might easily get lost in a future update), we
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    28
# wrap it and fix the broken property, if needed.
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    29
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    30
DIR=`dirname $0`
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    31
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    32
# First, filter out everything that doesn't begin with "aarch64-"
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    33
if ! echo $* | grep '^aarch64-' >/dev/null ; then
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    34
    . $DIR/autoconf-config.sub "$@"
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    35
    # autoconf-config.sub exits, so we never reach here, but just in
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    36
    # case we do:
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    37
    exit
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    38
fi
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    39
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    40
while test $# -gt 0 ; do
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    41
    case $1 in 
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    42
        -- )   # Stop option processing
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    43
            shift; break ;;
29164
5307d5d020ff 8068927: AARCH64: better handling of aarch64- triples
dlong
parents: 29161
diff changeset
    44
        aarch64-* )
5307d5d020ff 8068927: AARCH64: better handling of aarch64- triples
dlong
parents: 29161
diff changeset
    45
            config=`echo $1 | sed 's/^aarch64-/arm-/'`
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    46
            sub_args="$sub_args $config"
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    47
            shift; ;;
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    48
        - )    # Use stdin as input.
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    49
            sub_args="$sub_args $1"
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    50
            shift; break ;;
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    51
        * )
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    52
            sub_args="$sub_args $1"
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    53
            shift; ;;
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    54
    esac
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    55
done
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    56
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    57
result=`. $DIR/autoconf-config.sub $sub_args "$@"`
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    58
exitcode=$?
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    59
29164
5307d5d020ff 8068927: AARCH64: better handling of aarch64- triples
dlong
parents: 29161
diff changeset
    60
result=`echo $result | sed "s/^arm-/aarch64-/"`
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    61
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    62
echo $result
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    63
exit $exitcode
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    64