feat(userspace/libc): implement functions for porting apps

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
2025-03-24 00:40:07 +00:00
parent 27356b7826
commit 0d8c65e44b
22 changed files with 615 additions and 25 deletions

View File

@@ -2,4 +2,6 @@ cmake_minimum_required(VERSION 3.10)
project(FennixStandardLibraries)
add_subdirectory(libm)
add_subdirectory(librt)
add_subdirectory(libpthread)
add_subdirectory(libstdc++)

View File

@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.10)
project(FennixRealTimeLibrary)
set(SOURCES libpthread.c)
add_library(pthread STATIC ${SOURCES})
add_library(pthread_shared SHARED ${SOURCES})
target_link_options(pthread_shared PRIVATE -nostdlib)
set_target_properties(pthread_shared PROPERTIES OUTPUT_NAME "pthread")
install(TARGETS pthread pthread_shared
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include)

View File

@@ -0,0 +1,18 @@
/*
This file is part of Fennix Userspace.
Fennix Userspace is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
Fennix Userspace is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Fennix Userspace. If not, see <https://www.gnu.org/licenses/>.
*/
/* dummy file */

View File

@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.10)
project(FennixRealTimeLibrary)
set(SOURCES librt.c)
add_library(rt STATIC ${SOURCES})
add_library(rt_shared SHARED ${SOURCES})
target_link_options(rt_shared PRIVATE -nostdlib)
set_target_properties(rt_shared PROPERTIES OUTPUT_NAME "rt")
install(TARGETS rt rt_shared
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include)

View File

@@ -0,0 +1,18 @@
/*
This file is part of Fennix Userspace.
Fennix Userspace is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
Fennix Userspace is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Fennix Userspace. If not, see <https://www.gnu.org/licenses/>.
*/
/* dummy file */