Open VyrCossont opened 1 year ago
To repro:
Samples/HelloWorld
hello.c
hello.cpp
CMakeLists.txt
// hello.cpp #include <stdio.h> #include <stdexcept> int main(int argc, char** argv) { printf("Hello, world.\n"); try { throw std::runtime_error("boom!"); } catch (std::runtime_error &e) { printf("Exception caught: %s", e.what()); } printf("\n(Press Return)\n"); getchar(); return 0; }
App works normally when compiled for the host (gcc -o hello hello.cpp -lc++ && ./hello) or when built with Retro68's PPC target. App also works normally if -Wl,--gc-sections is removed from the 68k linker flags in HelloWorld's CMakeLists.txt.
gcc -o hello hello.cpp -lc++ && ./hello
-Wl,--gc-sections
HelloWorld
I'm not sure if this is related to #184, since -ffunction-sections is already present in CMakeLists.txt.
-ffunction-sections
To repro:
Samples/HelloWorld
projecthello.c
file withhello.cpp
belowhello.c
withhello.cpp
inCMakeLists.txt
App works normally when compiled for the host (
gcc -o hello hello.cpp -lc++ && ./hello
) or when built with Retro68's PPC target. App also works normally if-Wl,--gc-sections
is removed from the 68k linker flags inHelloWorld
'sCMakeLists.txt
.