diff options
author | midipix <writeonce@midipix.org> | 2016-04-28 00:00:58 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-04-28 00:00:58 -0400 |
commit | bfa8ca5c298987a72a421b04d93d434300aeb222 (patch) | |
tree | fc10ed1f19675d84a7246cd6ce544cff581610fa | |
parent | b1778b44ef9fab09c4b3b69b363501857ef88b05 (diff) | |
download | slibtool-bfa8ca5c298987a72a421b04d93d434300aeb222.tar.bz2 slibtool-bfa8ca5c298987a72a421b04d93d434300aeb222.tar.xz |
driver: added -shrext support.
-rw-r--r-- | include/slibtool/slibtool.h | 1 | ||||
-rw-r--r-- | src/driver/slbt_driver_ctx.c | 11 | ||||
-rw-r--r-- | src/internal/slibtool_driver_impl.h | 1 | ||||
-rw-r--r-- | src/skin/slbt_skin_default.c | 7 |
4 files changed, 20 insertions, 0 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h index cd61300..3268a3e 100644 --- a/include/slibtool/slibtool.h +++ b/include/slibtool/slibtool.h @@ -187,6 +187,7 @@ struct slbt_common_ctx { enum slbt_warning_level warnings; const char * target; const char * output; + const char * shrext; char * libname; const char * rpath; const char * release; diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c index e97130f..4815d34 100644 --- a/src/driver/slbt_driver_ctx.c +++ b/src/driver/slbt_driver_ctx.c @@ -258,6 +258,10 @@ static int slbt_split_argv( *targv++ = argv[i++]; *targv++ = argv[i]; + } else if (!(strcmp("shrext",&argv[i][1]))) { + *targv++ = argv[i++]; + *targv++ = argv[i]; + } else if (!(strcmp("rpath",&argv[i][1]))) { *targv++ = argv[i++]; *targv++ = argv[i]; @@ -518,6 +522,9 @@ static void slbt_init_flavor_settings( } memcpy(psettings,settings,sizeof(*settings)); + + if (cctx->shrext) + psettings->dsosuffix = cctx->shrext; } static int slbt_init_version_info( @@ -832,6 +839,10 @@ int slbt_get_driver_ctx( cctx.output = entry->arg; break; + case TAG_SHREXT: + cctx.shrext = entry->arg; + break; + case TAG_RPATH: cctx.rpath = entry->arg; break; diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h index 1bd7ce7..09c1f10 100644 --- a/src/internal/slibtool_driver_impl.h +++ b/src/internal/slibtool_driver_impl.h @@ -35,6 +35,7 @@ enum app_tags { TAG_OUTPUT, TAG_BINDIR, TAG_LDRPATH, + TAG_SHREXT, TAG_RPATH, TAG_RELEASE, TAG_EXPSYM_FILE, diff --git a/src/skin/slbt_skin_default.c b/src/skin/slbt_skin_default.c index e0c4886..74d668b 100644 --- a/src/skin/slbt_skin_default.c +++ b/src/skin/slbt_skin_default.c @@ -99,6 +99,13 @@ const struct argv_option slbt_default_options[] = { "PE shared libraries. Not needed, ignored for " "compatibility"}, + {"shrext", 0,TAG_SHREXT,ARGV_OPTARG_REQUIRED, + ARGV_OPTION_HYBRID_ONLY|ARGV_OPTION_HYBRID_SPACE,0,0, + "shared library extention, including the dot, that " + "should override the default for the target system. " + "regardless of build target and type (native/cross), " + "you should never need to use this option."}, + {"rpath", 0,TAG_RPATH,ARGV_OPTARG_REQUIRED, ARGV_OPTION_HYBRID_ONLY|ARGV_OPTION_HYBRID_SPACE,0,0, "where a library should eventually be " |