diff options
| author | 2026-03-21 08:58:49 +0100 | |
|---|---|---|
| committer | 2026-03-21 08:58:49 +0100 | |
| commit | 3748a221ee50b99b1f1727497b86bbd3c123e5d1 (patch) | |
| tree | 43805bd1fc024b72f08dd63f95ae386bada13aca /src | |
| parent | 8611099d1ef5a6230f6c33d95f1ac3a6cdb83a3c (diff) | |
Tweak configure & driver, fallback to cc
Diffstat (limited to 'src')
| -rw-r--r-- | src/a_main.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/a_main.c b/src/a_main.c index b947d41..8004dd3 100644 --- a/src/a_main.c +++ b/src/a_main.c @@ -474,11 +474,13 @@ findlinkcmd(CmdArgs *cmd) vpush(cmd, HOST_CC); } else { vpush(cmd, HOST_LD); - vpushn(cmd, host_linkcmd, countof(host_linkcmd)); + if (*host_linkcmd) vpushn(cmd, host_linkcmd, countof(host_linkcmd)); if (ccopt.pie) { - vpushn(cmd, host_ldstartfiles_pie, countof(host_ldstartfiles_pie)); + if (*host_ldstartfiles_pie) + vpushn(cmd, host_ldstartfiles_pie, countof(host_ldstartfiles_pie)); } else { - vpushn(cmd, host_ldstartfiles, countof(host_ldstartfiles)); + if (*host_ldstartfiles) + vpushn(cmd, host_ldstartfiles, countof(host_ldstartfiles)); } } } @@ -518,10 +520,13 @@ dolink(void) vpush(&cmd, a); } if (!task.link_with_cc) { - if (ccopt.pie) - vpushn(&cmd, host_ldendfiles_pie, countof(host_ldendfiles_pie)); - else - vpushn(&cmd, host_ldendfiles, countof(host_ldendfiles)); + if (ccopt.pie) { + if (*host_ldstartfiles_pie) + vpushn(&cmd, host_ldendfiles_pie, countof(host_ldendfiles_pie)); + } else { + if (*host_ldendfiles) + vpushn(&cmd, host_ldendfiles, countof(host_ldendfiles)); + } } if (task.verbose) { for (int i = 0; i < cmd.n; ++i) @@ -734,6 +739,7 @@ main(int argc, char **argv) if (getenv("ANTCC_VERBOSE")) { task.verbose = 1; } + task.link_with_cc = HOST_LINK_WITH_CC; /* parse cli ags */ if (argc == 1) { |