Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Feb 2024 09:28:24 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d9c0e2e16660 - main - Revert "Build clang and other llvm executables as PIE"
Message-ID:  <202402120928.41C9SO01073525@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=d9c0e2e16660ecbe33e780821e95508a1d7870b1

commit d9c0e2e16660ecbe33e780821e95508a1d7870b1
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-02-12 09:27:00 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-02-12 09:27:00 +0000

    Revert "Build clang and other llvm executables as PIE"
    
    This reverts commit 470f9f13de10e47e6d45721c15af6b4abe7aad55.
    
    I need more time to figure out how to make this work correctly with
    incremental builds, which it currently miserably fails on.
---
 lib/clang/Makefile.inc     | 6 +-----
 usr.bin/clang/Makefile.inc | 2 ++
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/clang/Makefile.inc b/lib/clang/Makefile.inc
index 5a8ead5292c6..2dfc966726b0 100644
--- a/lib/clang/Makefile.inc
+++ b/lib/clang/Makefile.inc
@@ -2,11 +2,7 @@
 .include <bsd.compiler.mk>
 
 PACKAGE=	clang
-
-# Build only PIE static libraries; bsd.lib.mk does support this directly.
-MK_PIE:=	no
-CFLAGS+=	${PIEFLAG} ${SHARED_CFLAGS}
-CXXFLAGS+=	${PIEFLAG} ${SHARED_CXXFLAGS}
+MK_PIE:=	no	# Explicit libXXX.a references
 
 .if ${COMPILER_TYPE} == "clang"
 DEBUG_FILES_CFLAGS= -gline-tables-only
diff --git a/usr.bin/clang/Makefile.inc b/usr.bin/clang/Makefile.inc
index 8f812e24fcdb..831cd56a8c25 100644
--- a/usr.bin/clang/Makefile.inc
+++ b/usr.bin/clang/Makefile.inc
@@ -3,6 +3,8 @@ WARNS?=		0
 
 .include <bsd.compiler.mk>
 
+MK_PIE:=	no	# Explicit libXXX.a references
+
 .if ${COMPILER_TYPE} == "clang"
 DEBUG_FILES_CFLAGS= -gline-tables-only
 .else



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402120928.41C9SO01073525>