diff options
author | joerg <joerg@pkgsrc.org> | 2014-12-12 13:30:07 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2014-12-12 13:30:07 +0000 |
commit | 812883d0d2897715d97ee22358ba0f31e962005a (patch) | |
tree | 4f35fc6fe203d1dbfaac5c8fb63f9f22cb63804a /cross/COMMON/buwrapper.c | |
parent | 15632ed1a2996b213fc34f58ed30e60c1246e2be (diff) | |
download | pkgsrc-812883d0d2897715d97ee22358ba0f31e962005a.tar.gz |
Remove cross/COMMON, nothing seems to use it and it hasn't t been
changed in a decade.
Diffstat (limited to 'cross/COMMON/buwrapper.c')
-rw-r--r-- | cross/COMMON/buwrapper.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/cross/COMMON/buwrapper.c b/cross/COMMON/buwrapper.c deleted file mode 100644 index a5e0a7e0ad7..00000000000 --- a/cross/COMMON/buwrapper.c +++ /dev/null @@ -1,50 +0,0 @@ -/* $NetBSD: buwrapper.c,v 1.2 1999/01/04 22:51:53 tv Exp $ */ - -#include <err.h> -#include <stdlib.h> -#include <string.h> -#include <sysexits.h> -#include <unistd.h> - -/* - * Wrapper for binutils programs. - * - * This frontend sets the appropriate environment variables that tell - * binutils programs which target will be used. - */ - -static const char binsubdir[] = "libexec/binutils"; - -#define PATHLEN sizeof(PREFIX) + sizeof(binsubdir) + 20 - -int main(int argc, char **argv) { - char path[PATHLEN], *p, *prog; - - /* quickly find last part of path component */ - if (p = strrchr(argv[0], '/')) - p++; - else - p = argv[0]; - if (prog = strrchr(p, '-')) - prog++; - else - prog = p; - - /* make program pathname */ - snprintf(path, PATHLEN, "%s/%s/%s", PREFIX, binsubdir, prog); - - /* set up environment */ - setenv("GNUTARGET", GNUTARGET, 0); -#ifdef LDEMULATION - setenv("LDEMULATION", LDEMULATION, 0); -#endif -#ifdef LD_RPATH_LINK - setenv("LD_RPATH_LINK", LD_RPATH_LINK, 1); -#endif - - /* run it! */ - execv(path, argv); - - /* we shouldn't get here. */ - err(EX_OSERR, "(buwrapper): exec %s", path); -} |