summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/helper/slbt_archive_import.c5
-rw-r--r--src/logic/slbt_exec_link.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/src/helper/slbt_archive_import.c b/src/helper/slbt_archive_import.c
index 1c15614..d9dee0e 100644
--- a/src/helper/slbt_archive_import.c
+++ b/src/helper/slbt_archive_import.c
@@ -14,6 +14,7 @@
#include <slibtool/slibtool.h>
#include "slibtool_spawn_impl.h"
+#include "slibtool_readlink_impl.h"
#include "slibtool_errinfo_impl.h"
static char * slbt_mri_argument(
@@ -89,6 +90,10 @@ int slbt_archive_import(
char mrisrc [L_tmpnam];
char program[PATH_MAX];
+ if (!slbt_readlink(srcarchive,program,sizeof(program)))
+ if (!(strcmp(program,"/dev/null")))
+ return 0;
+
if ((size_t)snprintf(program,sizeof(program),"%s",
dctx->cctx->host.ar) >= sizeof(program))
return SLBT_BUFFER_ERROR(dctx);
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 6ce059b..7cbad2e 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -633,6 +633,7 @@ static int slbt_exec_link_create_dep_file(
struct stat st;
int ldepth;
int fdyndep;
+ int fnodeps;
if (ectx->fdeps) {
fclose(ectx->fdeps);
@@ -701,6 +702,7 @@ static int slbt_exec_link_create_dep_file(
fdeps = 0;
fdyndep = !stat(depfile,&st);
+ fnodeps = farchive && fdyndep;
/* [-L... as needed] */
if (fdyndep && (base > *parg) && (ectx->ldirdepth >= 0)) {
@@ -756,7 +758,7 @@ static int slbt_exec_link_create_dep_file(
}
}
- if (farchive || !fdeps) {
+ if (!fnodeps && (farchive || !fdeps)) {
if ((size_t)snprintf(mark,size,".a.slibtool.deps")
>= size)
return SLBT_BUFFER_ERROR(dctx);