From a647761da7d67980b53aa0cafe48bdc2af2fd1f9 Mon Sep 17 00:00:00 2001 From: Felix Janda Date: Nov 19 2016 15:17:20 +0000 Subject: link mode: do not respect -disable-static without -rpath. When no -rpath argument is provided we cannot build a dynamic library. To match gnu libtool's behavior, build in this case a static library even if -disable-static has been specified. --- diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c index bce8147..b7c7868 100644 --- a/src/logic/slbt_exec_link.c +++ b/src/logic/slbt_exec_link.c @@ -790,7 +790,8 @@ static int slbt_exec_link_create_archive( /* -disable-static? */ if (dctx->cctx->drvflags & SLBT_DRIVER_DISABLE_STATIC) - return 0; + if (dctx->cctx->rpath) + return 0; /* initial state */ slbt_reset_arguments(ectx);