diff options
author | joerg <joerg@pkgsrc.org> | 2016-09-15 17:08:14 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2016-09-15 17:08:14 +0000 |
commit | a0b5ac934dc6189522a8a2d2c7abdfab08af2218 (patch) | |
tree | b4cdfefcb8ae43740110f8daa73511905131c4a5 /pkgtools | |
parent | dd21b8a413ab75ddcef3745bdf98a56753d4775f (diff) | |
download | pkgsrc-a0b5ac934dc6189522a8a2d2c7abdfab08af2218.tar.gz |
cwrappers-20160908: Allow cc -o -.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/cwrappers/Makefile | 5 | ||||
-rw-r--r-- | pkgtools/cwrappers/files/bin/normalise-cc.c | 14 |
2 files changed, 13 insertions, 6 deletions
diff --git a/pkgtools/cwrappers/Makefile b/pkgtools/cwrappers/Makefile index 45f24564c83..8a65c34948f 100644 --- a/pkgtools/cwrappers/Makefile +++ b/pkgtools/cwrappers/Makefile @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.15 2016/03/14 20:16:08 markd Exp $ +# $NetBSD: Makefile,v 1.16 2016/09/15 17:08:14 joerg Exp $ -PKGNAME= cwrappers-20160110 -PKGREVISION= 1 +PKGNAME= cwrappers-20160908 CATEGORIES= pkgtools sysutils MAINTAINER= joerg@NetBSD.org diff --git a/pkgtools/cwrappers/files/bin/normalise-cc.c b/pkgtools/cwrappers/files/bin/normalise-cc.c index 9bced81ab29..5e69833188b 100644 --- a/pkgtools/cwrappers/files/bin/normalise-cc.c +++ b/pkgtools/cwrappers/files/bin/normalise-cc.c @@ -1,4 +1,4 @@ -/* $NetBSD: normalise-cc.c,v 1.3 2015/07/07 15:00:25 jperkin Exp $ */ +/* $NetBSD: normalise-cc.c,v 1.4 2016/09/15 17:08:14 joerg Exp $ */ /*- * Copyright (c) 2009 Joerg Sonnenberger <joerg@NetBSD.org>. @@ -104,8 +104,16 @@ normalise_cc(struct arglist *args) } TAILQ_FOREACH_SAFE(arg, args, link, arg2) { - if (strcmp(arg->val, "-o") == 0 || - strcmp(arg->val, "-dylib_file") == 0 || + if (strcmp(arg->val, "-o") == 0) { + /* Output to stdout ("-") is explicitly valid. */ + if (arg2 == NULL || + (arg2->val[0] == '-' && arg2->val[1] != '\0')) + errx(255, "Missing argument for %s", arg->val); + arg2 = TAILQ_NEXT(arg2, link); + continue; + } + + if (strcmp(arg->val, "-dylib_file") == 0 || strcmp(arg->val, "-dylib_install_name") == 0 || strcmp(arg->val, "-install_name") == 0 || strcmp(arg->val, "-seg_addr_table_filename") == 0 || |