summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-04-04 22:00:37 +0000
committermidipix <writeonce@midipix.org>2021-04-05 04:06:04 +0000
commitd1da94d2d072a0c8b54c0bc256edc133effd9a15 (patch)
tree5dd01953b995c59924bfd0dc4453b081ac2d8ad5
parentc9788a274260102616259a88e8930f6da2ab6514 (diff)
downloadslibtool-d1da94d2d072a0c8b54c0bc256edc133effd9a15.tar.bz2
slibtool-d1da94d2d072a0c8b54c0bc256edc133effd9a15.tar.xz
link mode: require dependency list to be present for all .la input arguments.
-rw-r--r--src/logic/slbt_exec_link.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 29a97d0..97e3276 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -894,7 +894,6 @@ static int slbt_exec_link_create_dep_file(
struct stat st;
int ldepth;
int fdyndep;
- int fnodeps;
struct slbt_map_info * mapinfo;
/* fdcwd */
@@ -971,7 +970,6 @@ static int slbt_exec_link_create_dep_file(
strcpy(mark,dctx->cctx->settings.dsosuffix);
fdyndep = !stat(depfile,&st);
- fnodeps = farchive && fdyndep;
/* [-L... as needed] */
if (fdyndep && (ectx->ldirdepth >= 0)) {
@@ -1041,9 +1039,7 @@ static int slbt_exec_link_create_dep_file(
close(deps);
return SLBT_SYSTEM_ERROR(dctx,0);
}
- }
-
- if (!mapinfo && !fnodeps) {
+ } else {
slen = snprintf(mark,size,
".a.slibtool.deps");
@@ -1057,8 +1053,12 @@ static int slbt_exec_link_create_dep_file(
SLBT_MAP_INPUT);
if (!mapinfo) {
- close(deps);
- return SLBT_SYSTEM_ERROR(dctx,depfile);
+ strcpy(mark,".a.disabled");
+
+ if (fstatat(fdcwd,depfile,&st,AT_SYMLINK_NOFOLLOW)) {
+ close(deps);
+ return SLBT_SYSTEM_ERROR(dctx,depfile);
+ }
}
}