fxsdk: disable -ffreestanding, keep only -fno-builtin

We don't need -ffreestanding anymore, and it gets in the way of the more
complex headers in libstdc++. However, due to an LD bug regarding
re-scanning of LTO archives we still have to keep -fno-builtin. This may
be fixed in future binutils versions (I haven't tested in a while).
This commit is contained in:
Lephenixnoir 2024-12-31 16:28:22 +01:00
parent 6d75c3aa82
commit f1721186bb
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495
4 changed files with 4 additions and 4 deletions

View file

@ -16,7 +16,7 @@ set(CMAKE_CXX_COMPILER sh-elf-g++)
set(CMAKE_C_FLAGS_INIT "")
set(CMAKE_CXX_FLAGS_INIT "")
add_compile_options(-mb -ffreestanding -nostdlib -Wa,--dsp)
add_compile_options(-mb -fno-builtin -nostdlib -Wa,--dsp)
add_link_options(-nostdlib -Wl,--no-warn-rwx-segments)
link_libraries(-lgcc)
add_compile_definitions(TARGET_FX9860G)

View file

@ -19,7 +19,7 @@ set(CMAKE_C_FLAGS_INIT "")
set(CMAKE_CXX_FLAGS_INIT "")
# set -DFXCG50 and -DTARGET_FXCG50 to get the CG drivers
add_compile_options(-m4-nofpu -mb -ffreestanding -nostdlib -Wa,--dsp -DFXCG50)
add_compile_options(-m4-nofpu -mb -fno-builtin -nostdlib -Wa,--dsp -DFXCG50)
add_link_options(-nostdlib -Wl,--no-warn-rwx-segments)
link_libraries(-lgcc)
add_compile_definitions(TARGET_FXCG50)

View file

@ -16,7 +16,7 @@ set(CMAKE_CXX_COMPILER sh-elf-g++)
set(CMAKE_C_FLAGS_INIT "")
set(CMAKE_CXX_FLAGS_INIT "")
add_compile_options(-m4-nofpu -mb -ffreestanding -nostdlib -Wa,--dsp)
add_compile_options(-m4-nofpu -mb -fno-builtin -nostdlib -Wa,--dsp)
add_link_options(-nostdlib -Wl,--no-warn-rwx-segments)
link_libraries(-lgcc)
add_compile_definitions(TARGET_FXCG50)

View file

@ -16,7 +16,7 @@ set(CMAKE_CXX_COMPILER sh-elf-g++)
set(CMAKE_C_FLAGS_INIT "")
set(CMAKE_CXX_FLAGS_INIT "")
add_compile_options(-m4-nofpu -mb -ffreestanding -nostdlib -Wa,--dsp)
add_compile_options(-m4-nofpu -mb -fno-builtin -nostdlib -Wa,--dsp)
add_link_options(-nostdlib -Wl,--no-warn-rwx-segments)
link_libraries(-lgcc)
add_compile_definitions(TARGET_FXCP)