diff --git a/AK/Demangle.h b/AK/Demangle.h index bc422f5f6be..722c32b4773 100644 --- a/AK/Demangle.h +++ b/AK/Demangle.h @@ -28,7 +28,7 @@ #include -#ifndef SERENITY_LIBC_BUILD +#ifndef BUILDING_SERENITY_TOOLCHAIN #include #endif @@ -36,7 +36,7 @@ namespace AK { inline String demangle(const StringView& name) { -#ifdef SERENITY_LIBC_BUILD +#ifdef BUILDING_SERENITY_TOOLCHAIN return name; #else int status = 0; diff --git a/Libraries/LibC/Makefile b/Libraries/LibC/Makefile index 067a4d73c64..71acff8ace0 100644 --- a/Libraries/LibC/Makefile +++ b/Libraries/LibC/Makefile @@ -81,7 +81,7 @@ crtn.o: crtin.ao EXTRA_CLEAN = crt0.d crt0.o -DEFINES = -DSERENITY_LIBC_BUILD +DEFINES = -DSERENITY_LIBC_BUILD $(EXTRA_LIBC_DEFINES) LIBRARY = libc.a diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 66b66c76b8a..6eb6c3a4c9f 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -148,7 +148,7 @@ pushd "$DIR/Build/" "$MAKE" install-gcc install-target-libgcc || exit 1 echo "XXX serenity libc and libm" - ( cd "$DIR/../Libraries/LibC/" && "$MAKE" clean && "$MAKE" && "$MAKE" install ) + ( cd "$DIR/../Libraries/LibC/" && "$MAKE" clean && "$MAKE" EXTRA_LIBC_DEFINES="-DBUILDING_SERENITY_TOOLCHAIN" && "$MAKE" install ) ( cd "$DIR/../Libraries/LibM/" && "$MAKE" clean && "$MAKE" && "$MAKE" install ) echo "XXX build libstdc++"