diff --git a/src/logic/slbt_exec_compile.c b/src/logic/slbt_exec_compile.c index 8efa777..3ccea3c 100644 --- a/src/logic/slbt_exec_compile.c +++ b/src/logic/slbt_exec_compile.c @@ -165,11 +165,18 @@ int slbt_exec_compile( ectx->argv = ectx->cargv; /* -fpic */ - fpic = *ectx->fpic; - - if ((cctx->tag == SLBT_TAG_CC) || (cctx->tag == SLBT_TAG_CXX)) - if (cctx->settings.picswitch) - fpic = cctx->settings.picswitch; + switch (cctx->tag) { + case SLBT_TAG_CC: + case SLBT_TAG_CXX: + case SLBT_TAG_F77: + fpic = cctx->settings.picswitch + ? cctx->settings.picswitch + : *ectx->fpic; + break; + + default: + fpic = *ectx->fpic; + } /* shared library object */ if (cctx->drvflags & SLBT_DRIVER_SHARED) {