Received: by mail.netbsd.org (Postfix, from userid 605) id 85078855C8; Tue, 7 Nov 2017 16:49:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 1145084D3D for ; Tue, 7 Nov 2017 16:49:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 8Q8FFZ3ZZy09 for ; Tue, 7 Nov 2017 16:49:22 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 8D10684C2E for ; Tue, 7 Nov 2017 16:49:22 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 83E34FBDE; Tue, 7 Nov 2017 16:49:22 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1510073362281770" MIME-Version: 1.0 Date: Tue, 7 Nov 2017 16:49:22 +0000 From: "Pierre Pronchery" Subject: CVS commit: pkgsrc/pkgtools/cwrappers/files/bin To: pkgsrc-changes@NetBSD.org Reply-To: khorben@netbsd.org X-Mailer: log_accum Message-Id: <20171107164922.83E34FBDE@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1510073362281770 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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. --_----------=_1510073362281770 Content-Disposition: inline Content-Length: 1916 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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 . @@ -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 . @@ -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; --_----------=_1510073362281770--