mirror of
https://git.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
synced 2025-04-20 09:57:01 +02:00
add PIC option + vxsdk support
This commit is contained in:
parent
71866ed769
commit
fa4adc5620
2 changed files with 19 additions and 10 deletions
|
@ -20,16 +20,7 @@ if(FXLIBC_TARGET STREQUAL vhex-sh)
|
||||||
list(APPEND TARGET_FOLDERS vhex-generic sh-generic)
|
list(APPEND TARGET_FOLDERS vhex-generic sh-generic)
|
||||||
set(FXLIBC_ARCH sh)
|
set(FXLIBC_ARCH sh)
|
||||||
add_definitions(-D__SUPPORT_VHEX_KERNEL)
|
add_definitions(-D__SUPPORT_VHEX_KERNEL)
|
||||||
# set(FXLIBC_SHARED ON)
|
set(CMAKE_INSTALL_PREFIX "${FXSDK_COMPILER_INSTALL}" CACHE PATH "..." FORCE)
|
||||||
endif()
|
|
||||||
|
|
||||||
if(FXLIBC_TARGET STREQUAL vhex-x86)
|
|
||||||
list(APPEND TARGET_FOLDERS vhex-generic x86-generic)
|
|
||||||
set(FXLIBC_ARCH x86)
|
|
||||||
add_definitions(-D__SUPPORT_VHEX_KERNEL)
|
|
||||||
# set(FXLIBC_SHARED ON)
|
|
||||||
# TODO: Maybe add -nostdinc (but that removes compiler-provided headers like
|
|
||||||
# <stddef.h>), or use another compiler than the system one?
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(FXLIBC_TARGET STREQUAL casiowin-fx)
|
if(FXLIBC_TARGET STREQUAL casiowin-fx)
|
||||||
|
@ -74,6 +65,10 @@ endif()
|
||||||
# libc.{a,so} libfxlibc.{a,so}
|
# libc.{a,so} libfxlibc.{a,so}
|
||||||
|
|
||||||
add_compile_options(-Wall -Wextra -std=c11 -ffreestanding -Os)
|
add_compile_options(-Wall -Wextra -std=c11 -ffreestanding -Os)
|
||||||
|
if(FXLIBC_PIC)
|
||||||
|
add_compile_options(-fpic)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(FXLIBC_ARCH STREQUAL sh)
|
if(FXLIBC_ARCH STREQUAL sh)
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
"$<$<COMPILE_LANGUAGE:C>:-m3;-mb>"
|
"$<$<COMPILE_LANGUAGE:C>:-m3;-mb>"
|
||||||
|
|
14
vxsdk.toml
Normal file
14
vxsdk.toml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[package]
|
||||||
|
name = 'fxlibc'
|
||||||
|
version = '1.3.0'
|
||||||
|
type = 'app'
|
||||||
|
|
||||||
|
[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'
|
||||||
|
uninstall = """ \
|
||||||
|
if [ -e build-vhex/install_manifest.txt ]; then \
|
||||||
|
xargs rm -f < build-vhex/install_manifest.txt; \
|
||||||
|
fi \
|
||||||
|
"""
|
Loading…
Add table
Reference in a new issue