Skip to content

Commit 091637c

Browse files
author
Pengfei Li
committed
8285630: Fix a configure error in RISC-V cross build
Reviewed-by: erikj, shade, fyang, fjiang
1 parent ccf0e8b commit 091637c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

make/autoconf/build-aux/config.sub

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
#
3-
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
3+
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
44
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
#
66
# This code is free software; you can redistribute it and/or modify it
@@ -46,6 +46,13 @@ if echo $* | grep pc-msys >/dev/null ; then
4646
exit
4747
fi
4848

49+
# Canonicalize for riscv which autoconf-config.sub doesn't handle
50+
if echo $* | grep '^riscv\(32\|64\)-linux' >/dev/null ; then
51+
result=`echo $@ | sed 's/linux/unknown-linux/'`
52+
echo $result
53+
exit
54+
fi
55+
4956
# Filter out everything that doesn't begin with "aarch64-"
5057
if ! echo $* | grep '^aarch64-' >/dev/null ; then
5158
. $DIR/autoconf-config.sub "$@"
@@ -78,4 +85,3 @@ result=`echo $result | sed "s/^arm-/aarch64-/"`
7885

7986
echo $result
8087
exit $exitcode
81-

0 commit comments

Comments
 (0)