From 341c87f49428983b953dc88c2b64648cfd10c319 Mon Sep 17 00:00:00 2001 From: midipix Date: Mar 11 2016 08:17:30 +0000 Subject: compatible semantics (must see with your own eyes) of -shared and -static. --- 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