From 77bcef6197e982b76fe49e730c42160c382a5517 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Jul 2019 08:42:52 +0100 Subject: [PATCH] OCaml 4.08.1+rc2. Include fix for miscompilation of off_t on 32 bit architectures. --- ...sion-number-after-tagging-4.08.1-rc2.patch | 141 ++ ...-spelling-errors-reported-by-Lintian.patch | 172 +++ ...e-of-some-error-messages-in-ocamldoc.patch | 40 + ...> 0004-Don-t-add-rpaths-to-libraries.patch | 6 +- ...-Allow-user-defined-C-compiler-flags.patch | 6 +- ...-incorrect-assumption-about-cross-co.patch | 6 +- ...end.patch => 0007-Add-RISC-V-backend.patch | 1162 ++++++++--------- ....patch => 0008-riscv-Emit-debug-info.patch | 6 +- ...-or-system-provided-off_t-rather-tha.patch | 58 + ocaml.spec | 33 +- sources | 2 +- 11 files changed, 1000 insertions(+), 632 deletions(-) create mode 100644 0001-increment-version-number-after-tagging-4.08.1-rc2.patch create mode 100644 0002-Fix-spelling-errors-reported-by-Lintian.patch create mode 100644 0003-Fix-language-of-some-error-messages-in-ocamldoc.patch rename 0001-Don-t-add-rpaths-to-libraries.patch => 0004-Don-t-add-rpaths-to-libraries.patch (86%) rename 0002-configure-Allow-user-defined-C-compiler-flags.patch => 0005-configure-Allow-user-defined-C-compiler-flags.patch (81%) rename 0003-configure-Remove-incorrect-assumption-about-cross-co.patch => 0006-configure-Remove-incorrect-assumption-about-cross-co.patch (84%) rename 0004-Add-RISC-V-backend.patch => 0007-Add-RISC-V-backend.patch (99%) rename 0005-riscv-Emit-debug-info.patch => 0008-riscv-Emit-debug-info.patch (90%) create mode 100644 0009-Use-the-autoconf-or-system-provided-off_t-rather-tha.patch diff --git a/0001-increment-version-number-after-tagging-4.08.1-rc2.patch b/0001-increment-version-number-after-tagging-4.08.1-rc2.patch new file mode 100644 index 0000000..e286a62 --- /dev/null +++ b/0001-increment-version-number-after-tagging-4.08.1-rc2.patch @@ -0,0 +1,141 @@ +From 92c1042e5ba899fca8eed351a7bc210879cdc9d7 Mon Sep 17 00:00:00 2001 +From: Florian Angeletti +Date: Wed, 24 Jul 2019 14:25:14 +0200 +Subject: [PATCH 1/9] increment version number after tagging 4.08.1+rc2 + +--- + VERSION | 2 +- + configure | 26 +++++++++++++------------- + ocaml-variants.opam | 2 +- + 3 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/VERSION b/VERSION +index 9bbc45c85..6be2f109a 100644 +--- a/VERSION ++++ b/VERSION +@@ -1,4 +1,4 @@ +-4.08.1+rc2 ++4.08.1+dev4-2019-07-24 + + # The version string is the first line of this file. + # It must be in the format described in stdlib/sys.mli +diff --git a/configure b/configure +index 450374d2d..0de9771d3 100755 +--- a/configure ++++ b/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for OCaml 4.08.1+rc2. ++# Generated by GNU Autoconf 2.69 for OCaml 4.08.1+dev4-2019-07-24. + # + # Report bugs to . + # +@@ -590,8 +590,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='OCaml' + PACKAGE_TARNAME='ocaml' +-PACKAGE_VERSION='4.08.1+rc2' +-PACKAGE_STRING='OCaml 4.08.1+rc2' ++PACKAGE_VERSION='4.08.1+dev4-2019-07-24' ++PACKAGE_STRING='OCaml 4.08.1+dev4-2019-07-24' + PACKAGE_BUGREPORT='caml-list@inria.fr' + PACKAGE_URL='http://www.ocaml.org' + +@@ -1430,7 +1430,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures OCaml 4.08.1+rc2 to adapt to many kinds of systems. ++\`configure' configures OCaml 4.08.1+dev4-2019-07-24 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1501,7 +1501,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of OCaml 4.08.1+rc2:";; ++ short | recursive ) echo "Configuration of OCaml 4.08.1+dev4-2019-07-24:";; + esac + cat <<\_ACEOF + +@@ -1657,7 +1657,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-OCaml configure 4.08.1+rc2 ++OCaml configure 4.08.1+dev4-2019-07-24 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2320,7 +2320,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by OCaml $as_me 4.08.1+rc2, which was ++It was created by OCaml $as_me 4.08.1+dev4-2019-07-24, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -2669,8 +2669,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring OCaml version 4.08.1+rc2" >&5 +-$as_echo "$as_me: Configuring OCaml version 4.08.1+rc2" >&6;} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring OCaml version 4.08.1+dev4-2019-07-24" >&5 ++$as_echo "$as_me: Configuring OCaml version 4.08.1+dev4-2019-07-24" >&6;} + + # Configuration variables + +@@ -2745,7 +2745,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + ## Output variables + + +-VERSION=4.08.1+rc2 ++VERSION=4.08.1+dev4-2019-07-24 + + + # Note: This is present for the flexdll bootstrap where it exposed as the old +@@ -12365,7 +12365,7 @@ case $ocaml_cv_cc_vendor in #( + msvc-*) : + outputobj=-Fo; CPP="cl -nologo -EP"; gcc_warnings="" ;; #( + *) : +- outputobj='-o $(EMPTY)'; case 4.08.1+rc2 in #( ++ outputobj='-o $(EMPTY)'; case 4.08.1+dev4-2019-07-24 in #( + *+dev*) : + gcc_warnings="-Wall -Werror" ;; #( + *) : +@@ -17560,7 +17560,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by OCaml $as_me 4.08.1+rc2, which was ++This file was extended by OCaml $as_me 4.08.1+dev4-2019-07-24, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -17627,7 +17627,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-OCaml config.status 4.08.1+rc2 ++OCaml config.status 4.08.1+dev4-2019-07-24 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +diff --git a/ocaml-variants.opam b/ocaml-variants.opam +index dcadf49f8..69b727f5c 100644 +--- a/ocaml-variants.opam ++++ b/ocaml-variants.opam +@@ -1,5 +1,5 @@ + opam-version: "2.0" +-version: "4.08.1+rc2" ++version: "4.08.1+trunk" + synopsis: "OCaml development version" + depends: [ + "ocaml" {= "4.08.1" & post} +-- +2.22.0.rc3 + diff --git a/0002-Fix-spelling-errors-reported-by-Lintian.patch b/0002-Fix-spelling-errors-reported-by-Lintian.patch new file mode 100644 index 0000000..a5497c8 --- /dev/null +++ b/0002-Fix-spelling-errors-reported-by-Lintian.patch @@ -0,0 +1,172 @@ +From 44306329db8a86a2362b6345bdde69deea4935dc Mon Sep 17 00:00:00 2001 +From: David Allsopp +Date: Wed, 24 Jul 2019 14:45:33 +0100 +Subject: [PATCH 2/9] Fix spelling errors reported by Lintian + +No change entry needed +--- + asmcomp/cmmgen.ml | 4 ++-- + manual/manual/library/compilerlibs.etex | 2 +- + middle_end/inlining_transforms.ml | 2 +- + otherlibs/systhreads/event.mli | 4 ++-- + parsing/ast_iterator.mli | 2 +- + parsing/ast_mapper.mli | 2 +- + stdlib/bigarray.mli | 2 +- + stdlib/filename.mli | 4 ++-- + stdlib/format.ml | 2 +- + testsuite/tests/parsetree/source.ml | 2 +- + testsuite/tests/typing-implicit_unpack/implicit_unpack.ml | 2 +- + 11 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/asmcomp/cmmgen.ml b/asmcomp/cmmgen.ml +index d0490998c..68e36d0d9 100644 +--- a/asmcomp/cmmgen.ml ++++ b/asmcomp/cmmgen.ml +@@ -1528,8 +1528,8 @@ end + phases, we only share exits *) + (* Some specific patterns can lead to switches where several cases + point to the same action, but this action is not an exit (see GPR#1370). +- The addition of the index in the action array as context allows to +- share them correctly without duplication. *) ++ The addition of the index in the action array as context allows ++ sharing them correctly without duplication. *) + module StoreExpForSwitch = + Switch.CtxStore + (struct +diff --git a/manual/manual/library/compilerlibs.etex b/manual/manual/library/compilerlibs.etex +index 88abbb823..d49193767 100644 +--- a/manual/manual/library/compilerlibs.etex ++++ b/manual/manual/library/compilerlibs.etex +@@ -3,7 +3,7 @@ + + This chapter describes the OCaml front-end, which declares the abstract + syntax tree used by the compiler, provides a way to parse, print +-and pretty-print OCaml code, and ultimately allows to write abstract ++and pretty-print OCaml code, and ultimately allows one to write abstract + syntax tree preprocessors invoked via the {\tt -ppx} flag (see chapters~\ref{c:camlc} + and~\ref{c:nativecomp}) and plugins invoked via the {\tt -plugin} flag + (see chapter~\ref{c:plugins}). +diff --git a/middle_end/inlining_transforms.ml b/middle_end/inlining_transforms.ml +index b08e62bb0..c46a6cbe6 100755 +--- a/middle_end/inlining_transforms.ml ++++ b/middle_end/inlining_transforms.ml +@@ -118,7 +118,7 @@ let inline_by_copying_function_body ~env ~r + && ((not default_inline) || (not default_specialise)) then + (* When the function inlined function is a stub, the annotation + is reported to the function applications inside the stub. +- This allows to report the annotation to the application the ++ This allows reporting the annotation to the application the + original programmer really intended: the stub is not visible + in the source. *) + set_inline_attribute_on_all_apply body +diff --git a/otherlibs/systhreads/event.mli b/otherlibs/systhreads/event.mli +index 83dbe9a17..fd452652c 100644 +--- a/otherlibs/systhreads/event.mli ++++ b/otherlibs/systhreads/event.mli +@@ -59,8 +59,8 @@ val wrap_abort : 'a event -> (unit -> unit) -> 'a event + + val guard : (unit -> 'a event) -> 'a event + (** [guard fn] returns the event that, when synchronized, computes +- [fn()] and behaves as the resulting event. This allows to +- compute events with side-effects at the time of the synchronization ++ [fn()] and behaves as the resulting event. This enables ++ computing events with side-effects at the time of the synchronization + operation. *) + + val sync : 'a event -> 'a +diff --git a/parsing/ast_iterator.mli b/parsing/ast_iterator.mli +index 5dc1c0ec5..26308d20d 100755 +--- a/parsing/ast_iterator.mli ++++ b/parsing/ast_iterator.mli +@@ -13,7 +13,7 @@ + (* *) + (**************************************************************************) + +-(** {!iterator} allows to implement AST inspection using open recursion. A ++(** {!iterator} enables AST inspection using open recursion. A + typical mapper would be based on {!default_iterator}, a trivial iterator, + and will fall back on it for handling the syntax it does not modify. + +diff --git a/parsing/ast_mapper.mli b/parsing/ast_mapper.mli +index b342ca8a9..80d70fcca 100644 +--- a/parsing/ast_mapper.mli ++++ b/parsing/ast_mapper.mli +@@ -21,7 +21,7 @@ + the -ppx rewriters, handling such details as the serialization format, + forwarding of command-line flags, and storing state. + +- {!mapper} allows to implement AST rewriting using open recursion. ++ {!mapper} enables AST rewriting using open recursion. + A typical mapper would be based on {!default_mapper}, a deep + identity mapper, and will fall back on it for handling the syntax it + does not modify. For example: +diff --git a/stdlib/bigarray.mli b/stdlib/bigarray.mli +index 2c1261212..ea26f66f5 100644 +--- a/stdlib/bigarray.mli ++++ b/stdlib/bigarray.mli +@@ -133,7 +133,7 @@ type ('a, 'b) kind = + of OCaml types with element kinds, and are re-exported below for + backward-compatibility reasons. + +- Using a generalized algebraic datatype (GADT) here allows to write ++ Using a generalized algebraic datatype (GADT) here allows writing + well-typed polymorphic functions whose return type depend on the + argument type, such as: + +diff --git a/stdlib/filename.mli b/stdlib/filename.mli +index b05ad0d2e..9221c9ef5 100644 +--- a/stdlib/filename.mli ++++ b/stdlib/filename.mli +@@ -52,8 +52,8 @@ val check_suffix : string -> string -> bool + val chop_suffix : string -> string -> string + (** [chop_suffix name suff] removes the suffix [suff] from + the filename [name]. The behavior is undefined if [name] does not +- end with the suffix [suff]. It is thus recommmended to use +- [chop_suffix_opt] instead. ++ end with the suffix [suff]. [chop_suffix_opt] is thus recommended ++ instead. + *) + + val chop_suffix_opt: suffix:string -> string -> string option +diff --git a/stdlib/format.ml b/stdlib/format.ml +index ae1f3c647..369c50c36 100644 +--- a/stdlib/format.ml ++++ b/stdlib/format.ml +@@ -687,7 +687,7 @@ let pp_print_if_newline state () = + { size = Size.zero; token = Pp_if_newline; length = 0 } + + +-(* Generalized break hint that allows to print strings before/after ++(* Generalized break hint that allows printing strings before/after + same-line offset (width) or new-line offset *) + let pp_print_custom_break state ~fits ~breaks = + let before, width, after = fits in +diff --git a/testsuite/tests/parsetree/source.ml b/testsuite/tests/parsetree/source.ml +index c67012e18..a183f4482 100644 +--- a/testsuite/tests/parsetree/source.ml ++++ b/testsuite/tests/parsetree/source.ml +@@ -3072,7 +3072,7 @@ Error: Types marked with the immediate attribute must be + non-pointer types like int or bool + |}];; + (* +- Implicit unpack allows to omit the signature in (val ...) expressions. ++ Implicit unpack allows the signature in (val ...) expressions to be omitted. + + It also adds (module M : S) and (module M) patterns, relying on + implicit (val ...) for the implementation. Such patterns can only +diff --git a/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml b/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml +index a6b4d697c..e503ee736 100644 +--- a/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml ++++ b/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml +@@ -3,7 +3,7 @@ + *) + + (* +- Implicit unpack allows to omit the signature in (val ...) expressions. ++ Implicit unpack allows the signature in (val ...) expressions to be omitted. + + It also adds (module M : S) and (module M) patterns, relying on + implicit (val ...) for the implementation. Such patterns can only +-- +2.22.0.rc3 + diff --git a/0003-Fix-language-of-some-error-messages-in-ocamldoc.patch b/0003-Fix-language-of-some-error-messages-in-ocamldoc.patch new file mode 100644 index 0000000..f0313e9 --- /dev/null +++ b/0003-Fix-language-of-some-error-messages-in-ocamldoc.patch @@ -0,0 +1,40 @@ +From 655519a3653a8e5b90e0fd862f9c5e20465ab7d0 Mon Sep 17 00:00:00 2001 +From: Stephane Glondu +Date: Thu, 25 Jul 2019 09:08:03 +0200 +Subject: [PATCH 3/9] Fix language of some error messages in ocamldoc + +No change entry needed +--- + ocamldoc/odoc_sig.ml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/ocamldoc/odoc_sig.ml b/ocamldoc/odoc_sig.ml +index fb2eac671..e413c11a6 100644 +--- a/ocamldoc/odoc_sig.ml ++++ b/ocamldoc/odoc_sig.ml +@@ -1740,11 +1740,11 @@ module Analyser = + ) + else + ( +- raise (Failure "Parsetree.Pcty_arrow (parse_label, _, pclass_type), labels differents") ++ raise (Failure "Parsetree.Pcty_arrow (parse_label, _, pclass_type), different labels") + ) + + | _ -> +- raise (Failure "analyse_class_kind pas de correspondance dans le match") ++ raise (Failure "analyse_class_kind: match failure") + + (** Analyse of a Parsetree.class_type and a Types.class_type to return a class_type_kind.*) + and analyse_class_type_kind env current_class_name last_pos parse_class_type sig_class_type = +@@ -1799,7 +1799,7 @@ module Analyser = + ([], k) + *) + | _ -> +- raise (Failure "analyse_class_type_kind pas de correspondance dans le match") ++ raise (Failure "analyse_class_type_kind: match failure") + + let analyse_signature source_file input_file + (ast : Parsetree.signature) (signat : Types.signature) = +-- +2.22.0.rc3 + diff --git a/0001-Don-t-add-rpaths-to-libraries.patch b/0004-Don-t-add-rpaths-to-libraries.patch similarity index 86% rename from 0001-Don-t-add-rpaths-to-libraries.patch rename to 0004-Don-t-add-rpaths-to-libraries.patch index c5b6adb..cce40f4 100644 --- a/0001-Don-t-add-rpaths-to-libraries.patch +++ b/0004-Don-t-add-rpaths-to-libraries.patch @@ -1,7 +1,7 @@ -From a41ca00e0fe462c09fc6c713351b8215c22e2e3d Mon Sep 17 00:00:00 2001 +From 9378a6a792cd1e2f6861483a2a73122b8c5296dd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 24 Jun 2014 10:00:15 +0100 -Subject: [PATCH 1/5] Don't add rpaths to libraries. +Subject: [PATCH 4/9] Don't add rpaths to libraries. --- tools/Makefile | 4 ++-- @@ -23,5 +23,5 @@ index ee0e0be4c..7c96b6405 100644 > ocamlmklibconfig.ml -- -2.22.0 +2.22.0.rc3 diff --git a/0002-configure-Allow-user-defined-C-compiler-flags.patch b/0005-configure-Allow-user-defined-C-compiler-flags.patch similarity index 81% rename from 0002-configure-Allow-user-defined-C-compiler-flags.patch rename to 0005-configure-Allow-user-defined-C-compiler-flags.patch index 9589618..2ba82c7 100644 --- a/0002-configure-Allow-user-defined-C-compiler-flags.patch +++ b/0005-configure-Allow-user-defined-C-compiler-flags.patch @@ -1,7 +1,7 @@ -From 699314a4643500e1bcfa60cd5dcbf41162c7f461 Mon Sep 17 00:00:00 2001 +From 4af3619375230488b370e5b3d5a8f48cef688607 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 29 May 2012 20:44:18 +0100 -Subject: [PATCH 2/5] configure: Allow user defined C compiler flags. +Subject: [PATCH 5/9] configure: Allow user defined C compiler flags. --- configure.ac | 4 ++++ @@ -23,5 +23,5 @@ index 5bb061162..6e37ff6c0 100644 # Enable SSE2 on x86 mingw to avoid using 80-bit registers. -- -2.22.0 +2.22.0.rc3 diff --git a/0003-configure-Remove-incorrect-assumption-about-cross-co.patch b/0006-configure-Remove-incorrect-assumption-about-cross-co.patch similarity index 84% rename from 0003-configure-Remove-incorrect-assumption-about-cross-co.patch rename to 0006-configure-Remove-incorrect-assumption-about-cross-co.patch index 7014b01..933a1cf 100644 --- a/0003-configure-Remove-incorrect-assumption-about-cross-co.patch +++ b/0006-configure-Remove-incorrect-assumption-about-cross-co.patch @@ -1,7 +1,7 @@ -From 0df3ea4cd00fb364a4bedd3687979ea4385aa827 Mon Sep 17 00:00:00 2001 +From 84381bccf6293903392d3d045bfb66b10b3e3bc3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 26 Apr 2019 16:16:29 +0100 -Subject: [PATCH 3/5] configure: Remove incorrect assumption about +Subject: [PATCH 6/9] configure: Remove incorrect assumption about cross-compiling. See https://github.com/ocaml/ocaml/issues/8647#issuecomment-487094390 @@ -23,5 +23,5 @@ index 6e37ff6c0..3c287fbd0 100644 # We first compute default values for as and aspp # If values have been given by the user then they take precedence over -- -2.22.0 +2.22.0.rc3 diff --git a/0004-Add-RISC-V-backend.patch b/0007-Add-RISC-V-backend.patch similarity index 99% rename from 0004-Add-RISC-V-backend.patch rename to 0007-Add-RISC-V-backend.patch index 35b8ee3..7b17ec6 100644 --- a/0004-Add-RISC-V-backend.patch +++ b/0007-Add-RISC-V-backend.patch @@ -1,7 +1,7 @@ -From 29b180394530ed7f7d24e9d54eafb4475cf44c79 Mon Sep 17 00:00:00 2001 +From b4554d2e93dd2db471b4498761824875e41adc8c Mon Sep 17 00:00:00 2001 From: Nicolas Ojeda Bar Date: Fri, 27 Oct 2017 17:05:25 +0200 -Subject: [PATCH 4/5] Add RISC-V backend +Subject: [PATCH 7/9] Add RISC-V backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -49,12 +49,12 @@ The following additional commits are included: asmcomp/riscv/scheduling.ml | 19 + asmcomp/riscv/selection.ml | 71 + config/gnu/config.guess | 925 ++++++------- - config/gnu/config.sub | 2613 ++++++++++++++++++----------------- + config/gnu/config.sub | 2505 ++++++++++++++++++----------------- configure | 10 +- configure.ac | 11 +- runtime/caml/stack.h | 5 + runtime/riscv.S | 424 ++++++ - 15 files changed, 3406 insertions(+), 1829 deletions(-) + 15 files changed, 3352 insertions(+), 1775 deletions(-) create mode 100644 asmcomp/riscv/CSE.ml create mode 100644 asmcomp/riscv/arch.ml create mode 100644 asmcomp/riscv/emit.mlp @@ -1654,13 +1654,13 @@ index b79252d6b..a81aa505b 100755 *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; ++ exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox -+ exit ;; + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; @@ -2245,11 +2245,11 @@ index b79252d6b..a81aa505b 100755 exit ;; *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -+ echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; +- exit ;; - i*:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys -- exit ;; ++ echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 @@ -2425,12 +2425,12 @@ index b79252d6b..a81aa505b 100755 - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" ++ exit ;; ++ openrisc*:Linux:*:*) ++ echo or1k-unknown-linux-"$LIBC" exit ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ openrisc*:Linux:*:*) -+ echo or1k-unknown-linux-"$LIBC" -+ exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; @@ -2792,15 +2792,15 @@ index b79252d6b..a81aa505b 100755 NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} + echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; -- NSR-?:NONSTOP_KERNEL:*:*) -- echo nsr-tandem-nsk${UNAME_RELEASE} ++ exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" -+ exit ;; + exit ;; +- NSR-?:NONSTOP_KERNEL:*:*) +- echo nsr-tandem-nsk${UNAME_RELEASE} + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; @@ -2898,16 +2898,11 @@ index b79252d6b..a81aa505b 100755 - ); exit (0); -#endif -#endif -+echo "$0: unable to guess system type" >&2 - +- -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif -+case "$UNAME_MACHINE:$UNAME_SYSTEM" in -+ mips:Linux | mips64:Linux) -+ # If we got here on MIPS GNU/Linux, output extra information. -+ cat >&2 <&2 + -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif -- ++case "$UNAME_MACHINE:$UNAME_SYSTEM" in ++ mips:Linux | mips64:Linux) ++ # If we got here on MIPS GNU/Linux, output extra information. ++ cat >&2 <&2 -+ exit 1 - ;; +- ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ @@ -3215,10 +3210,7 @@ index 8b612ab89..3b4c7624b 100755 - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 -+ *-*-*-*) -+ basic_machine=$field1-$field2 -+ os=$field3-$field4 - ;; +- ;; - -bluegene*) - os=-cnk - ;; @@ -3292,139 +3284,21 @@ index 8b612ab89..3b4c7624b 100755 - ;; - -lynx*) - os=-lynxos -- ;; ++# Separate into logical components for further validation ++case $1 in ++ *-*-*-*-*) ++ echo Invalid configuration \`"$1"\': more than four components >&2 ++ exit 1 + ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` -- ;; ++ *-*-*-*) ++ basic_machine=$field1-$field2 ++ os=$field3-$field4 + ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` -- ;; -- -psos*) -- os=-psos -- ;; -- -mint | -mint[0-9]*) -- basic_machine=m68k-atari -- os=-mint -- ;; --esac -- --# Decode aliases for certain CPU-COMPANY combinations. --case $basic_machine in -- # Recognize the basic CPU types without company name. -- # Some are omitted here because they have special meanings below. -- 1750a | 580 \ -- | a29k \ -- | aarch64 | aarch64_be \ -- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ -- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -- | am33_2.0 \ -- | arc | arceb \ -- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ -- | avr | avr32 \ -- | be32 | be64 \ -- | bfin \ -- | c4x | clipper \ -- | d10v | d30v | dlx | dsp16xx \ -- | epiphany \ -- | fido | fr30 | frv \ -- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ -- | hexagon \ -- | i370 | i860 | i960 | ia64 \ -- | ip2k | iq2000 \ -- | le32 | le64 \ -- | lm32 \ -- | m32c | m32r | m32rle | m68000 | m68k | m88k \ -- | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ -- | mips | mipsbe | mipseb | mipsel | mipsle \ -- | mips16 \ -- | mips64 | mips64el \ -- | mips64octeon | mips64octeonel \ -- | mips64orion | mips64orionel \ -- | mips64r5900 | mips64r5900el \ -- | mips64vr | mips64vrel \ -- | mips64vr4100 | mips64vr4100el \ -- | mips64vr4300 | mips64vr4300el \ -- | mips64vr5000 | mips64vr5000el \ -- | mips64vr5900 | mips64vr5900el \ -- | mipsisa32 | mipsisa32el \ -- | mipsisa32r2 | mipsisa32r2el \ -- | mipsisa64 | mipsisa64el \ -- | mipsisa64r2 | mipsisa64r2el \ -- | mipsisa64sb1 | mipsisa64sb1el \ -- | mipsisa64sr71k | mipsisa64sr71kel \ -- | mipsr5900 | mipsr5900el \ -- | mipstx39 | mipstx39el \ -- | mn10200 | mn10300 \ -- | moxie \ -- | mt \ -- | msp430 \ -- | nds32 | nds32le | nds32be \ -- | nios | nios2 | nios2eb | nios2el \ -- | ns16k | ns32k \ -- | open8 \ -- | or1k | or32 \ -- | pdp10 | pdp11 | pj | pjl \ -- | powerpc | powerpc64 | powerpc64le | powerpcle \ -- | pyramid \ -- | rl78 | rx \ -- | score \ -- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ -- | sh64 | sh64le \ -- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -- | spu \ -- | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ -- | ubicom32 \ -- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ -- | we32k \ -- | x86 | xc16x | xstormy16 | xtensa \ -- | z8k | z80) -- basic_machine=$basic_machine-unknown -- ;; -- c54x) -- basic_machine=tic54x-unknown -- ;; -- c55x) -- basic_machine=tic55x-unknown -- ;; -- c6x) -- basic_machine=tic6x-unknown -- ;; -- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) -- basic_machine=$basic_machine-unknown -- os=-none -- ;; -- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) -- ;; -- ms1) -- basic_machine=mt-unknown -- ;; -- -- strongarm | thumb | xscale) -- basic_machine=arm-unknown -- ;; -- xgate) -- basic_machine=$basic_machine-unknown -- os=-none -- ;; -- xscaleeb) -- basic_machine=armeb-unknown -- ;; -- -- xscaleel) -- basic_machine=armel-unknown -- ;; -- -- # We use `pc' rather than `unknown' -- # because (1) that's what they normally are, and -- # (2) the word "unknown" tends to confuse beginning users. -- i*86 | x86_64) -- basic_machine=$basic_machine-pc -- ;; -- # Object if more than one company name word. - *-*-*) -- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 -- exit 1 ++ *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 @@ -3447,81 +3321,8 @@ index 8b612ab89..3b4c7624b 100755 + ;; + esac ;; -- # Recognize the basic CPU types with company name. -- 580-* \ -- | a29k-* \ -- | aarch64-* | aarch64_be-* \ -- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ -- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ -- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ -- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* | avr32-* \ -- | be32-* | be64-* \ -- | bfin-* | bs2000-* \ -- | c[123]* | c30-* | [cjt]90-* | c4x-* \ -- | clipper-* | craynv-* | cydra-* \ -- | d10v-* | d30v-* | dlx-* \ -- | elxsi-* \ -- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ -- | h8300-* | h8500-* \ -- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ -- | hexagon-* \ -- | i*86-* | i860-* | i960-* | ia64-* \ -- | ip2k-* | iq2000-* \ -- | le32-* | le64-* \ -- | lm32-* \ -- | m32c-* | m32r-* | m32rle-* \ -- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ -- | microblaze-* | microblazeel-* \ -- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ -- | mips16-* \ -- | mips64-* | mips64el-* \ -- | mips64octeon-* | mips64octeonel-* \ -- | mips64orion-* | mips64orionel-* \ -- | mips64r5900-* | mips64r5900el-* \ -- | mips64vr-* | mips64vrel-* \ -- | mips64vr4100-* | mips64vr4100el-* \ -- | mips64vr4300-* | mips64vr4300el-* \ -- | mips64vr5000-* | mips64vr5000el-* \ -- | mips64vr5900-* | mips64vr5900el-* \ -- | mipsisa32-* | mipsisa32el-* \ -- | mipsisa32r2-* | mipsisa32r2el-* \ -- | mipsisa64-* | mipsisa64el-* \ -- | mipsisa64r2-* | mipsisa64r2el-* \ -- | mipsisa64sb1-* | mipsisa64sb1el-* \ -- | mipsisa64sr71k-* | mipsisa64sr71kel-* \ -- | mipsr5900-* | mipsr5900el-* \ -- | mipstx39-* | mipstx39el-* \ -- | mmix-* \ -- | mt-* \ -- | msp430-* \ -- | nds32-* | nds32le-* | nds32be-* \ -- | nios-* | nios2-* | nios2eb-* | nios2el-* \ -- | none-* | np1-* | ns16k-* | ns32k-* \ -- | open8-* \ -- | orion-* \ -- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ -- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ -- | pyramid-* \ -- | rl78-* | romp-* | rs6000-* | rx-* \ -- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ -- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -- | sparclite-* \ -- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ -- | tahoe-* \ -- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -- | tile*-* \ -- | tron-* \ -- | ubicom32-* \ -- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ -- | vax-* \ -- | we32k-* \ -- | x86-* | x86_64-* | xc16x-* | xps100-* \ -- | xstormy16-* | xtensa*-* \ -- | ymp-* \ -- | z8k-* | z80-*) +- -psos*) +- os=-psos + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in @@ -3558,9 +3359,9 @@ index 8b612ab89..3b4c7624b 100755 + ;; + esac ;; -- # Recognize the basic CPU types without company name, with glob match. -- xtensa*) -- basic_machine=$basic_machine-unknown +- -mint | -mint[0-9]*) +- basic_machine=m68k-atari +- os=-mint + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. @@ -4014,40 +3815,230 @@ index 8b612ab89..3b4c7624b 100755 + ;; + esac ;; -+esac -+ + esac + +-# Decode aliases for certain CPU-COMPANY combinations. +# Decode 1-component or ad-hoc basic machines -+case $basic_machine in + case $basic_machine in +- # Recognize the basic CPU types without company name. +- # Some are omitted here because they have special meanings below. +- 1750a | 580 \ +- | a29k \ +- | aarch64 | aarch64_be \ +- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ +- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ +- | am33_2.0 \ +- | arc | arceb \ +- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ +- | avr | avr32 \ +- | be32 | be64 \ +- | bfin \ +- | c4x | clipper \ +- | d10v | d30v | dlx | dsp16xx \ +- | epiphany \ +- | fido | fr30 | frv \ +- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ +- | hexagon \ +- | i370 | i860 | i960 | ia64 \ +- | ip2k | iq2000 \ +- | le32 | le64 \ +- | lm32 \ +- | m32c | m32r | m32rle | m68000 | m68k | m88k \ +- | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ +- | mips | mipsbe | mipseb | mipsel | mipsle \ +- | mips16 \ +- | mips64 | mips64el \ +- | mips64octeon | mips64octeonel \ +- | mips64orion | mips64orionel \ +- | mips64r5900 | mips64r5900el \ +- | mips64vr | mips64vrel \ +- | mips64vr4100 | mips64vr4100el \ +- | mips64vr4300 | mips64vr4300el \ +- | mips64vr5000 | mips64vr5000el \ +- | mips64vr5900 | mips64vr5900el \ +- | mipsisa32 | mipsisa32el \ +- | mipsisa32r2 | mipsisa32r2el \ +- | mipsisa64 | mipsisa64el \ +- | mipsisa64r2 | mipsisa64r2el \ +- | mipsisa64sb1 | mipsisa64sb1el \ +- | mipsisa64sr71k | mipsisa64sr71kel \ +- | mipsr5900 | mipsr5900el \ +- | mipstx39 | mipstx39el \ +- | mn10200 | mn10300 \ +- | moxie \ +- | mt \ +- | msp430 \ +- | nds32 | nds32le | nds32be \ +- | nios | nios2 | nios2eb | nios2el \ +- | ns16k | ns32k \ +- | open8 \ +- | or1k | or32 \ +- | pdp10 | pdp11 | pj | pjl \ +- | powerpc | powerpc64 | powerpc64le | powerpcle \ +- | pyramid \ +- | rl78 | rx \ +- | score \ +- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ +- | sh64 | sh64le \ +- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ +- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ +- | spu \ +- | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ +- | ubicom32 \ +- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ +- | we32k \ +- | x86 | xc16x | xstormy16 | xtensa \ +- | z8k | z80) +- basic_machine=$basic_machine-unknown +- ;; +- c54x) +- basic_machine=tic54x-unknown +- ;; +- c55x) +- basic_machine=tic55x-unknown +- ;; +- c6x) +- basic_machine=tic6x-unknown +- ;; +- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) +- basic_machine=$basic_machine-unknown +- os=-none +- ;; +- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) +- ;; +- ms1) +- basic_machine=mt-unknown + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond -+ ;; + ;; +- +- strongarm | thumb | xscale) +- basic_machine=arm-unknown + op50n) + cpu=hppa1.1 + vendor=oki -+ ;; + ;; +- xgate) +- basic_machine=$basic_machine-unknown +- os=-none + op60c) + cpu=hppa1.1 + vendor=oki -+ ;; + ;; +- xscaleeb) +- basic_machine=armeb-unknown + ibm*) + cpu=i370 + vendor=ibm -+ ;; + ;; +- +- xscaleel) +- basic_machine=armel-unknown + orion105) + cpu=clipper + vendor=highlevel -+ ;; + ;; +- +- # We use `pc' rather than `unknown' +- # because (1) that's what they normally are, and +- # (2) the word "unknown" tends to confuse beginning users. +- i*86 | x86_64) +- basic_machine=$basic_machine-pc +- ;; +- # Object if more than one company name word. +- *-*-*) +- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 +- exit 1 + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple -+ ;; + ;; +- # Recognize the basic CPU types with company name. +- 580-* \ +- | a29k-* \ +- | aarch64-* | aarch64_be-* \ +- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ +- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ +- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ +- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ +- | avr-* | avr32-* \ +- | be32-* | be64-* \ +- | bfin-* | bs2000-* \ +- | c[123]* | c30-* | [cjt]90-* | c4x-* \ +- | clipper-* | craynv-* | cydra-* \ +- | d10v-* | d30v-* | dlx-* \ +- | elxsi-* \ +- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ +- | h8300-* | h8500-* \ +- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ +- | hexagon-* \ +- | i*86-* | i860-* | i960-* | ia64-* \ +- | ip2k-* | iq2000-* \ +- | le32-* | le64-* \ +- | lm32-* \ +- | m32c-* | m32r-* | m32rle-* \ +- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ +- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ +- | microblaze-* | microblazeel-* \ +- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ +- | mips16-* \ +- | mips64-* | mips64el-* \ +- | mips64octeon-* | mips64octeonel-* \ +- | mips64orion-* | mips64orionel-* \ +- | mips64r5900-* | mips64r5900el-* \ +- | mips64vr-* | mips64vrel-* \ +- | mips64vr4100-* | mips64vr4100el-* \ +- | mips64vr4300-* | mips64vr4300el-* \ +- | mips64vr5000-* | mips64vr5000el-* \ +- | mips64vr5900-* | mips64vr5900el-* \ +- | mipsisa32-* | mipsisa32el-* \ +- | mipsisa32r2-* | mipsisa32r2el-* \ +- | mipsisa64-* | mipsisa64el-* \ +- | mipsisa64r2-* | mipsisa64r2el-* \ +- | mipsisa64sb1-* | mipsisa64sb1el-* \ +- | mipsisa64sr71k-* | mipsisa64sr71kel-* \ +- | mipsr5900-* | mipsr5900el-* \ +- | mipstx39-* | mipstx39el-* \ +- | mmix-* \ +- | mt-* \ +- | msp430-* \ +- | nds32-* | nds32le-* | nds32be-* \ +- | nios-* | nios2-* | nios2eb-* | nios2el-* \ +- | none-* | np1-* | ns16k-* | ns32k-* \ +- | open8-* \ +- | orion-* \ +- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ +- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ +- | pyramid-* \ +- | rl78-* | romp-* | rs6000-* | rx-* \ +- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ +- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ +- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ +- | sparclite-* \ +- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ +- | tahoe-* \ +- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ +- | tile*-* \ +- | tron-* \ +- | ubicom32-* \ +- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ +- | vax-* \ +- | we32k-* \ +- | x86-* | x86_64-* | xc16x-* | xps100-* \ +- | xstormy16-* | xtensa*-* \ +- | ymp-* \ +- | z8k-* | z80-*) +- ;; +- # Recognize the basic CPU types without company name, with glob match. +- xtensa*) +- basic_machine=$basic_machine-unknown + pmac | pmac-mpw) + cpu=powerpc + vendor=apple -+ ;; + ;; + # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -4227,9 +4218,7 @@ index 8b612ab89..3b4c7624b 100755 delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola -+ cpu=m68k -+ vendor=motorola - ;; +- ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 @@ -4237,7 +4226,9 @@ index 8b612ab89..3b4c7624b 100755 - dicos) - basic_machine=i686-pc - os=-dicos -- ;; ++ cpu=m68k ++ vendor=motorola + ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp @@ -4482,9 +4473,7 @@ index 8b612ab89..3b4c7624b 100755 - ;; miniframe) - basic_machine=m68000-convergent -+ cpu=m68000 -+ vendor=convergent - ;; +- ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint @@ -4525,7 +4514,9 @@ index 8b612ab89..3b4c7624b 100755 - ncr3000) - basic_machine=i486-ncr - os=-sysv4 -- ;; ++ cpu=m68000 ++ vendor=convergent + ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd @@ -4549,14 +4540,14 @@ index 8b612ab89..3b4c7624b 100755 news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos +- ;; +- necv70) +- basic_machine=v70-nec +- os=-sysv + cpu=mips + vendor=sony + os=newsos ;; -- necv70) -- basic_machine=v70-nec -- os=-sysv -- ;; - next | m*-next ) - basic_machine=m68k-next + next | m*-next) @@ -4659,15 +4650,15 @@ index 8b612ab89..3b4c7624b 100755 ;; pbb) - basic_machine=m68k-tti -+ cpu=m68k -+ vendor=tti - ;; +- ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc -- ;; ++ cpu=m68k ++ vendor=tti + ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; @@ -4700,11 +4691,11 @@ index 8b612ab89..3b4c7624b 100755 ;; pn) - basic_machine=pn-gould +- ;; +- power) basic_machine=power-ibm + cpu=pn + vendor=gould ;; -- power) basic_machine=power-ibm -- ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) @@ -4767,241 +4758,113 @@ index 8b612ab89..3b4c7624b 100755 - sa29200) - basic_machine=a29k-amd - os=-udi -- ;; -- sb1) -- basic_machine=mipsisa64sb1-unknown -- ;; -- sb1el) -- basic_machine=mipsisa64sb1el-unknown + cpu=romp + vendor=ibm ;; - sde) -- basic_machine=mipsisa32-sde -- os=-elf -- ;; -- sei) -- basic_machine=mips-sei -- os=-seiux -- ;; -- sequent) -- basic_machine=i386-sequent -- ;; -- sh) -- basic_machine=sh-hitachi -- os=-hms -- ;; -- sh5el) -- basic_machine=sh5le-unknown -- ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparclite-wrs | simso-wrs) -- basic_machine=sparclite-wrs -- os=-vxworks -- ;; -- sps7) -- basic_machine=m68k-bull -- os=-sysv2 -- ;; -- spur) -- basic_machine=spur-unknown -- ;; -- st2000) -- basic_machine=m68k-tandem -- ;; -- stratus) -- basic_machine=i860-stratus -- os=-sysv4 -- ;; -- strongarm-* | thumb-*) -- basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` -- ;; -- sun2) -- basic_machine=m68000-sun -- ;; -- sun2os3) -- basic_machine=m68000-sun -- os=-sunos3 -- ;; -- sun2os4) -- basic_machine=m68000-sun -- os=-sunos4 -- ;; -- sun3os3) -- basic_machine=m68k-sun -- os=-sunos3 -- ;; -- sun3os4) -- basic_machine=m68k-sun -- os=-sunos4 -- ;; -- sun4os3) -- basic_machine=sparc-sun -- os=-sunos3 -- ;; -- sun4os4) -- basic_machine=sparc-sun -- os=-sunos4 -- ;; -- sun4sol2) -- basic_machine=sparc-sun -- os=-solaris2 -- ;; -- sun3 | sun3-*) -- basic_machine=m68k-sun -- ;; -- sun4) -- basic_machine=sparc-sun -- ;; -- sun386 | sun386i | roadrunner) -- basic_machine=i386-sun -- ;; -- sv1) -- basic_machine=sv1-cray -- os=-unicos -- ;; -- symmetry) -- basic_machine=i386-sequent -- os=-dynix -- ;; -- t3e) -- basic_machine=alphaev5-cray -- os=-unicos -- ;; -- t90) -- basic_machine=t90-cray -- os=-unicos -- ;; -- tile*) -- basic_machine=$basic_machine-unknown -- os=-linux-gnu -- ;; -- tx39) -- basic_machine=mipstx39-unknown -- ;; -- tx39el) -- basic_machine=mipstx39el-unknown -- ;; -- toad1) -- basic_machine=pdp10-xkl -- os=-tops20 +- sb1) +- basic_machine=mipsisa64sb1-unknown ++ sde) + cpu=mipsisa32 + vendor=sde + os=${os:-elf} -+ ;; + ;; +- sb1el) +- basic_machine=mipsisa64sb1el-unknown + simso-wrs) + cpu=sparclite + vendor=wrs + os=vxworks ;; - tower | tower-32) -- basic_machine=m68k-ncr -- ;; -- tpf) -- basic_machine=s390x-ibm -- os=-tpf -- ;; -- udi29k) -- basic_machine=a29k-amd -- os=-udi -- ;; -- ultra3) -- basic_machine=a29k-nyu -- os=-sym1 -- ;; -- v810 | necv810) -- basic_machine=v810-nec -- os=-none -- ;; -- vaxv) -- basic_machine=vax-dec -- os=-sysv -- ;; -- vms) -- basic_machine=vax-dec -- os=-vms +- sde) +- basic_machine=mipsisa32-sde +- os=-elf ++ tower | tower-32) + cpu=m68k + vendor=ncr ;; - vpp*|vx|vx-*) -- basic_machine=f301-fujitsu +- sei) +- basic_machine=mips-sei +- os=-seiux ++ vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu ;; -- vxworks960) -- basic_machine=i960-wrs -- os=-vxworks -- ;; -- vxworks68) -- basic_machine=m68k-wrs -- os=-vxworks -- ;; -- vxworks29k) -- basic_machine=a29k-wrs -- os=-vxworks -- ;; -- w65*) -- basic_machine=w65-wdc -- os=-none +- sequent) +- basic_machine=i386-sequent + w65) + cpu=w65 + vendor=wdc ;; - w89k-*) -- basic_machine=hppa1.1-winbond -- os=-proelf +- sh) +- basic_machine=sh-hitachi +- os=-hms ++ w89k-*) + cpu=hppa1.1 + vendor=winbond + os=proelf ;; -- xbox) -- basic_machine=i686-pc -- os=-mingw32 +- sh5el) +- basic_machine=sh5le-unknown + none) + cpu=none + vendor=none ;; -- xps | xps100) -- basic_machine=xps100-honeywell +- sh64) +- basic_machine=sh64-unknown + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine -+ ;; + ;; +- sparclite-wrs | simso-wrs) +- basic_machine=sparclite-wrs +- os=-vxworks + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` -+ ;; + ;; +- sps7) +- basic_machine=m68k-bull +- os=-sysv2 + + *-*) + # shellcheck disable=SC2162 + IFS="-" read cpu vendor < Date: Tue, 5 Jun 2018 19:48:08 +0000 -Subject: [PATCH 5/5] riscv: Emit debug info. +Subject: [PATCH 8/9] riscv: Emit debug info. --- asmcomp/riscv/emit.mlp | 3 +++ @@ -36,5 +36,5 @@ index 88ea9f884..cc05aefe4 100644 let lbl_begin = Compilenv.make_symbol (Some "data_begin") in ` {emit_string data_space}\n`; -- -2.22.0 +2.22.0.rc3 diff --git a/0009-Use-the-autoconf-or-system-provided-off_t-rather-tha.patch b/0009-Use-the-autoconf-or-system-provided-off_t-rather-tha.patch new file mode 100644 index 0000000..9353c5c --- /dev/null +++ b/0009-Use-the-autoconf-or-system-provided-off_t-rather-tha.patch @@ -0,0 +1,58 @@ +From 9217fab965cbde2a47dd91acb6e6452844d288ba Mon Sep 17 00:00:00 2001 +From: Stephen Dolan +Date: Mon, 29 Jul 2019 14:12:56 +0100 +Subject: [PATCH 9/9] Use the autoconf- or system-provided off_t rather than + redetecting. + +Hopefully fixes #8841 +--- + configure | 2 -- + configure.ac | 1 - + runtime/caml/io.h | 4 +--- + 3 files changed, 1 insertion(+), 6 deletions(-) + +diff --git a/configure b/configure +index 33a0aa526..a43846117 100755 +--- a/configure ++++ b/configure +@@ -12787,8 +12787,6 @@ _ACEOF + + fi + +-$as_echo "#define HAS_OFF_T 1" >>confdefs.h +- + + # Checks for structures + +diff --git a/configure.ac b/configure.ac +index 5731e0f98..38ff1235f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -674,7 +674,6 @@ AC_CHECK_HEADER([sys/select.h], [AC_DEFINE([HAS_SYS_SELECT_H])], [], + + ## off_t + AC_TYPE_OFF_T +-AC_DEFINE([HAS_OFF_T]) + + # Checks for structures + +diff --git a/runtime/caml/io.h b/runtime/caml/io.h +index 87de679e5..2d961f956 100644 +--- a/runtime/caml/io.h ++++ b/runtime/caml/io.h +@@ -29,11 +29,9 @@ + + #if defined(_WIN32) + typedef __int64 file_offset; +-#elif defined(HAS_OFF_T) ++#else + #include + typedef off_t file_offset; +-#else +-typedef long file_offset; + #endif + + struct channel { +-- +2.22.0.rc3 + diff --git a/ocaml.spec b/ocaml.spec index 9f60d45..41f8bfa 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -26,9 +26,12 @@ # Architectures where parallel builds fail. #%global no_parallel_build_arches aarch64 +#%global rcver %{nil} +%global rcver +rc2 + Name: ocaml -Version: 4.08.0 -Release: 2%{?dist} +Version: 4.08.1 +Release: 0.rc2.1%{?dist} Summary: OCaml compiler and programming environment @@ -36,7 +39,7 @@ License: QPL and (LGPLv2+ with exceptions) URL: http://www.ocaml.org -Source0: http://caml.inria.fr/pub/distrib/ocaml-4.08/ocaml-%{version}.tar.xz +Source0: http://caml.inria.fr/pub/distrib/ocaml-4.08/ocaml-%{version}%{rcver}.tar.xz # IMPORTANT NOTE: # @@ -47,22 +50,26 @@ Source0: http://caml.inria.fr/pub/distrib/ocaml-4.08/ocaml-%{version}.tar # # https://pagure.io/fedora-ocaml # -# Current branch: fedora-31-4.08.0 +# Current branch: fedora-31-4.08.1 # # ALTERNATIVELY add a patch to the end of the list (leaving the # existing patches unchanged) adding a comment to note that it should # be incorporated into the git repo at a later time. # +Patch0001: 0001-increment-version-number-after-tagging-4.08.1-rc2.patch +Patch0002: 0002-Fix-spelling-errors-reported-by-Lintian.patch +Patch0003: 0003-Fix-language-of-some-error-messages-in-ocamldoc.patch # Fedora-specific downstream patches. -Patch0001: 0001-Don-t-add-rpaths-to-libraries.patch -Patch0002: 0002-configure-Allow-user-defined-C-compiler-flags.patch -Patch0003: 0003-configure-Remove-incorrect-assumption-about-cross-co.patch - +Patch0004: 0004-Don-t-add-rpaths-to-libraries.patch +Patch0005: 0005-configure-Allow-user-defined-C-compiler-flags.patch +Patch0006: 0006-configure-Remove-incorrect-assumption-about-cross-co.patch # Out of tree patch for RISC-V support. # https://github.com/nojb/riscv-ocaml -Patch0004: 0004-Add-RISC-V-backend.patch -Patch0005: 0005-riscv-Emit-debug-info.patch +Patch0007: 0007-Add-RISC-V-backend.patch +Patch0008: 0008-riscv-Emit-debug-info.patch +# Fix for https://github.com/ocaml/ocaml/issues/8841 +Patch0009: 0009-Use-the-autoconf-or-system-provided-off_t-rather-tha.patch BuildRequires: gcc BuildRequires: autoconf @@ -176,7 +183,7 @@ may not be portable between versions. %prep -%setup -q -T -b 0 -n %{name}-%{version} +%setup -q -T -b 0 -n %{name}-%{version}%{rcver} %autopatch -p1 # Patches touch configure.ac, so rebuild it: autoconf --force @@ -379,6 +386,10 @@ find $RPM_BUILD_ROOT \( -name '*.cmt' -o -name '*.cmti' \) -a -delete %changelog +* Tue Jul 30 2019 Richard W.M. Jones - 4.08.1-0.rc2.1 +- OCaml 4.08.1+rc2. +- Include fix for miscompilation of off_t on 32 bit architectures. + * Thu Jul 25 2019 Fedora Release Engineering - 4.08.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 71051d7..1e7ae92 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ocaml-4.08.0.tar.xz) = bd0739b8310f6a0dce17525ea734f3a1d29fec730656ca6fc5cae2dc8a12beca4ac8166a65ab3fa50490d01cc87b99c28eaa3b61d1cde7c30821b41e8d171a53 +SHA512 (ocaml-4.08.1+rc2.tar.xz) = 74d5929e75ec4dd6cd69250005a18cede7e8036301dc05660aee99330f1ba4013575df1f9fe03dc7e913de3719215122b71681f0fad6f571a5feecb594c1e460