From a0cf20ad9171bd0670d81ac842f10064eb7f71c0 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 26 Jan 2024 16:02:51 +0100 Subject: [PATCH] libc++: use build defines and flags similar to upstream. --- lib/libc++/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index a0fe979623b17a..ea93913e358579 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -88,16 +88,21 @@ cxxrt_${_S}: ${_LIBCXXRTDIR}/${_S} .NOMETA .endfor WARNS?= 0 +CFLAGS+= -isystem ${SRCDIR} CFLAGS+= -isystem ${.CURDIR} CFLAGS+= -isystem ${HDRDIR} -CFLAGS+= -isystem ${SRCDIR} CFLAGS+= -isystem ${_LIBCXXRTDIR} CFLAGS+= -nostdinc++ CFLAGS+= -nostdlib CFLAGS+= -D_LIBCPP_BUILDING_LIBRARY +CFLAGS+= -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER +CFLAGS+= -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES CFLAGS+= -DLIBCXXRT -CFLAGS+= -ffunction-sections CFLAGS+= -fdata-sections +CFLAGS+= -ffunction-sections +CFLAGS+= -fno-semantic-interposition +CFLAGS+= -fvisibility-inlines-hidden +CFLAGS+= -fvisibility=hidden CXXSTD?= c++20 LIBADD+= cxxrt