diff options
| author | Marc Vertes <mvertes@free.fr> | 2017-04-20 22:01:50 +0200 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2017-04-20 22:01:50 +0200 |
| commit | 0ac29b53dc038408b08e0f8515ae6edabc145f76 (patch) | |
| tree | 486075117b53ddca84c5d42adb7b8b182277b0ed /lib | |
| parent | 328b826e8a43ed39f9eebb8493cc6abea2ddac1c (diff) | |
| download | tinycc-0ac29b53dc038408b08e0f8515ae6edabc145f76.tar.gz tinycc-0ac29b53dc038408b08e0f8515ae6edabc145f76.tar.bz2 | |
Add support of musl-libc
The port is functional. Bound checking is not supported yet.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Makefile | 4 | ||||
| -rw-r--r-- | lib/bcheck.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/Makefile b/lib/Makefile index 3c5b988..9861743 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -30,6 +30,10 @@ ifeq ($(TARGETOS),Darwin) BCHECK_O = endif +ifeq ($(CONFIG_musl),yes) + BCHECK_O = +endif + I386_O = libtcc1.o alloca86.o alloca86-bt.o $(BCHECK_O) X86_64_O = libtcc1.o alloca86_64.o alloca86_64-bt.o $(BCHECK_O) ARM_O = libtcc1.o armeabi.o alloca-arm.o diff --git a/lib/bcheck.c b/lib/bcheck.c index 9eb012f..41c08aa 100644 --- a/lib/bcheck.c +++ b/lib/bcheck.c @@ -48,7 +48,7 @@ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \ || defined(__DragonFly__) || defined(__dietlibc__) \ || defined(__UCLIBC__) || defined(__OpenBSD__) || defined(__NetBSD__) \ - || defined(_WIN32) || defined(TCC_UCLIBC) + || defined(_WIN32) || defined(TCC_UCLIBC) || defined(TCC_MUSL) //#warning Bound checking does not support malloc (etc.) in this environment. #undef CONFIG_TCC_MALLOC_HOOKS #undef HAVE_MEMALIGN |
