!42 fix build on RISC-V

From: @xing_xing1992 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
This commit is contained in:
openeuler-ci-bot 2023-01-20 09:54:19 +00:00 committed by Gitee
commit 4e8ac26e99
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,48 @@
From 063cd86c18b9815a76549c4ad5e82103898ade23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= <edwin@etorok.net>
Date: Tue, 8 Jun 2021 20:32:23 +0000
Subject: [PATCH] asmcomp/dune: fix build on RISC-V
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
dune build @libs was failing with
```
bash asmcomp/CSE.ml,asmcomp/arch.ml,asmcomp/proc.ml,asmcomp/reload.ml,asmcomp/scheduling.ml,asmcomp/selection.ml (exit 1)
(cd _build/default/asmcomp && /bin/bash -e -u -o pipefail -c 'cp `grep '\''^ARCH='\'' ../Makefile.config | cut -d'\''='\'' -f2`/*.ml .')
cp: cannot stat 'riscv/*.ml': No such file or directory
bash asmcomp/contains-input-name,asmcomp/emit.ml (exit 1)
(cd _build/default/asmcomp && /bin/bash -e -u -o pipefail -c '../tools/cvt_emit.exe < `cat contains-input-name`') > _build/default/asmcomp/emit.ml
/bin/bash: line 1: riscv/emit.mlp: No such file or directory
```
No change entry needed
Signed-off-by: Edwin Török <edwin@etorok.net>
---
asmcomp/dune | 2 ++
1 file changed, 2 insertions(+)
diff --git a/asmcomp/dune b/asmcomp/dune
index a208b56e5..1a4d561d6 100644
--- a/asmcomp/dune
+++ b/asmcomp/dune
@@ -21,6 +21,7 @@
(glob_files arm64/*.ml)
(glob_files i386/*.ml)
(glob_files power/*.ml)
+ (glob_files riscv/*.ml)
(glob_files s390x/*.ml))
(action (bash "cp `grep '^ARCH=' %{conf} | cut -d'=' -f2`/*.ml .")))
@@ -33,6 +34,7 @@
arm64/emit.mlp
i386/emit.mlp
power/emit.mlp
+ riscv/emit.mlp
s390x/emit.mlp)
(action
(progn
--
2.39.0.windows.2

View File

@ -1,6 +1,6 @@
Name: ocaml
Version: 4.13.1
Release: 5
Release: 6
Summary: OCaml compiler and programming environment
License: LGPL-2.1-only
URL: http://www.ocaml.org
@ -11,6 +11,7 @@ Patch0002: 0002-configure-Allow-user-defined-C-compiler-flags.patch
Patch0003: 0003-configure-Remove-incorrect-assumption-about-cross-co.patch
Patch0004: 0004-Update-dependencies.patch
Patch0005: 0005-Bug-fix-equal_private-was-being-used-in-too-many-pla.patch
Patch0006: 0006-asmcomp-dune-fix-build-on-RISC-V.patch
BuildRequires: gcc binutils-devel ncurses-devel gdbm-devel gawk perl-interpreter
BuildRequires: util-linux chrpath autoconf annobin make
@ -201,6 +202,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
%{_mandir}/man3/*
%changelog
* Thu Jan 18 2023 xingxing <xingxing@xfusion.com> - 4.13.1-6
- fix build on RISC-V
* Tue Jan 18 2023 xingxing<xingxing@xfusion.com> - 4.13.1-5
- Bug fix equal private was being used in too many pla