Add -Wl,-install_name macOS clang compatible flag as clang refuses -Wl,-soname. This helps configure scripts using both clang and tcc.
This commit is contained in:
parent
3fd6a05fff
commit
95e39517ef
2 changed files with 5 additions and 0 deletions
2
libtcc.c
2
libtcc.c
|
@ -1450,6 +1450,8 @@ static int tcc_set_linker(TCCState *s, const char *option)
|
||||||
s->section_align = strtoul(p, &end, 16);
|
s->section_align = strtoul(p, &end, 16);
|
||||||
} else if (link_option(option, "soname=", &p)) {
|
} else if (link_option(option, "soname=", &p)) {
|
||||||
copy_linker_arg(&s->soname, p, 0);
|
copy_linker_arg(&s->soname, p, 0);
|
||||||
|
} else if (link_option(option, "install_name=", &p)) {
|
||||||
|
copy_linker_arg(&s->soname, p, 0);
|
||||||
#ifdef TCC_TARGET_PE
|
#ifdef TCC_TARGET_PE
|
||||||
} else if (link_option(option, "large-address-aware", &p)) {
|
} else if (link_option(option, "large-address-aware", &p)) {
|
||||||
s->pe_characteristics |= 0x20;
|
s->pe_characteristics |= 0x20;
|
||||||
|
|
3
tcc.c
3
tcc.c
|
@ -142,6 +142,9 @@ static const char help2[] =
|
||||||
" -rpath= set dynamic library search path\n"
|
" -rpath= set dynamic library search path\n"
|
||||||
" -enable-new-dtags set DT_RUNPATH instead of DT_RPATH\n"
|
" -enable-new-dtags set DT_RUNPATH instead of DT_RPATH\n"
|
||||||
" -soname= set DT_SONAME elf tag\n"
|
" -soname= set DT_SONAME elf tag\n"
|
||||||
|
#if defined(TCC_TARGET_MACHO)
|
||||||
|
" -install_name= set DT_SONAME elf tag (soname macOS alias)\n"
|
||||||
|
#endif
|
||||||
" -Bsymbolic set DT_SYMBOLIC elf tag\n"
|
" -Bsymbolic set DT_SYMBOLIC elf tag\n"
|
||||||
" -oformat=[elf32/64-* binary] set executable output format\n"
|
" -oformat=[elf32/64-* binary] set executable output format\n"
|
||||||
" -init= -fini= -Map= -as-needed -O (ignored)\n"
|
" -init= -fini= -Map= -as-needed -O (ignored)\n"
|
||||||
|
|
Loading…
Reference in a new issue