summaryrefslogtreecommitdiff
path: root/src/logic/slbt_exec_compile.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-07-11 06:18:35 +0000
committermidipix <writeonce@midipix.org>2018-07-11 02:30:33 -0400
commit11e2771a23a1f20df8d6a371c3c889b174609576 (patch)
tree2b7b57e6f6f24b1c3fa104db51b90c92794ad8fd /src/logic/slbt_exec_compile.c
parent46aa6f554c0f2ef1affa5ae292fffec6907ff4b3 (diff)
downloadslibtool-11e2771a23a1f20df8d6a371c3c889b174609576.tar.bz2
slibtool-11e2771a23a1f20df8d6a371c3c889b174609576.tar.xz
compile & link modes: accommodate conceptually challenged, PICky targets.
Diffstat (limited to 'src/logic/slbt_exec_compile.c')
-rw-r--r--src/logic/slbt_exec_compile.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/logic/slbt_exec_compile.c b/src/logic/slbt_exec_compile.c
index 9e4e7a1..f3d3b48 100644
--- a/src/logic/slbt_exec_compile.c
+++ b/src/logic/slbt_exec_compile.c
@@ -66,10 +66,12 @@ int slbt_exec_compile(
/* shared library object */
if (dctx->cctx->drvflags & SLBT_DRIVER_SHARED) {
- if (!(dctx->cctx->drvflags & SLBT_DRIVER_ANTI_PIC)) {
+ if (!(dctx->cctx->drvflags & SLBT_DRIVER_ANTI_PIC))
*ectx->dpic = "-DPIC";
- *ectx->fpic = "-fPIC";
- }
+
+ if (!(dctx->cctx->drvflags & SLBT_DRIVER_ANTI_PIC))
+ if (dctx->cctx->settings.picswitch)
+ *ectx->fpic = dctx->cctx->settings.picswitch;
*ectx->lout[0] = "-o";
*ectx->lout[1] = ectx->lobjname;
@@ -91,10 +93,12 @@ int slbt_exec_compile(
if (dctx->cctx->drvflags & SLBT_DRIVER_STATIC) {
slbt_reset_placeholders(ectx);
- if (dctx->cctx->drvflags & SLBT_DRIVER_PRO_PIC) {
+ if (dctx->cctx->drvflags & SLBT_DRIVER_PRO_PIC)
*ectx->dpic = "-DPIC";
- *ectx->fpic = "-fPIC";
- }
+
+ if (dctx->cctx->drvflags & SLBT_DRIVER_PRO_PIC)
+ if (dctx->cctx->settings.picswitch)
+ *ectx->fpic = dctx->cctx->settings.picswitch;
*ectx->lout[0] = "-o";
*ectx->lout[1] = ectx->aobjname;