Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devel/lightning: Fix build on armv6/armv7
Fix the problem that made the build fail with LLVM. However, compiling with LLVM still leads to test suite failures on ARM so we compile with gcc instead. The patch for LLVM is left in for if a future version of the library fixes the problem. PR: 268079 Reported by: fuz@fuz.su MFH: 2022Q4
- Loading branch information
1 parent
30be1d3
commit fc86afb
Showing
3 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- check/lightning.c.orig 2022-11-08 16:00:32 UTC | ||
+++ check/lightning.c | ||
@@ -4333,7 +4333,7 @@ main(int argc, char *argv[]) | ||
#else | ||
# define cc "gcc" | ||
#endif | ||
- opt_short = snprintf(cmdline, sizeof(cmdline), cc " -E -x c %s", argv[opt_index]); | ||
+ opt_short = snprintf(cmdline, sizeof(cmdline), "%%CC%% -E -x c %s", argv[opt_index]); | ||
opt_short += snprintf(cmdline + opt_short, | ||
sizeof(cmdline) - opt_short, | ||
" -D__WORDSIZE=%d", __WORDSIZE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- lib/jit_arm-swf.c.orig 2022-11-30 10:43:45 UTC | ||
+++ lib/jit_arm-swf.c | ||
@@ -402,7 +402,7 @@ static void _swf_vaarg_d(jit_state_t*, jit_int32_t, ji | ||
BICI(rt, rn, encode_arm_immediate(im)); \ | ||
} while (0) | ||
|
||
-#if !defined(__GNUC__) | ||
+#if !defined(__GNUC__) || defined(__llvm__) | ||
float __addsf3(float u, float v) | ||
{ | ||
return (u + v); | ||
@@ -414,6 +414,8 @@ __adddf3(double u, double v) | ||
return (u + v); | ||
} | ||
|
||
+#endif | ||
+#if !defined(__GNUC__) | ||
float | ||
__aeabi_fsub(float u, float v) | ||
{ |