cross-compilers: allow individual configuration

since configure supports only native configuration
a file 'cross-tcc.mak' needs to be created manually.
It is included in the Makefile if present.

# ----------------------------------------------------
# Example config-cross.mak:
#
# windows -> i386-linux cross-compiler
# (it expects the linux files in <prefix>/i386-linux)

ROOT-i386 = {B}/i386-linux
CRT-i386 = $(ROOT-i386)/usr/lib
LIB-i386 = $(ROOT-i386)/lib:$(ROOT-i386)/usr/lib
INC-i386 = {B}/lib/include:$(ROOT-i386)/usr/include
DEF-i386 += -D__linux__

# ----------------------------------------------------

Also:
- use libtcc1-<target>.a instead of directories
- add dummy arm assembler
- remove include dependencies from armeabi.c/lib-arm64.c
- tccelf/ld_add_file: add SYSROOT (when defined) to absolute
  filenames coming from ld-scripts
This commit is contained in:
grischka
2017-02-23 08:41:57 +01:00
parent 576bee9a37
commit 569255e6c4
15 changed files with 366 additions and 243 deletions

View File

@ -1905,15 +1905,17 @@ static void pe_add_runtime(TCCState *s1, struct pe_info *pe)
if (0 == s1->nostdlib) {
static const char *libs[] = {
"tcc1", "msvcrt", "kernel32", "", "user32", "gdi32", NULL
TCC_LIBTCC1, "msvcrt", "kernel32", "", "user32", "gdi32", NULL
};
const char **pp, *p;
for (pp = libs; 0 != (p = *pp); ++pp) {
if (0 == *p) {
if (PE_DLL != pe_type && PE_GUI != pe_type)
break;
} else if (tcc_add_library_err(s1, p) < 0) {
break;
} else if (pp == libs && tcc_add_dll(s1, p, 0) >= 0) {
continue;
} else {
tcc_add_library_err(s1, p);
}
}
}