pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/cwrappers cwrappers-20160908: Allow cc -o -.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9d18213550b0
branches:  trunk
changeset: 352518:9d18213550b0
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Sep 15 17:08:14 2016 +0000

description:
cwrappers-20160908: Allow cc -o -.

diffstat:

 pkgtools/cwrappers/Makefile                 |   5 ++---
 pkgtools/cwrappers/files/bin/normalise-cc.c |  14 +++++++++++---
 2 files changed, 13 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r 20a1725b90a8 -r 9d18213550b0 pkgtools/cwrappers/Makefile
--- a/pkgtools/cwrappers/Makefile       Thu Sep 15 17:05:16 2016 +0000
+++ b/pkgtools/cwrappers/Makefile       Thu Sep 15 17:08:14 2016 +0000
@@ -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@localhost
diff -r 20a1725b90a8 -r 9d18213550b0 pkgtools/cwrappers/files/bin/normalise-cc.c
--- a/pkgtools/cwrappers/files/bin/normalise-cc.c       Thu Sep 15 17:05:16 2016 +0000
+++ b/pkgtools/cwrappers/files/bin/normalise-cc.c       Thu Sep 15 17:08:14 2016 +0000
@@ -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@localhost>.
@@ -104,8 +104,16 @@
        }
 
        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 ||



Home | Main Index | Thread Index | Old Index