update vxSDK integration

This commit is contained in:
Yann MAGNIN 2023-01-08 13:11:13 +01:00 committed by Lephenixnoir
parent 465655674b
commit c85182d07e
Signed by untrusted user: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
4 changed files with 25 additions and 13 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
/prefix
*.txt
!CMakeLists.txt
.vxsdk/
# GiteaPC config files
giteapc-config.make

View File

@ -15,7 +15,9 @@ if(FXLIBC_TARGET STREQUAL vhex-sh)
list(APPEND TARGET_FOLDERS vhex sh-generic)
set(FXLIBC_ARCH sh)
add_definitions(-D__SUPPORT_VHEX_KERNEL)
set(CMAKE_INSTALL_PREFIX "${FXSDK_COMPILER_INSTALL}" CACHE PATH "..." FORCE)
set(CMAKE_INSTALL_PREFIX "${VXSDK_COMPILER_INSTALL}" CACHE PATH "..." FORCE)
set(INCDIR "${VXSDK_COMPILER_INSTALL}/include")
set(LIBDIR "${VXSDK_COMPILER_INSTALL}/lib")
endif()
if(FXLIBC_TARGET STREQUAL gint)

View File

@ -12,16 +12,13 @@ set(CMAKE_CXX_FLAGS_INIT "")
add_compile_options(-nostdlib)
add_link_options(-nostdlib)
link_libraries(-lgcc)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
# Determine compiler install path
execute_process(
COMMAND ${CMAKE_C_COMPILER} --print-file-name=.
OUTPUT_VARIABLE FXSDK_COMPILER_INSTALL
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT DEFINED ENV{VXSDK_COMPILER_SYSROOT})
message(FATAL_ERROR "You should use the vxSDK to build this project")
endif()
set(VXSDK_COMPILER_INSTALL $ENV{VXSDK_COMPILER_SYSROOT})

View File

@ -1,14 +1,26 @@
[project]
name = 'fxlibc'
version = '1.4.1'
type = 'app'
target = [
'superh'
]
[build]
configure = 'cmake -DFXLIBC_PIC=1 -DFXLIBC_TARGET=vhex-sh -B build-vhex -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-vhex.cmake'
build = 'make -C build-vhex'
install = 'make -C build-vhex install'
[superh.build]
configure = """ \
cmake \
-B build-vhex \
-DFXLIBC_PIC=1 \
-DFXLIBC_TARGET=vhex-sh \
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-vhex.cmake
"""
build = 'cmake --build build-vhex'
install = 'cmake --install build-vhex'
uninstall = """ \
if [ -e build-vhex/install_manifest.txt ]; then \
xargs rm -f < build-vhex/install_manifest.txt; \
fi \
"""
[superh.dependencies]
vxOpenLibm = 'master@superh'
sh-elf-vhex = 'master@superh'