pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/compiler Emit a warning when PKGSRC_MKPIE==yes but ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e296f0b1eb8c
branches:  trunk
changeset: 372097:e296f0b1eb8c
user:      pho <pho%pkgsrc.org@localhost>
date:      Wed Jan 19 16:06:43 2022 +0000

description:
Emit a warning when PKGSRC_MKPIE==yes but PKGSRC_COMPILER==clang

Prior to this change PKGSRC_MKPIE was silently ignored when clang was chosen for
the compiler, i.e. executables were never built as PIE. This became an error
after introducing a post-build check for it.

Of course we should add a MKPIE support for clang, but for now we just emit a
warning. Otherwise we cannot build packages such as devel/gnustep-base which
requires clang to build.

diffstat:

 mk/compiler/clang.mk |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 16470ae8d34d -r e296f0b1eb8c mk/compiler/clang.mk
--- a/mk/compiler/clang.mk      Wed Jan 19 15:40:55 2022 +0000
+++ b/mk/compiler/clang.mk      Wed Jan 19 16:06:43 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: clang.mk,v 1.32 2021/12/19 11:55:29 nia Exp $
+# $NetBSD: clang.mk,v 1.33 2022/01/19 16:06:43 pho Exp $
 #
 # This is the compiler definition for the clang compiler.
 #
@@ -114,4 +114,9 @@
 _CXX_STD_FLAG.${_version_}?=   -std=${_version_}
 .endfor
 
+.if ${_PKGSRC_MKPIE} == "yes"
+WARNINGS+=             "[clang.mk] PKGSRC_MKPIE is currently not supported for clang"
+CHECK_PIE_SUPPORTED=   no
+.endif
+
 .endif # COMPILER_CLANG_MK



Home | Main Index | Thread Index | Old Index