fix for the previous commit: tcc_add_support() was used before definition

master
seyko 2015-03-26 06:22:37 +03:00
parent a105837aae
commit 548a55eda5
1 changed files with 25 additions and 25 deletions

View File

@ -1540,6 +1540,31 @@ static void add_init_array_defines(TCCState *s1, const char *section_name)
s->sh_num, sym_end);
}
static int tcc_add_support(TCCState *s1, const char *filename)
{
char buf[1024];
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);
}
ST_FUNC void tcc_add_bcheck(TCCState *s1)
{
#ifdef CONFIG_TCC_BCHECK
@ -1575,31 +1600,6 @@ ST_FUNC void tcc_add_bcheck(TCCState *s1)
#endif
}
static inline int tcc_add_support(TCCState *s1, const char *filename)
{
char buf[1024];
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);
}
/* add tcc runtime libraries */
ST_FUNC void tcc_add_runtime(TCCState *s1)
{