Set CONFIG_TCC_CRT_PREFIX relative to CONFIG_SYSROOT
Set CONFIG_TCC_CRT_PREFIX relative to CONFIG_SYSROOT for consistency with CONFIG_TCC_LDDIR.
This commit is contained in:
4
libtcc.c
4
libtcc.c
@ -1348,8 +1348,8 @@ LIBTCCAPI int tcc_set_output_type(TCCState *s, int output_type)
|
|||||||
if ((output_type == TCC_OUTPUT_EXE || output_type == TCC_OUTPUT_DLL) &&
|
if ((output_type == TCC_OUTPUT_EXE || output_type == TCC_OUTPUT_DLL) &&
|
||||||
!s->nostdlib) {
|
!s->nostdlib) {
|
||||||
if (output_type != TCC_OUTPUT_DLL)
|
if (output_type != TCC_OUTPUT_DLL)
|
||||||
tcc_add_file(s, CONFIG_TCC_CRT_PREFIX "/crt1.o");
|
tcc_add_file(s, CONFIG_SYSROOT CONFIG_TCC_CRT_PREFIX "/crt1.o");
|
||||||
tcc_add_file(s, CONFIG_TCC_CRT_PREFIX "/crti.o");
|
tcc_add_file(s, CONFIG_SYSROOT CONFIG_TCC_CRT_PREFIX "/crti.o");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
4
tcc.h
4
tcc.h
@ -149,7 +149,7 @@ typedef int BOOL;
|
|||||||
|
|
||||||
/* path to find crt1.o, crti.o and crtn.o */
|
/* path to find crt1.o, crti.o and crtn.o */
|
||||||
#ifndef CONFIG_TCC_CRT_PREFIX
|
#ifndef CONFIG_TCC_CRT_PREFIX
|
||||||
# define CONFIG_TCC_CRT_PREFIX CONFIG_SYSROOT "/usr" CONFIG_TCC_LDDIR
|
# define CONFIG_TCC_CRT_PREFIX "/usr" CONFIG_TCC_LDDIR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_TCC_SYSINCLUDE_PATHS
|
#ifndef CONFIG_TCC_SYSINCLUDE_PATHS
|
||||||
@ -165,7 +165,7 @@ typedef int BOOL;
|
|||||||
# define CONFIG_TCC_LIBPATH "\b/lib"
|
# define CONFIG_TCC_LIBPATH "\b/lib"
|
||||||
# else
|
# else
|
||||||
# define CONFIG_TCC_LIBPATH \
|
# define CONFIG_TCC_LIBPATH \
|
||||||
CONFIG_TCC_CRT_PREFIX \
|
CONFIG_SYSROOT CONFIG_TCC_CRT_PREFIX \
|
||||||
":" CONFIG_SYSROOT CONFIG_TCC_LDDIR \
|
":" CONFIG_SYSROOT CONFIG_TCC_LDDIR \
|
||||||
":" CONFIG_SYSROOT "/usr/local" CONFIG_TCC_LDDIR
|
":" CONFIG_SYSROOT "/usr/local" CONFIG_TCC_LDDIR
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
2
tccelf.c
2
tccelf.c
@ -1252,7 +1252,7 @@ ST_FUNC void tcc_add_runtime(TCCState *s1)
|
|||||||
}
|
}
|
||||||
/* add crt end if not memory output */
|
/* add crt end if not memory output */
|
||||||
if (s1->output_type != TCC_OUTPUT_MEMORY && !s1->nostdlib) {
|
if (s1->output_type != TCC_OUTPUT_MEMORY && !s1->nostdlib) {
|
||||||
tcc_add_file(s1, CONFIG_TCC_CRT_PREFIX "/crtn.o");
|
tcc_add_file(s1, CONFIG_SYSROOT CONFIG_TCC_CRT_PREFIX "/crtn.o");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user