summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrischka <grischka>2009-05-16 22:29:40 +0200
committergrischka <grischka>2009-05-16 22:29:40 +0200
commit68310299b67bef763ba1622dac2aec534e096bf1 (patch)
treea9a645d367324d9abb01a6138bbfc91e1accc628
parentbf8d8f5f3e0a15c790adeb13eae68091d52fb58f (diff)
ulibc: #define TCC_UCLIBC and load elf_interp
-rw-r--r--Changelog4
-rw-r--r--Makefile5
-rw-r--r--tccelf.c8
3 files changed, 12 insertions, 5 deletions
diff --git a/Changelog b/Changelog
index 21ee4b9..b271054 100644
--- a/Changelog
+++ b/Changelog
@@ -1,8 +1,10 @@
version 0.9.25:
-- split tcc.c into tcc.h libtcc.c tccpp.c tccgen.c tcc.c
- first support for x86-64 target (Shinichiro Hamaji)
+- support µClibc
+- split tcc.c into tcc.h libtcc.c tccpp.c tccgen.c tcc.c
- improved preprocess output with linenumbers and spaces preserved
+- tcc_relocate now copies code into user buffer
- fix bitfields with non-int types and in unions
- improve ARM cross-compiling (Daniel Glöckner)
- link stabstr sections from multiple objects
diff --git a/Makefile b/Makefile
index ef66d40..7289b67 100644
--- a/Makefile
+++ b/Makefile
@@ -58,6 +58,11 @@ endif
endif
endif
+ifneq ($(wildcard /lib/ld-uClibc.so.0),)
+NATIVE_TARGET+=-DTCC_UCLIBC
+BCHECK_O=
+endif
+
ifdef CONFIG_USE_LIBGCC
LIBTCC1=
endif
diff --git a/tccelf.c b/tccelf.c
index 5971442..4020e24 100644
--- a/tccelf.c
+++ b/tccelf.c
@@ -1272,17 +1272,17 @@ static void tcc_add_linker_symbols(TCCState *s1)
}
/* name of ELF interpreter */
-#ifdef __FreeBSD__
+#if defined __FreeBSD__
static char elf_interp[] = "/usr/libexec/ld-elf.so.1";
-#else
-#ifdef TCC_ARM_EABI
+#elif defined TCC_ARM_EABI
static char elf_interp[] = "/lib/ld-linux.so.3";
#elif defined(TCC_TARGET_X86_64)
static char elf_interp[] = "/lib/ld-linux-x86-64.so.2";
+#elif defined(TCC_UCLIBC)
+static char elf_interp[] = "/lib/ld-uClibc.so.0";
#else
static char elf_interp[] = "/lib/ld-linux.so.2";
#endif
-#endif
static void tcc_output_binary(TCCState *s1, FILE *f,
const int *section_order)