Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2024 12:26:32 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 8164d511d6a6 - main - libc/tests: Fix installation without MK_TOOLCHAIN
Message-ID:  <202405281226.44SCQW8o037951@gitrepo.freebsd.org>

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

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

commit 8164d511d6a6053df82911e7d4ebb34fff3d765c
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-05-28 12:24:43 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-05-28 12:24:43 +0000

    libc/tests: Fix installation without MK_TOOLCHAIN
    
    There is some exotic conditional logic here to avoid building a
    particular test if a certain UBSAN library isn't present in the
    toolchain sysroot.  This causes build failures for me when doing an
    "installworld WITHOUT_TOOLCHAIN=", which I do frequently during tests.
    
    I believe the problem is that SYSROOT is unset during installworld, so
    the build sees the host's copy of libclang_rt.ubsan_standalone.a and
    then tries to install a binary that wasn't built during buildworld.  Try
    to make the check a bit less fragile.
    
    Reviewed by:    dim
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D45035
---
 lib/libc/tests/ssp/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libc/tests/ssp/Makefile b/lib/libc/tests/ssp/Makefile
index 22f48d7dfe54..2907d1a621bf 100644
--- a/lib/libc/tests/ssp/Makefile
+++ b/lib/libc/tests/ssp/Makefile
@@ -30,7 +30,7 @@ PROGS+=		h_memset
 # now on amd64 when it trips the stack bounds specified in t_ssp.sh . This
 # probably needs to be fixed as it's currently hardcoded.
 .if ${COMPILER_TYPE} == "clang" && !defined(_SKIP_BUILD) && \
-    (!defined(_RECURSING_PROGS) || ${PROG} == "h_raw")
+    (!defined(_RECURSING_PROGS) || ${PROG} == "h_raw") && ${MK_TOOLCHAIN} == "yes"
 .include "${SRCTOP}/lib/libclang_rt/compiler-rt-vars.mk"
 _libclang_rt_ubsan=	${SYSROOT}${SANITIZER_LIBDIR}/libclang_rt.ubsan_standalone-${CRTARCH}.a
 .if exists(${_libclang_rt_ubsan})



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