summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-03-19 10:55:22 -0400
committermidipix <writeonce@midipix.org>2016-03-19 10:55:22 -0400
commit9c664df6999ec7a3a4bf3bc544605a40701a487d (patch)
treeb01644a32afe80d7655a710205cac099b9bd9a3e
parenta40c9a61fffde2ef0fed88168ec855177370f7e5 (diff)
downloadslibtool-9c664df6999ec7a3a4bf3bc544605a40701a487d.tar.bz2
slibtool-9c664df6999ec7a3a4bf3bc544605a40701a487d.tar.xz
driver: added -rpath support.
-rw-r--r--include/slibtool/slibtool.h1
-rw-r--r--src/driver/slbt_driver_ctx.c7
-rw-r--r--src/internal/slibtool_driver_impl.h1
-rw-r--r--src/skin/slbt_skin_default.c5
4 files changed, 14 insertions, 0 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h
index 963b9e9..002a278 100644
--- a/include/slibtool/slibtool.h
+++ b/include/slibtool/slibtool.h
@@ -118,6 +118,7 @@ struct slbt_common_ctx {
enum slbt_warning_level warnings;
const char * target;
const char * output;
+ const char * rpath;
char ** targv;
char ** cargv;
};
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 05cf04e..e4d2eda 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -217,6 +217,9 @@ static int slbt_split_argv(
*targv++ = argv[i++];
*targv++ = argv[i++];
+ } else if (!(strcmp("rpath",&argv[i][1]))) {
+ *targv++ = argv[i++];
+ *targv++ = argv[i++];
} else {
for (option=options; option->long_name; option++)
if (!(strcmp(option->long_name,&argv[i][1])))
@@ -517,6 +520,10 @@ int slbt_get_driver_ctx(
cctx.output = entry->arg;
break;
+ case TAG_RPATH:
+ cctx.rpath = entry->arg;
+ break;
+
case TAG_TARGET:
cctx.target = entry->arg;
break;
diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h
index 6dfed2d..0ba0dfc 100644
--- a/src/internal/slibtool_driver_impl.h
+++ b/src/internal/slibtool_driver_impl.h
@@ -32,6 +32,7 @@ enum app_tags {
TAG_RANLIB,
TAG_DLLTOOL,
TAG_OUTPUT,
+ TAG_RPATH,
TAG_NO_SUPPRESS,
TAG_PREFER_PIC,
TAG_PREFER_NON_PIC,
diff --git a/src/skin/slbt_skin_default.c b/src/skin/slbt_skin_default.c
index 564d577..926cc75 100644
--- a/src/skin/slbt_skin_default.c
+++ b/src/skin/slbt_skin_default.c
@@ -81,6 +81,11 @@ const struct argv_option slbt_default_options[] = {
"set an explicit (cross-)target, then pass it to "
"the compiler"},
+ {"rpath", 0,TAG_RPATH,ARGV_OPTARG_REQUIRED,
+ ARGV_OPTION_HYBRID_ONLY|ARGV_OPTION_HYBRID_SPACE,0,0,
+ "where a library should eventually be "
+ "installed, relative to $(DESTDIR)$(PREFIX)"},
+
{"no-suppress", 0,TAG_NO_SUPPRESS,ARGV_OPTARG_NONE,
ARGV_OPTION_HYBRID_ONLY,0,0,
"transparently forward all "