diff options
| author | seyko <seyko2@gmail.com> | 2015-03-03 18:34:22 +0300 |
|---|---|---|
| committer | seyko <seyko2@gmail.com> | 2015-03-03 18:34:22 +0300 |
| commit | d70440b406f84b2e0ed77d052682c6d39d3b1a8a (patch) | |
| tree | 38311c5217ee53481e1950910af0844e3fe1a717 /tccelf.c | |
| parent | 43e4a406b4675cd312453697c7a19f2bd63c3b55 (diff) | |
| download | tinycc-d70440b406f84b2e0ed77d052682c6d39d3b1a8a.tar.gz tinycc-d70440b406f84b2e0ed77d052682c6d39d3b1a8a.tar.bz2 | |
A 32/64 bit tcc on linux: an arch specific path for libtcc1.a
Don't use /usr/local/lib/tcc/libtcc1.a for i386 and x86_64
A $(tccdir)/i386 directory was used to install a libtcc1.a
but only when cross compiling. And no x86_64 directory.
And this directory location was unknown inside tccelf.c
Diffstat (limited to 'tccelf.c')
| -rw-r--r-- | tccelf.c | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -1575,7 +1575,25 @@ ST_FUNC void tcc_add_bcheck(TCCState *s1) static inline int tcc_add_support(TCCState *s1, const char *filename) { char buf[1024]; - snprintf(buf, sizeof(buf), "%s/%s", s1->tcc_lib_path, filename); + snprintf(buf, sizeof(buf), "%s/%s/%s", s1->tcc_lib_path, + /* an cpu specific path inside tcc_lib_path, mainly for keeping libtcc1.a */ + #ifdef TCC_TARGET_I386 + "i386" + #endif + #ifdef TCC_TARGET_X86_64 + "x86-64" + #endif + #ifdef TCC_TARGET_ARM + "ARM" + #endif + #ifdef TCC_TARGET_ARM64 + "ARM64" + #endif + #ifdef TCC_TARGET_C67 + "C67" + #endif + ,filename); + return tcc_add_file(s1, buf); } |
