From 7dc61ac11fc0f1c8b008e1b3f35f271125078887 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Tue, 4 Dec 2018 18:51:28 +0000 Subject: [PATCH] Only gnu/lib/csu when MK_BSD_CRTBEGIN is off. We were still building it from Makefile.inc1. Disable it there so we don't try to build the GNU crtbegin/crtend when the BSD version was asked for. PR: 233733 Reported by: lwhsu Reviewed by: emaste MFC with: r339738 Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D18428 --- Makefile.inc1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index da6aec1e12df..d2f5c411b6f7 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2689,8 +2689,10 @@ _prereq_libs+= gnu/lib/libssp/libssp_nonshared # gnu/lib/csu, gnu/lib/libgcc, lib/csu and lib/libc must be built before # all shared libraries for ELF. # -_startup_libs= gnu/lib/csu -_startup_libs+= lib/csu +_startup_libs= lib/csu +.if ${MK_BSD_CRTBEGIN} == "no" +_startup_libs+= gnu/lib/csu +.endif _startup_libs+= lib/libcompiler_rt _startup_libs+= lib/libc _startup_libs+= lib/libc_nonshared