diff options
author | midipix <writeonce@midipix.org> | 2016-03-11 03:17:30 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-03-11 03:17:30 -0500 |
commit | 341c87f49428983b953dc88c2b64648cfd10c319 (patch) | |
tree | 07b8710e0fbcfa7c706b52e8c62acd947a11426c /src/driver | |
parent | 36de3eaba978eee7d02a104747b6c0f1d1ba2edf (diff) | |
download | slibtool-341c87f49428983b953dc88c2b64648cfd10c319.tar.bz2 slibtool-341c87f49428983b953dc88c2b64648cfd10c319.tar.xz |
compatible semantics (must see with your own eyes) of -shared and -static.
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/slbt_driver_ctx.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c index 74fbd9a..bb9343a 100644 --- a/src/driver/slbt_driver_ctx.c +++ b/src/driver/slbt_driver_ctx.c @@ -242,6 +242,9 @@ int slbt_get_driver_ctx( program = argv_program_name(argv[0]); memset(&cctx,0,sizeof(cctx)); + /* shared and static objects: enable by default, disable by ~switch */ + cctx.drvflags = SLBT_DRIVER_SHARED | SLBT_DRIVER_STATIC; + /* get options, count units */ for (entry=meta->entries; entry->fopt || entry->arg; entry++) { if (entry->fopt) { @@ -338,11 +341,11 @@ int slbt_get_driver_ctx( break; case TAG_SHARED: - cctx.drvflags |= SLBT_DRIVER_SHARED; + cctx.drvflags &= ~(uint64_t)SLBT_DRIVER_STATIC; break; case TAG_STATIC: - cctx.drvflags |= SLBT_DRIVER_STATIC; + cctx.drvflags &= ~(uint64_t)SLBT_DRIVER_SHARED; break; } } else |