aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2017-04-20 22:01:50 +0200
committerMarc Vertes <mvertes@free.fr>2017-04-20 22:01:50 +0200
commit0ac29b53dc038408b08e0f8515ae6edabc145f76 (patch)
tree486075117b53ddca84c5d42adb7b8b182277b0ed /tcc.h
parent328b826e8a43ed39f9eebb8493cc6abea2ddac1c (diff)
downloadtinycc-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 'tcc.h')
-rw-r--r--tcc.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/tcc.h b/tcc.h
index 30e8dec..5b9d4a3 100644
--- a/tcc.h
+++ b/tcc.h
@@ -136,7 +136,7 @@
#if !defined(TCC_UCLIBC) && !defined(TCC_TARGET_ARM) && \
!defined(TCC_TARGET_ARM64) && !defined(TCC_TARGET_C67) && \
- !defined(CONFIG_USE_LIBGCC)
+ !defined(CONFIG_USE_LIBGCC) && !defined(TCC_MUSL)
#define CONFIG_TCC_BCHECK /* enable bound checking code */
#endif
@@ -239,11 +239,23 @@
# elif defined(TCC_UCLIBC)
# define CONFIG_TCC_ELFINTERP "/lib/ld-uClibc.so.0" /* is there a uClibc for x86_64 ? */
# elif defined TCC_TARGET_ARM64
-# define CONFIG_TCC_ELFINTERP "/lib/ld-linux-aarch64.so.1"
+# if defined(TCC_MUSL)
+# define CONFIG_TCC_ELFINTERP "/lib/ld-musl-aarch64.so.1"
+# else
+# define CONFIG_TCC_ELFINTERP "/lib/ld-linux-aarch64.so.1"
+# endif
# elif defined(TCC_TARGET_X86_64)
-# define CONFIG_TCC_ELFINTERP "/lib64/ld-linux-x86-64.so.2"
+# if defined(TCC_MUSL)
+# define CONFIG_TCC_ELFINTERP "/lib/ld-musl-x86_64.so.1"
+# else
+# define CONFIG_TCC_ELFINTERP "/lib64/ld-linux-x86-64.so.2"
+# endif
# elif !defined(TCC_ARM_EABI)
-# define CONFIG_TCC_ELFINTERP "/lib/ld-linux.so.2"
+# if defined(TCC_MUSL)
+# define CONFIG_TCC_ELFINTERP "/lib/ld-musl-arm.so.1"
+# else
+# define CONFIG_TCC_ELFINTERP "/lib/ld-linux.so.2"
+# endif
# endif
#endif