diff options
| author | grischka <grischka> | 2011-08-11 16:55:30 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2011-08-11 16:55:30 +0200 |
| commit | 74a24d77fd9c08ad9a6b3b6c0f434c7314dae639 (patch) | |
| tree | 4cae2ee70148c10aeedf322a24ac06a626a6249d /libtcc.c | |
| parent | fd0cea8895c3d253644fee51f50da9ff94fe83a3 (diff) | |
| download | tinycc-74a24d77fd9c08ad9a6b3b6c0f434c7314dae639.tar.gz tinycc-74a24d77fd9c08ad9a6b3b6c0f434c7314dae639.tar.bz2 | |
libtcc: minor adjustments
- use {B} to substitute tcc_lih_path (instead of \b)
- expand CONFIG_TCC_CRTPREFIX in CONFIG_TCC_LIBPATHS
which fixes duplicate CONFIG_SYSROOT.
- put default CONFIG_SYSROOT ("") into tcc.h
- remove hack from commit db6fcce78f4d8ea25036dd6643e9fa83d8e52e5a
because $(tccdir)/include is already in sysincludes
- configure: error out for unrecognized options.
- win32/build-tcc.bat: put libtcc into base dir where it will
find lib/include automatically, and build libtcc_test example.
Diffstat (limited to 'libtcc.c')
| -rw-r--r-- | libtcc.c | 29 |
1 files changed, 7 insertions, 22 deletions
@@ -32,12 +32,6 @@ ST_DATA int tcc_ext = 1; /* XXX: get rid of this ASAP */ ST_DATA struct TCCState *tcc_state; -#ifdef CONFIG_TCC_BACKTRACE -ST_DATA int num_callers = 6; -ST_DATA const char **rt_bound_error_msg; -ST_DATA void *rt_prog_main; -#endif - /********************************************************/ #ifdef ONE_SOURCE @@ -115,7 +109,7 @@ static void tcc_add_systemdir(TCCState *s) { char buf[1000]; GetSystemDirectory(buf, sizeof buf); - tcc_add_library_path(s, buf); + tcc_add_library_path(s, normalize_slashes(buf)); } #ifndef CONFIG_TCC_STATIC @@ -315,8 +309,10 @@ static void tcc_split_path(TCCState *s, void ***p_ary, int *p_nb_ary, const char cstr_new(&str); for (p = in; c = *p, c != '\0' && c != PATHSEP; ++p) { - if (c == '\b') { - cstr_cat(&str, s->tcc_lib_path); + if (c == '{' && p[1] && p[2] == '}') { + c = p[1], p += 2; + if (c == 'B') + cstr_cat(&str, s->tcc_lib_path); } else { cstr_ccat(&str, c); } @@ -640,11 +636,6 @@ PUB_FUNC void error(const char *fmt, ...) } } -PUB_FUNC void expect(const char *msg) -{ - error("%s expected", msg); -} - PUB_FUNC void warning(const char *fmt, ...) { TCCState *s1 = tcc_state; @@ -1242,6 +1233,7 @@ static int tcc_add_library_internal(TCCState *s, const char *fmt, return -1; } +#ifndef TCC_TARGET_PE /* find and load a dll. Return non zero if not found */ /* XXX: add '-rpath' option support ? */ ST_FUNC int tcc_add_dll(TCCState *s, const char *filename, int flags) @@ -1249,6 +1241,7 @@ ST_FUNC int tcc_add_dll(TCCState *s, const char *filename, int flags) return tcc_add_library_internal(s, "%s/%s", filename, flags, s->library_paths, s->nb_library_paths); } +#endif ST_FUNC int tcc_add_crt(TCCState *s, const char *filename) { @@ -1604,14 +1597,6 @@ LIBTCCAPI void tcc_set_lib_path(TCCState *s, const char *path) s->tcc_lib_path = tcc_strdup(path); } -PUB_FUNC void set_num_callers(int n) -{ -#ifdef CONFIG_TCC_BACKTRACE - num_callers = n; -#endif -} - - PUB_FUNC char *tcc_default_target(TCCState *s, const char *default_file) { char buf[1024]; |
