make/autoconf/build-aux/config.sub
author erikj
Wed, 02 Jan 2019 12:59:26 +0100
changeset 53110 50677f43ac3d
parent 47216 71c04702a3d5
permissions -rw-r--r--
8215445: Enable building for Windows in WSL Reviewed-by: ihse Contributed-by: andrewluotechnologies@outlook.com, erik.joelsson@oracle.com
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
53110
50677f43ac3d 8215445: Enable building for Windows in WSL
erikj
parents: 47216
diff changeset
    32
# Allow wsl
50677f43ac3d 8215445: Enable building for Windows in WSL
erikj
parents: 47216
diff changeset
    33
if echo $* | grep x86_64-pc-wsl >/dev/null ; then
50677f43ac3d 8215445: Enable building for Windows in WSL
erikj
parents: 47216
diff changeset
    34
    echo $*
50677f43ac3d 8215445: Enable building for Windows in WSL
erikj
parents: 47216
diff changeset
    35
    exit
50677f43ac3d 8215445: Enable building for Windows in WSL
erikj
parents: 47216
diff changeset
    36
fi
50677f43ac3d 8215445: Enable building for Windows in WSL
erikj
parents: 47216
diff changeset
    37
50677f43ac3d 8215445: Enable building for Windows in WSL
erikj
parents: 47216
diff changeset
    38
# Filter out everything that doesn't begin with "aarch64-"
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    39
if ! echo $* | grep '^aarch64-' >/dev/null ; then
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    40
    . $DIR/autoconf-config.sub "$@"
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    41
    # autoconf-config.sub exits, so we never reach here, but just in
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    42
    # case we do:
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    43
    exit
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    44
fi
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    45
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    46
while test $# -gt 0 ; do
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    47
    case $1 in 
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    48
        -- )   # Stop option processing
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    49
            shift; break ;;
29164
5307d5d020ff 8068927: AARCH64: better handling of aarch64- triples
dlong
parents: 29161
diff changeset
    50
        aarch64-* )
5307d5d020ff 8068927: AARCH64: better handling of aarch64- triples
dlong
parents: 29161
diff changeset
    51
            config=`echo $1 | sed 's/^aarch64-/arm-/'`
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    52
            sub_args="$sub_args $config"
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
        - )    # Use stdin as input.
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    55
            sub_args="$sub_args $1"
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    56
            shift; break ;;
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    57
        * )
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    58
            sub_args="$sub_args $1"
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    59
            shift; ;;
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    60
    esac
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    61
done
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    62
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    63
result=`. $DIR/autoconf-config.sub $sub_args "$@"`
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    64
exitcode=$?
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    65
29164
5307d5d020ff 8068927: AARCH64: better handling of aarch64- triples
dlong
parents: 29161
diff changeset
    66
result=`echo $result | sed "s/^arm-/aarch64-/"`
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    67
29161
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    68
echo $result
11faf16b91c8 8064357: AARCH64: Top-level JDK changes
aph
parents: 15070
diff changeset
    69
exit $exitcode
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    70