Skip to content

Commit

Permalink
musl: Patch to build math library for Snitch
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Aug 11, 2023
1 parent 465c144 commit b2a8d27
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions sw/math/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include/bits/
17 changes: 17 additions & 0 deletions sw/math/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
BITS_DIR = include/bits

Check failure on line 1 in sw/math/Makefile

View workflow job for this annotation

GitHub Actions / Check License headers

FAILED: File does not start with comment

Check failure on line 1 in sw/math/Makefile

View workflow job for this annotation

GitHub Actions / Check License headers

FAILED: File does not start with comment

Check failure on line 1 in sw/math/Makefile

View workflow job for this annotation

GitHub Actions / Check License headers

FAILED: File does not start with comment

Check failure on line 1 in sw/math/Makefile

View workflow job for this annotation

GitHub Actions / Check License headers

FAILED: File does not start with comment
ALLTYPES_H = $(BITS_DIR)/alltypes.h


.PHONY: all clean

all: $(ALLTYPES_H)

clean:
rm -rf $(BITS_DIR)
rm -f $(ALLTYPES_H)

$(BITS_DIR):
mkdir -p $@

$(ALLTYPES_H): | $(BITS_DIR)
sed -f tools/mkalltypes.sed arch/riscv64/bits/alltypes.h.in > $@
2 changes: 2 additions & 0 deletions sw/math/include/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@ float pow10f(float);
long double pow10l(long double);
#endif

#include "../src/math/tanh.c"

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit b2a8d27

Please sign in to comment.