Received: by mail.netbsd.org (Postfix, from userid 605) id A364084F20; Sat, 31 Dec 2022 08:35:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id D117E84D8D for ; Sat, 31 Dec 2022 08:35:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id ZfDlaz6xbjcG for ; Sat, 31 Dec 2022 08:35:38 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 3DE4084CE8 for ; Sat, 31 Dec 2022 08:35:38 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 2A5A5FA90; Sat, 31 Dec 2022 08:35:38 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1672475738109730" MIME-Version: 1.0 Date: Sat, 31 Dec 2022 08:35:38 +0000 From: "Thomas Klausner" Subject: CVS commit: pkgsrc/mk/compiler To: pkgsrc-changes@NetBSD.org Reply-To: wiz@netbsd.org X-Mailer: log_accum Message-Id: <20221231083538.2A5A5FA90@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1672475738109730 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: wiz Date: Sat Dec 31 08:35:38 UTC 2022 Modified Files: pkgsrc/mk/compiler: clang.mk gcc.mk Log Message: mk: work around binutils 2.39 problem with relro on NetBSD To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 pkgsrc/mk/compiler/clang.mk cvs rdiff -u -r1.247 -r1.248 pkgsrc/mk/compiler/gcc.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1672475738109730 Content-Disposition: inline Content-Length: 2257 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/mk/compiler/clang.mk diff -u pkgsrc/mk/compiler/clang.mk:1.37 pkgsrc/mk/compiler/clang.mk:1.38 --- pkgsrc/mk/compiler/clang.mk:1.37 Thu Jul 7 17:19:55 2022 +++ pkgsrc/mk/compiler/clang.mk Sat Dec 31 08:35:37 2022 @@ -1,4 +1,4 @@ -# $NetBSD: clang.mk,v 1.37 2022/07/07 17:19:55 jperkin Exp $ +# $NetBSD: clang.mk,v 1.38 2022/12/31 08:35:37 wiz Exp $ # # This is the compiler definition for the clang compiler. # @@ -41,7 +41,7 @@ PKG_CPP:= ${CPPPATH} .if exists(${CCPATH}) CC_VERSION_STRING!= ${CCPATH} -v 2>&1 -CC_VERSION!= ${CCPATH} --version 2>&1 | ${SED} -n "s/^.* version /clang-/p" +CC_VERSION!= ${CCPATH} --version 2>&1 | ${SED} -n "s/^.* version /clang-/p" .else CC_VERSION_STRING?= ${CC_VERSION} CC_VERSION?= clang @@ -62,6 +62,12 @@ _RELRO_LDFLAGS= -Wl,-zrelro -Wl,-znow .else _RELRO_LDFLAGS= -Wl,-zrelro .endif +# XXX Workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014301 +# Set manually the maxpagesize to 4096 which is ok for now since NetBSD only +# supports relro by default on x86 and aarch64 +.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} > 109901 +_RELRO_LDFLAGS+= -Wl,-z,max-page-size=4096 +.endif # The user can choose the level of stack smashing protection. .if ${PKGSRC_USE_SSP} == "all" Index: pkgsrc/mk/compiler/gcc.mk diff -u pkgsrc/mk/compiler/gcc.mk:1.247 pkgsrc/mk/compiler/gcc.mk:1.248 --- pkgsrc/mk/compiler/gcc.mk:1.247 Wed Nov 23 15:44:11 2022 +++ pkgsrc/mk/compiler/gcc.mk Sat Dec 31 08:35:37 2022 @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.247 2022/11/23 15:44:11 jperkin Exp $ +# $NetBSD: gcc.mk,v 1.248 2022/12/31 08:35:37 wiz Exp $ # # This is the compiler definition for the GNU Compiler Collection. # @@ -444,6 +444,12 @@ _RELRO_LDFLAGS= -Wl,-zrelro -Wl,-znow .else _RELRO_LDFLAGS= -Wl,-zrelro .endif +# XXX Workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014301 +# Set manually the maxpagesize to 4096 which is ok for now since NetBSD only +# supports relro by default on x86 and aarch64 +.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} > 109901 +_RELRO_LDFLAGS+= -Wl,-z,max-page-size=4096 +.endif .if !empty(_RELRO_LDFLAGS) && !empty(MACHINE_PLATFORM:MNetBSD-*-*mips*) _RELRO_LDFLAGS+= -Wl,-z,common-page-size=0x10000 --_----------=_1672475738109730--