From 41585ad090e1fbbeaff1068eb10d6bc2e0eba676 Mon Sep 17 00:00:00 2001 From: Wenlong Zhang Date: Fri, 19 May 2023 17:29:21 +0800 Subject: [PATCH] fix build error for loongarch64 --- 0001-fix-build-error-for-loongarch64.patch | 22 ++++++++++++++++++++++ erlang-lfe.spec | 9 ++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 0001-fix-build-error-for-loongarch64.patch diff --git a/0001-fix-build-error-for-loongarch64.patch b/0001-fix-build-error-for-loongarch64.patch new file mode 100644 index 0000000..77088b4 --- /dev/null +++ b/0001-fix-build-error-for-loongarch64.patch @@ -0,0 +1,22 @@ +From f00d7dd15dceadb2441f163d70bbe03bd4cbc7ae Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Fri, 19 May 2023 09:04:07 +0000 +Subject: [PATCH] fix build error for loongarch64 + +--- + rebar.config | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/rebar.config b/rebar.config +index 1204a6f..a732d89 100644 +--- a/rebar.config ++++ b/rebar.config +@@ -36,3 +36,5 @@ + "bin/lfescript bin/lfec -o $REBAR_DEPS_DIR/lfe/ebin src/*.lfe"} + %% TODO: equivalent win32 hook + ]}. ++{port_env, [{"DRV_LDFLAGS", "-shared -L/usr/lib64/erlang/lib/erl_interface-4.0.3.1/lib -lei"}]}. ++ +-- +2.33.0 + diff --git a/erlang-lfe.spec b/erlang-lfe.spec index 2289f6b..13c07f5 100644 --- a/erlang-lfe.spec +++ b/erlang-lfe.spec @@ -7,12 +7,13 @@ %endif Name: erlang-%{realname} Version: 2.1.1 -Release: 1 +Release: 2 Summary: Lisp Flavoured Erlang License: BSD URL: https://github.com/%{upstream}/%{realname} VCS: scm:git:https://github.com/%{upstream}/%{realname}.git Source0: https://github.com/%{upstream}/%{realname}/archive/%{version}/%{realname}-%{version}.tar.gz +Patch0: 0001-fix-build-error-for-loongarch64.patch %if 0%{?need_bootstrap} BuildRequires: erlang-erts erlang-rpm-macros @@ -31,6 +32,9 @@ code. An LFE evaluator and shell is also included. %prep %setup -q -n %{realname}-%{version} +%ifarch loongarch64 +%patch0 -p1 +%endif %build %if 0%{?need_bootstrap} @@ -85,6 +89,9 @@ echo "No tests during bootstrapping" %{_emacs_sitestartdir}/lfe-start.el %changelog +* Mon May 8 2023 Wenlong Zhang - 2.1.1-2 +- fix build error for loongarch64 + * Tue Feb 28 2023 lilong - 2.1.1-1 - Upgrade to 2.1.1