pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/cwrappers/files/bin



Module Name:    pkgsrc
Committed By:   khorben
Date:           Tue Nov  7 16:50:53 UTC 2017

Modified Files:
        pkgsrc/pkgtools/cwrappers/files/bin: common.c

Log Message:
Tokenize the contents of "append_executable"

This configuration parameter is used when linking executables, through
cc(1) or ld(1) for instance.

This allows passing multiple arguments via the "append_executable"
option, like "-fPIC -pie" for instance.

Committing this before joerg@'s approval since a call for testing
PKGSRC_MKPIE has just been issued, and this helps with some packages.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/pkgtools/cwrappers/files/bin/common.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/cwrappers/files/bin/common.c
diff -u pkgsrc/pkgtools/cwrappers/files/bin/common.c:1.7 pkgsrc/pkgtools/cwrappers/files/bin/common.c:1.8
--- pkgsrc/pkgtools/cwrappers/files/bin/common.c:1.7    Sun Jun 11 19:34:43 2017
+++ pkgsrc/pkgtools/cwrappers/files/bin/common.c        Tue Nov  7 16:50:52 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: common.c,v 1.7 2017/06/11 19:34:43 joerg Exp $ */
+/* $NetBSD: common.c,v 1.8 2017/11/07 16:50:52 khorben Exp $ */
 
 /*-
  * Copyright (c) 2009, 2017 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -275,9 +275,14 @@ parse_config(const char *wrapper)
                        TAILQ_INSERT_TAIL(&prepend_executable_args, arg, link);
                }
                if (strncmp(line, "append_executable=", 18) == 0) {
+                       char *last, *p;
+                       unsigned int i;
                        struct argument *arg;
-                       arg = argument_copy(line + 18);
-                       TAILQ_INSERT_TAIL(&append_executable_args, arg, link);
+                       for (p = strtok_r(line + 18, " ", &last), i = 0; p;
+                                       (p = strtok_r(NULL, " ", &last)), i++) {
+                               arg = argument_copy(p);
+                               TAILQ_INSERT_TAIL(&append_executable_args, arg, link);
+                       }
                }
                if (strncmp(line, "prepend_shared=", 15) == 0) {
                        struct argument *arg;



Home | Main Index | Thread Index | Old Index