diff options
Diffstat (limited to 'pkgtools/cwrappers')
-rw-r--r-- | pkgtools/cwrappers/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/cwrappers/files/bin/generic-transform-cc.c | 12 | ||||
-rw-r--r-- | pkgtools/cwrappers/files/doc/generic-transform.txt | 14 |
3 files changed, 21 insertions, 9 deletions
diff --git a/pkgtools/cwrappers/Makefile b/pkgtools/cwrappers/Makefile index edb2040ff02..6e66c679a41 100644 --- a/pkgtools/cwrappers/Makefile +++ b/pkgtools/cwrappers/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.6 2014/11/29 22:19:55 joerg Exp $ +# $NetBSD: Makefile,v 1.7 2015/03/15 19:16:45 joerg Exp $ -PKGNAME= cwrappers-20141129 +PKGNAME= cwrappers-20150314 CATEGORIES= pkgtools sysutils MAINTAINER= joerg@NetBSD.org diff --git a/pkgtools/cwrappers/files/bin/generic-transform-cc.c b/pkgtools/cwrappers/files/bin/generic-transform-cc.c index e61bada054d..1452abd8385 100644 --- a/pkgtools/cwrappers/files/bin/generic-transform-cc.c +++ b/pkgtools/cwrappers/files/bin/generic-transform-cc.c @@ -1,4 +1,4 @@ -/* $NetBSD: generic-transform-cc.c,v 1.1 2014/09/17 12:40:56 joerg Exp $ */ +/* $NetBSD: generic-transform-cc.c,v 1.2 2015/03/15 19:16:45 joerg Exp $ */ /*- * Copyright (c) 2009 Joerg Sonnenberger <joerg@NetBSD.org>. @@ -424,7 +424,17 @@ generic_transform_cc(struct arglist *args) if (*path != '/') continue; + while (len > 1 && path[len - 1] == '/') + --len; + TAILQ_FOREACH(rule, ruleset, link) { + if (rule->src[rule->src_len - 1] == '/') { + if (rule->src_len - 1 != len) + continue; + if (memcmp(path, rule->src, len) != 0) + continue; + break; + } if (rule->src_len > len) continue; if (path[rule->src_len] != '\0' && diff --git a/pkgtools/cwrappers/files/doc/generic-transform.txt b/pkgtools/cwrappers/files/doc/generic-transform.txt index 07a9eda632e..97345f3ea49 100644 --- a/pkgtools/cwrappers/files/doc/generic-transform.txt +++ b/pkgtools/cwrappers/files/doc/generic-transform.txt @@ -1,4 +1,4 @@ -$NetBSD: generic-transform.txt,v 1.1 2014/09/17 12:40:56 joerg Exp $ +$NetBSD: generic-transform.txt,v 1.2 2015/03/15 19:16:45 joerg Exp $ The third phase of the wrapper processing is the general transformation phase. This phase is the core of the wrapper framework and implements @@ -16,11 +16,13 @@ rules are matched is unspecified. 3. For the remaining -I, -Wl,-rpath and -L options a corresponding transform rule (transform=I:src:dst, transform=R:src:dst, transform=L:src:dst) rule is searched for, so that the path is equal to -or below src. If this is a -Wl,-rpath option and the path ends in /.libs, -it is assume be to handled by libtool internally and implicitly allowed. -If no such rule is found or dst is empty, the argument is dropped. -Otherwise the src part of the path name is replaced with dst. -No further transformation is done for this argument in this phase. +or below src. Trailing '/' are ignored for this search. If src ends +with a '/', path must be equal to src. If this is a -Wl,-rpath option +and the path ends in /.libs, it is assume be to handled by libtool +internally and implicitly allowed. If no such rule is found or dst is +empty, the argument is dropped. Otherwise the src part of the path name +is replaced with dst. No further transformation is done for this +argument in this phase. 4. libtool/shlibtool wrapper only: For -l options search for the matching libtool archive, e.g. for -ldst |