forked from Bananymous/banan-os
BuildSystem: add rule to build libstdc++
We can now build libstdc++ and actually link with g++
This commit is contained in:
parent
9bd4d68f9c
commit
271dd91292
|
@ -54,6 +54,12 @@ add_custom_target(toolchain
|
|||
USES_TERMINAL
|
||||
)
|
||||
|
||||
add_custom_target(libstdc++
|
||||
COMMAND ${CMAKE_COMMAND} -E env LIBSTDCPP="1" ${CMAKE_SOURCE_DIR}/toolchain/build.sh
|
||||
DEPENDS libc-install
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
add_custom_target(image
|
||||
COMMAND ${CMAKE_COMMAND} -E env SYSROOT="${BANAN_SYSROOT}" DISK_IMAGE_PATH="${DISK_IMAGE_PATH}" ${CMAKE_SOURCE_DIR}/image.sh
|
||||
DEPENDS kernel-install
|
||||
|
|
|
@ -6,6 +6,13 @@ GCC_VERSION="gcc-12.2.0"
|
|||
|
||||
cd $(dirname "$0")
|
||||
|
||||
if [[ -n $LIBSTDCPP ]]; then
|
||||
cd build/${GCC_VERSION}/
|
||||
make -j $(nproc) all-target-libstdc++-v3
|
||||
make install-target-libstdc++-v3
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -z $SYSROOT ]]; then
|
||||
echo "You must set the SYSROOT environment variable" >&2
|
||||
exit 1
|
||||
|
|
|
@ -17,7 +17,6 @@ add_custom_target(userspace)
|
|||
add_custom_target(userspace-install DEPENDS userspace)
|
||||
|
||||
foreach(USERSPACE_PROJECT ${USERSPACE_PROJECTS})
|
||||
target_link_options(${USERSPACE_PROJECT} PUBLIC -nodefaultlibs)
|
||||
add_dependencies(userspace ${USERSPACE_PROJECT})
|
||||
add_dependencies(userspace-install ${USERSPACE_PROJECT}-install)
|
||||
endforeach()
|
||||
|
|
Loading…
Reference in New Issue