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:49:22 UTC 2017

Modified Files:
        pkgsrc/pkgtools/cwrappers/files/bin: common.h normalise-ld.c

Log Message:
Teach the wrapper for ld(1) about more cases

Building relocatable and omagic files are now recognized. They were
previously recognized as executables, which may require a different
behaviour in some environments (like when enforcing PIE).

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.h
cvs rdiff -u -r1.3 -r1.4 pkgsrc/pkgtools/cwrappers/files/bin/normalise-ld.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.h
diff -u pkgsrc/pkgtools/cwrappers/files/bin/common.h:1.7 pkgsrc/pkgtools/cwrappers/files/bin/common.h:1.8
--- pkgsrc/pkgtools/cwrappers/files/bin/common.h:1.7    Fri Oct 27 20:59:59 2017
+++ pkgsrc/pkgtools/cwrappers/files/bin/common.h        Tue Nov  7 16:49:22 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: common.h,v 1.7 2017/10/27 20:59:59 khorben Exp $ */
+/* $NetBSD: common.h,v 1.8 2017/11/07 16:49:22 khorben Exp $ */
 
 /*-
  * Copyright (c) 2009, 2017 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -50,6 +50,8 @@ enum operation_mode {
        mode_assemble,
        mode_compile,
        mode_link_executable,
+       mode_link_omagic,
+       mode_link_relocatable,
        mode_link_shared
 };
 extern enum operation_mode current_operation_mode;

Index: pkgsrc/pkgtools/cwrappers/files/bin/normalise-ld.c
diff -u pkgsrc/pkgtools/cwrappers/files/bin/normalise-ld.c:1.3 pkgsrc/pkgtools/cwrappers/files/bin/normalise-ld.c:1.4
--- pkgsrc/pkgtools/cwrappers/files/bin/normalise-ld.c:1.3      Sun Jun 11 19:34:43 2017
+++ pkgsrc/pkgtools/cwrappers/files/bin/normalise-ld.c  Tue Nov  7 16:49:22 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: normalise-ld.c,v 1.3 2017/06/11 19:34:43 joerg Exp $ */
+/* $NetBSD: normalise-ld.c,v 1.4 2017/11/07 16:49:22 khorben Exp $ */
 
 /*-
  * Copyright (c) 2009, 2017 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -44,6 +44,16 @@ operation_mode_ld(struct arglist *args)
        TAILQ_FOREACH(arg, args, link) {
                if (arg->val[0] != '-')
                        continue;
+               if (strcmp(arg->val, "-N") == 0 ||
+                   strcmp(arg->val, "--omagic") == 0) {
+                       current_operation_mode = mode_link_omagic;
+                       continue;
+               }
+               if (strcmp(arg->val, "-r") == 0 ||
+                   strcmp(arg->val, "--relocatable") == 0) {
+                       current_operation_mode = mode_link_relocatable;
+                       continue;
+               }
                if (strcmp(arg->val, "-shared") == 0 ||
                    strcmp(arg->val, "-Bshareable") == 0) {
                        current_operation_mode = mode_link_shared;



Home | Main Index | Thread Index | Old Index