From e89f127b9eeccb4d1fc468e57a6e1cda2ab636ad Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 19 Jun 2011 13:43:24 +0200 Subject: [PATCH] KernelLd rule: opt-out linking against libsupc++ Introduced HAIKU_NO_LIBSUPC++ variable on target to prevent linking against libsupc++. --- build/jam/KernelRules | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build/jam/KernelRules b/build/jam/KernelRules index f0dba32319..25b2260bf1 100644 --- a/build/jam/KernelRules +++ b/build/jam/KernelRules @@ -44,8 +44,13 @@ rule KernelLd LINKFLAGS on $(1) = $(4) ; if $(3) { LINKFLAGS on $(1) += --script=$(3) ; } - # Remove any preset LINKLIBS, but link against libgcc.a - LINKLIBS on $(1) = $(TARGET_STATIC_LIBSUPC++) $(TARGET_GCC_LIBGCC) ; + # Remove any preset LINKLIBS, but link against libgcc.a. Linking against + # libsupc++ is opt-out. + local libs ; + if ! [ on $(1) return HAIKU_NO_LIBSUPC++ ] { + libs += $(TARGET_STATIC_LIBSUPC++) ; + } + LINKLIBS on $(1) = $(libs) $(TARGET_GCC_LIBGCC) ; # TODO: Do we really want to invoke SetupKernel here? The objects should # have been compiled with KernelObjects anyway, so we're doing that twice.