Add support for riscv64. ok Brad Smith (maintainer)

This commit is contained in:
matthieu 2021-07-13 06:04:19 +00:00
parent 449d13bcf3
commit eed65737a3

View File

@ -1,9 +1,23 @@
$OpenBSD: patch-configure,v 1.89 2021/02/06 21:46:32 sthen Exp $
$OpenBSD: patch-configure,v 1.90 2021/07/13 06:04:19 matthieu Exp $
Index: configure
--- configure.orig
+++ configure
@@ -1514,39 +1514,39 @@ echo configuration: $configuration > "$TMPLOG"
@@ -284,6 +284,13 @@ arm() {
esac
}
+riscv64() {
+ case "$host_arch" in
+ riscv64*) return 0;;
+ *) return 1;;
+ esac
+}
+
# Use this before starting a check
echocheck() {
echo "============ Checking for $@ ============" >> "$TMPLOG"
@@ -1514,39 +1521,39 @@ echo configuration: $configuration > "$TMPLOG"
echo >> "$TMPLOG"
@ -75,7 +89,7 @@ Index: configure
list_subparts() {
test ! -e ffmpeg/libav${3} && return 1
pattern="s/^[^#]*${1}.*([^ ,]*, *\([^ ,)]*\).*/\1_${2}/p"
@@ -2465,7 +2465,7 @@ case "$host_arch" in
@@ -2465,7 +2472,7 @@ case "$host_arch" in
arch='sparc'
iproc='sparc'
if test "$host_arch" = "sparc64" ; then
@ -84,7 +98,19 @@ Index: configure
proc='ultrasparc'
def_fast_64bit='#define HAVE_FAST_64BIT 1'
elif sunos ; then
@@ -2840,7 +2840,7 @@ cat > $TMPC << EOF
@@ -2766,7 +2773,10 @@ EOF
arch='arc'
iproc='arc'
;;
-
+ riscv64)
+ arch='riscv64'
+ iproc='riscv64'
+ ;;
*)
echo "The architecture of your CPU ($host_arch) is not supported by this configure script"
echo "It seems nobody has ported MPlayer to your OS or CPU type yet."
@@ -2840,7 +2850,7 @@ cat > $TMPC << EOF
int ff_extern;
EOF
cc_check -c || die "Symbol mangling check failed."
@ -93,7 +119,7 @@ Index: configure
extern_prefix=${sym%%ff_extern*}
def_extern_asm="#define EXTERN_ASM $extern_prefix"
def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\""
@@ -2905,7 +2905,7 @@ else
@@ -2905,7 +2915,7 @@ else
fi
CFLAGS="-D_ISOC99_SOURCE -I. -Iffmpeg $CFLAGS"
@ -102,7 +128,7 @@ Index: configure
# On glibc, add some more CPPFLAGS for enabling required functionality.
cpp_condition_check features.h "defined __GLIBC__" &&
@@ -2986,7 +2986,7 @@ elif test $relocatable = "yes" ; then
@@ -2986,7 +2996,7 @@ elif test $relocatable = "yes" ; then
fi
echores $relocatable
@ -111,7 +137,7 @@ Index: configure
# Checking assembler (_as) compatibility...
# Added workaround for older as that reads from stdin by default - atmos
as_version=$(echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p')
@@ -4420,8 +4420,8 @@ echores "$gettimeofday"
@@ -4420,8 +4430,8 @@ echores "$gettimeofday"
echocheck "clock_gettime()"
clock_gettime=no
def_clock_gettime='#undef HAVE_CLOCK_GETTIME'
@ -122,7 +148,7 @@ Index: configure
echores "$clock_gettime"
@@ -6403,7 +6403,7 @@ echocheck "cdparanoia"
@@ -6403,7 +6413,7 @@ echocheck "cdparanoia"
if test "$_cdparanoia" = auto ; then
_cdparanoia=no
for inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
@ -131,7 +157,7 @@ Index: configure
_cdparanoia=yes && extra_cflags="$extra_cflags $inc_tmp" && break
done
fi
@@ -8302,6 +8302,7 @@ extra_ldflags="$extra_ldflags $libm"
@@ -8302,6 +8312,7 @@ extra_ldflags="$extra_ldflags $libm"
# XML documentation tests
echocheck "XML catalogs"
for try_catalog in \
@ -139,7 +165,7 @@ Index: configure
/etc/sgml/catalog \
/usr/share/xml/docbook/*/catalog.xml \
/opt/local/share/xml/docbook-xml/*/catalog.xml \
@@ -8329,6 +8330,7 @@ fi
@@ -8329,6 +8340,7 @@ fi
echocheck "XML chunked stylesheet"
for try_chunk_xsl in \
@ -147,7 +173,7 @@ Index: configure
/usr/share/xml/docbook/*/html/chunk.xsl \
/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \
/usr/share/sgml/docbook/yelp/docbook/html/chunk.xsl \
@@ -8354,6 +8356,7 @@ fi
@@ -8354,6 +8366,7 @@ fi
echocheck "XML monolithic stylesheet"
for try_docbook_xsl in \
@ -155,7 +181,7 @@ Index: configure
/usr/share/xml/docbook/*/html/docbook.xsl \
/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \
/usr/share/sgml/docbook/yelp/docbook/html/docbook.xsl \
@@ -8407,6 +8410,7 @@ EOF
@@ -8407,6 +8420,7 @@ EOF
echocheck "XML DTD"
#FIXME: This should prefer higher version numbers, not the other way around ..
for try_dtd in \
@ -163,7 +189,7 @@ Index: configure
/usr/share/xml/docbook/*/dtd/4*/docbookx.dtd \
/usr/share/xml/docbook/*/docbookx.dtd \
/usr/share/sgml/docbook/*/docbookx.dtd \
@@ -9565,9 +9569,6 @@ cmp -s "$TMPH" config.h || mv -f "$TMPH" config.h
@@ -9565,9 +9579,6 @@ cmp -s "$TMPH" config.h || mv -f "$TMPH" config.h
############################################################################
@ -173,7 +199,7 @@ Index: configure
# Create avconfig.h for FFmpeg.
cat > "$TMPH" << EOF
/* Generated by mpconfigure */
@@ -9659,8 +9660,6 @@ print_enabled_components libavformat/demuxer_list.c AV
@@ -9659,8 +9670,6 @@ print_enabled_components libavformat/demuxer_list.c AV
print_enabled_components libavformat/muxer_list.c AVOutputFormat muxer_list $libavmuxers
print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols $libavprotocols
print_enabled_filters libavfilter/filter_list.c AVFilter filter_list $libavfilters