author | aph |
Fri, 21 Nov 2014 11:24:55 -0800 | |
changeset 29161 | 11faf16b91c8 |
parent 15070 | f8c9af9daf6f |
child 29164 | 5307d5d020ff |
permissions | -rw-r--r-- |
29161 | 1 |
#!/bin/sh |
15070
f8c9af9daf6f
8005284: build-infra: nonstandard copyright headers under common/autoconf/build-aux
ohair
parents:
12258
diff
changeset
|
2 |
# |
29161 | 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 | 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 | 25 |
# This is a wrapper for the config.guess from autoconf. The latter |
26 |
# does not know about all of our platforms. Instead of patching the |
|
27 |
# autoconf system (which might easily get lost in a future update), we |
|
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 | 30 |
DIR=`dirname $0` |
12258
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
31 |
|
29161 | 32 |
# First, filter out everything that doesn't begin with "aarch64-" |
33 |
if ! echo $* | grep '^aarch64-' >/dev/null ; then |
|
34 |
. $DIR/autoconf-config.sub "$@" |
|
35 |
# autoconf-config.sub exits, so we never reach here, but just in |
|
36 |
# case we do: |
|
37 |
exit |
|
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 | 41 |
case $1 in |
42 |
-- ) # Stop option processing |
|
43 |
shift; break ;; |
|
44 |
aarch64-gnu ) |
|
45 |
sub_args="$sub_args aarch64-unknown-gnu" |
|
46 |
shift; ;; |
|
47 |
aarch64-linux ) |
|
48 |
sub_args="$sub_args aarch64-unknown-linux-gnu" |
|
49 |
shift; ;; |
|
50 |
aarch64-*-linux ) |
|
51 |
os=`echo $1 | sed 's/aarch64-\(.*\)-linux/\1/'` |
|
52 |
config="aarch64-unknown-linux-gnu" |
|
53 |
sub_args="$sub_args $config" |
|
54 |
shift; ;; |
|
55 |
aarch64-*-gnu ) |
|
56 |
os=`echo $1 | sed 's/aarch64-\(.*\)-gnu.*$/\1/'` |
|
57 |
config="aarch64-unknown-gnu" |
|
58 |
sub_args="$sub_args $config" |
|
59 |
shift; ;; |
|
60 |
aarch64-*-linux-* ) |
|
61 |
os=`echo $1 | sed 's/aarch64-\(.*\)-linux-.*$/'` |
|
62 |
config="aarch64-unknown-linux-gnu" |
|
63 |
sub_args="$sub_args $config" |
|
64 |
shift; ;; |
|
65 |
- ) # Use stdin as input. |
|
66 |
sub_args="$sub_args $1" |
|
67 |
shift; break ;; |
|
68 |
* ) |
|
69 |
sub_args="$sub_args $1" |
|
70 |
shift; ;; |
|
71 |
esac |
|
12258
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
72 |
done |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
73 |
|
29161 | 74 |
result=`. $DIR/autoconf-config.sub $sub_args "$@"` |
75 |
exitcode=$? |
|
12258
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
76 |
|
29161 | 77 |
if [ "x$os" != "x" ] ; then |
78 |
result=`echo $result | sed "s/-unknown-/-$os-/"` |
|
12258
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
79 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
80 |
|
29161 | 81 |
echo $result |
82 |
exit $exitcode |
|
12258
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
83 |