summaryrefslogtreecommitdiff
path: root/libtcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtcc.c')
-rw-r--r--libtcc.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libtcc.c b/libtcc.c
index 9534e7d..b6dbb01 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -1134,7 +1134,7 @@ LIBTCCAPI int tcc_add_library_path(TCCState *s, const char *pathname)
}
static int tcc_add_library_internal(TCCState *s, const char *fmt,
- const char *filename, int flags, char **paths, int nb_paths, const char *rpath)
+ const char *filename, int flags, char **paths, int nb_paths)
{
char buf[1024];
int i;
@@ -1144,11 +1144,6 @@ static int tcc_add_library_internal(TCCState *s, const char *fmt,
if (tcc_add_file_internal(s, buf, flags | AFF_TYPE_BIN) == 0)
return 0;
}
- if (rpath) {
- snprintf(buf, sizeof(buf), fmt, rpath, filename);
- if (tcc_add_file_internal(s, buf, flags | AFF_TYPE_BIN) == 0)
- return 0;
- }
return -1;
}
@@ -1157,7 +1152,7 @@ static int tcc_add_library_internal(TCCState *s, const char *fmt,
ST_FUNC int tcc_add_dll(TCCState *s, const char *filename, int flags)
{
return tcc_add_library_internal(s, "%s/%s", filename, flags,
- s->library_paths, s->nb_library_paths, s->rpath);
+ s->library_paths, s->nb_library_paths);
}
#endif
@@ -1165,7 +1160,7 @@ ST_FUNC int tcc_add_dll(TCCState *s, const char *filename, int flags)
ST_FUNC int tcc_add_crt(TCCState *s1, const char *filename)
{
if (-1 == tcc_add_library_internal(s1, "%s/%s",
- filename, 0, s1->crt_paths, s1->nb_crt_paths, NULL))
+ filename, 0, s1->crt_paths, s1->nb_crt_paths))
tcc_error_noabort("file '%s' not found", filename);
return 0;
}
@@ -1190,7 +1185,7 @@ LIBTCCAPI int tcc_add_library(TCCState *s, const char *libraryname)
int flags = s->filetype & AFF_WHOLE_ARCHIVE;
while (*pp) {
if (0 == tcc_add_library_internal(s, *pp,
- libraryname, flags, s->library_paths, s->nb_library_paths, NULL))
+ libraryname, flags, s->library_paths, s->nb_library_paths))
return 0;
++pp;
}