Fix: Link missing newlib syscall stubs for c+fail target

This commit is contained in:
2026-07-26 13:33:40 +02:00
parent 9baf6605ed
commit a6e68ef800
+7 -5
View File
@@ -192,6 +192,7 @@ sub build {
compile_c_module( $module, $bd, $target ); compile_c_module( $module, $bd, $target );
compile_c_host( $module, $bd, $target ); compile_c_host( $module, $bd, $target );
compile_startup( $module, $bd, $target ); compile_startup( $module, $bd, $target );
compile_syscalls( $module, $bd, $target );
link_c( $module, $bd, $target ); link_c( $module, $bd, $target );
} }
else { else {
@@ -463,11 +464,12 @@ sub link_c {
Util::module_is_tacle($module) ? glob("$bd/tacle_*.o") : (); Util::module_is_tacle($module) ? glob("$bd/tacle_*.o") : ();
if ( $target eq 'fail' ) { if ( $target eq 'fail' ) {
Util::run( Util::run(
$cross_cc, '-Wl,-T', $cross_cc, '-Wl,-T',
'targets/linker.ld', "$bd/c_host.o", 'targets/linker.ld', "$bd/c_host.o",
"$bd/startup.o", "$bd/c_module.o", "$bd/startup.o", "$bd/syscalls.o",
@tacle_objs, @cross_ldflags_nowasm, "$bd/c_module.o", @tacle_objs,
'-o', "$bd/system.elf" @cross_ldflags_nowasm, '-o',
"$bd/system.elf"
); );
} }
elsif ( $target eq 'linux' ) { elsif ( $target eq 'linux' ) {