add PIC option + vxsdk support

pull/2/head
Yann MAGNIN 1 year ago
parent 71866ed769
commit fa4adc5620

@ -20,16 +20,7 @@ if(FXLIBC_TARGET STREQUAL vhex-sh)
list(APPEND TARGET_FOLDERS vhex-generic sh-generic)
set(FXLIBC_ARCH sh)
add_definitions(-D__SUPPORT_VHEX_KERNEL)
# set(FXLIBC_SHARED ON)
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?
set(CMAKE_INSTALL_PREFIX "${FXSDK_COMPILER_INSTALL}" CACHE PATH "..." FORCE)
endif()
if(FXLIBC_TARGET STREQUAL casiowin-fx)
@ -74,6 +65,10 @@ endif()
# libc.{a,so} libfxlibc.{a,so}
add_compile_options(-Wall -Wextra -std=c11 -ffreestanding -Os)
if(FXLIBC_PIC)
add_compile_options(-fpic)
endif()
if(FXLIBC_ARCH STREQUAL sh)
add_compile_options(
"$<$<COMPILE_LANGUAGE:C>:-m3;-mb>"

@ -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…
Cancel
Save