aboutsummaryrefslogtreecommitdiff
path: root/tcc.c
diff options
context:
space:
mode:
authorgrischka <grischka>2016-10-01 20:54:45 +0200
committergrischka <grischka>2016-10-01 20:54:45 +0200
commit0d9f88ea6794edde6c752975be75d3d89c548d53 (patch)
tree2e5e336b52f7adefe7f604f89c89ca48d2fc1246 /tcc.c
parent2f1174550e9b2356b7cebe9346858b1f1155520e (diff)
downloadtinycc-0d9f88ea6794edde6c752975be75d3d89c548d53.tar.gz
tinycc-0d9f88ea6794edde6c752975be75d3d89c548d53.tar.bz2
libtcc: reimplement option -Wl,[-no]-whöle-archive
- taking advantage of previous commit "incremental -Wl parsing"
Diffstat (limited to 'tcc.c')
-rw-r--r--tcc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tcc.c b/tcc.c
index 2bfc672..35680ec 100644
--- a/tcc.c
+++ b/tcc.c
@@ -314,7 +314,8 @@ int main(int argc, char **argv)
/* compile or add each files or library */
for(i = ret = 0; i < s->nb_files && ret == 0; i++) {
struct filespec *f = s->files[i];
- if (f->type == AFF_TYPE_LIB) {
+ if (f->type >= AFF_TYPE_LIB) {
+ s->alacarte_link = f->type == AFF_TYPE_LIB;
if (tcc_add_library_err(s, f->name) < 0)
ret = 1;
} else {
@@ -323,10 +324,11 @@ int main(int argc, char **argv)
s->filetype = f->type;
if (tcc_add_file(s, f->name) < 0)
ret = 1;
- s->filetype = AFF_TYPE_NONE;
if (!first_file)
first_file = f->name;
}
+ s->filetype = AFF_TYPE_NONE;
+ s->alacarte_link = 1;
}
if (0 == ret) {