Skip to content

Commit 7bff108

Browse files
committed
Cleanup
1 parent 274b776 commit 7bff108

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ CFLAGS += -Os -Iruntime -I$(BUILD) -Wno-unused-value -Wno-unused-function \
3535

3636
#MPY_LD_FLAGS += -v
3737

38-
#CLEAN_EXTRA += $(BUILD)
39-
4038
$(BUILD)/wasm.c: $(WASM)
4139
$(Q)$(MKDIR) -p $(BUILD)
4240
$(ECHO) "W2C $<"

run-tests.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ set -e
77

88
export PATH=.:$PATH
99

10-
mpremote mkdir :lib 2>&1 >/dev/null || true
11-
1210
for APP in assemblyscript cpp rust tinygo zig virgil wat coremark; do
1311
echo "======================================"
1412
echo " Building $APP.mpy ..."
@@ -19,7 +17,7 @@ for APP in assemblyscript cpp rust tinygo zig virgil wat coremark; do
1917
if [[ $ARCH == @(x64|x86) ]]; then
2018
micropython-$ARCH -c "import $APP as app; app.setup(); app.loop(); app.loop()"
2119
else
22-
mpremote cp $APP.mpy :lib/ 2>&1 >/dev/null
20+
mpremote cp $APP.mpy : 2>&1 >/dev/null
2321
mpremote exec "import $APP as app; app.setup(); app.loop(); app.loop()" || true
2422
fi
2523
echo

runtime/libc.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
* Created: 24.08.2024
44
**/
55

6+
// define errno before any includes so it gets into BSS
7+
int errno;
8+
69
#include "py/dynruntime.h"
710

811
#include <stddef.h>
912
#include <stdlib.h>
1013
#include <string.h>
14+
#include <errno.h>
1115

1216
void *calloc(size_t num, size_t size) {
1317
void *ptr = m_malloc(num * size);
@@ -54,8 +58,6 @@ int strncmp(const char *_l, const char *_r, size_t n) {
5458
return *l - *r;
5559
}
5660

57-
int errno;
58-
5961
int *__errno(void) {
6062
return &errno;
6163
}

0 commit comments

Comments
 (0)