249249 "-inline auto" ,
250250]
251251
252+ cflags_msl_gc13_runtime = [
253+ * cflags_base ,
254+ "-use_lmw_stmw on" ,
255+ "-str reuse,pool,readonly" ,
256+ "-common off" ,
257+ "-inline deferred,auto" ,
258+ "-char signed" ,
259+ "-lang=c" ,
260+ ]
261+
262+ cflags_msl_runtime_c = [
263+ * cflags_base ,
264+ "-use_lmw_stmw on" ,
265+ "-str reuse,pool,readonly" ,
266+ "-common off" ,
267+ "-inline deferred,auto" ,
268+ "-fp_contract off" ,
269+ "-char signed" ,
270+ "-lang=c" ,
271+ ]
272+
273+ cflags_msl_runtime_cpp = [
274+ * cflags_runtime ,
275+ "-lang=c++" ,
276+ ]
277+
252278# dolphin library flags
253279cflags_dolphin = [
254280 * cflags_base ,
@@ -841,66 +867,96 @@ def MatchingFor(*versions):
841867 "Runtime.PPCEABI.H" ,
842868 [],
843869 [
844- Object (NonMatching , "Runtime/__mem.c" , extra_cflags = [ "-inline on, deferred" ] ),
870+ Object (Matching , "Runtime/__mem.c" ),
845871 Object (Matching , "Runtime/__va_arg.c" ),
846- Object (NonMatching , "Runtime/global_destructor_chain.c" ),
847- Object (NonMatching , "Runtime/New.cp" ),
848- Object (NonMatching , "Runtime/NMWException.cp" ),
872+ Object (Matching , "Runtime/global_destructor_chain.c" ),
873+ Object (
874+ Matching ,
875+ "Runtime/New.cp" ,
876+ mw_version = "GC/2.6" ,
877+ cflags = [
878+ flag
879+ for flag in cflags_runtime
880+ if flag not in ("-RTTI off" , "-Cpp_exceptions off" , "-inline auto" , "-str reuse,pool,readonly" )
881+ ]
882+ + ["-Cpp_exceptions on" , "-RTTI on" , "-inline auto,deferred" , "-str reuse,nopool,readonly" ],
883+ ),
884+ Object (
885+ Matching ,
886+ "Runtime/NMWException.cp" ,
887+ mw_version = "GC/2.0p1" ,
888+ cflags = [
889+ flag
890+ for flag in cflags_runtime
891+ if flag not in ("-RTTI off" , "-Cpp_exceptions off" )
892+ ]
893+ + ["-Cpp_exceptions on" , "-RTTI on" , "-inline auto,deferred" ],
894+ ),
849895 Object (Matching , "Runtime/CPlusLibPPC.cp" ),
850- Object (NonMatching , "Runtime/ptmf.c" ),
851- Object (NonMatching , "Runtime/runtime.c" ),
852- Object (NonMatching , "Runtime/__init_cpp_exceptions.cpp" ),
853- Object (NonMatching , "Runtime/Gecko_ExceptionPPC.cp" ),
854- Object (NonMatching , "Runtime/GCN_mem_alloc.c" ),
896+ Object (Matching , "Runtime/ptmf.c" ),
897+ Object (Matching , "Runtime/runtime.c" ),
898+ Object (Matching , "Runtime/__init_cpp_exceptions.cpp" ),
899+ Object (
900+ Matching ,
901+ "Runtime/Gecko_ExceptionPPC.cp" ,
902+ cflags = [
903+ flag
904+ for flag in cflags_runtime
905+ if flag not in ("-RTTI off" , "-Cpp_exceptions off" , "-str reuse,pool,readonly" )
906+ ]
907+ + ["-Cpp_exceptions on" , "-RTTI on" , "-str reuse,nopool,readonly" ],
908+ extab_padding = [0x02 , 0x55 ],
909+ ),
910+ Object (Matching , "Runtime/GCN_mem_alloc.c" , extra_cflags = ["-str reuse,nopool,readonly" ]),
855911 ]
856912 ),
857913 mslLib (
858914 "MSL_C.PPCEABI.H" ,
859915 ["-str pool" , "-opt level=0, peephole, schedule, nospace" , "-inline off" , "-sym on" ],
860916 [
861- Object (NonMatching , "MSL_C/PPC_EABI/abort_exit.c" ),
862- Object (NonMatching , "MSL_C/MSL_Common/alloc.c" ),
863- Object (NonMatching , "MSL_C/MSL_Common/ansi_files.c" ),
864- Object (NonMatching , "MSL_C/MSL_Common_Embedded/ansi_fp.c" ),
865- Object (NonMatching , "MSL_C/MSL_Common/arith.c" ),
866- Object (NonMatching , "MSL_C/MSL_Common/bsearch.c" ),
867- Object (NonMatching , "MSL_C/MSL_Common/buffer_io.c" ),
917+ Object (Matching , "MSL_C/PPC_EABI/abort_exit.c" , cflags = cflags_runtime ),
918+ Object (Matching , "MSL_C/MSL_Common/alloc.c" , cflags = cflags_msl_runtime_c ),
919+ Object (Matching , "MSL_C/MSL_Common/ansi_files.c" , mw_version = "GC/1.3" , cflags = cflags_msl_gc13_runtime ),
920+ Object (Matching , "MSL_C/MSL_Common_Embedded/ansi_fp.c" , cflags = cflags_msl_runtime_c ),
921+ Object (Matching , "MSL_C/MSL_Common/arith.c" , cflags = cflags_runtime ),
922+ Object (Matching , "MSL_C/MSL_Common/bsearch.c" ),
923+ Object (Matching , "MSL_C/MSL_Common/buffer_io.c" , cflags = cflags_runtime ),
868924 Object (Matching , "MSL_C/PPC_EABI/critical_regions.gamecube.c" ),
869- Object (NonMatching , "MSL_C/MSL_Common/ctype.c" ),
870- Object (NonMatching , "MSL_C/MSL_Common/direct_io.c" ),
925+ Object (Matching , "MSL_C/MSL_Common/ctype.c" , cflags = cflags_runtime ),
926+ Object (Matching , "MSL_C/MSL_Common/direct_io.c" , cflags = cflags_runtime ),
871927 Object (Matching , "MSL_C/MSL_Common/errno.c" ),
872- Object (NonMatching , "MSL_C/MSL_Common/file_io.c" ),
873- Object (NonMatching , "MSL_C/MSL_Common/FILE_POS.C" ),
874- Object (NonMatching , "MSL_C/MSL_Common/locale.c" ),
875- Object (NonMatching , "MSL_C/MSL_Common/mbstring.c" ),
876- Object (NonMatching , "MSL_C/MSL_Common/mem.c" ),
877- Object (NonMatching , "MSL_C/MSL_Common/mem_funcs.c" ),
878- Object (NonMatching , "MSL_C/MSL_Common/misc_io.c" ),
879- Object (NonMatching , "MSL_C/MSL_Common/printf.c" ),
880- Object (NonMatching , "MSL_C/MSL_Common/qsort.c" ),
881- Object (NonMatching , "MSL_C/MSL_Common/rand.c" ),
882- Object (NonMatching , "MSL_C/MSL_Common/scanf.c" ),
883- Object (NonMatching , "MSL_C/MSL_Common/signal.c" ),
884- Object (NonMatching , "MSL_C/MSL_Common/string.c" ),
885- Object (NonMatching , "MSL_C/MSL_Common/strtold.c" ),
886- Object (NonMatching , "MSL_C/MSL_Common/strtoul.c" ),
887- Object (NonMatching , "MSL_C/MSL_Common/float.c" ),
888- Object (NonMatching , "MSL_C/MSL_Common/char_io.c" ),
889- Object (NonMatching , "MSL_C/MSL_Common/wchar_io.c" ),
890- Object (NonMatching , "MSL_C/MSL_Common_Embedded/uart_console_io_gcn.c" )
928+ Object (Matching , "MSL_C/MSL_Common/file_io.c" , cflags = cflags_msl_runtime_c + [ "-D_MSL_WIDE_CHAR" ] ),
929+ Object (Matching , "MSL_C/MSL_Common/FILE_POS.C" , cflags = cflags_msl_runtime_cpp ),
930+ Object (Matching , "MSL_C/MSL_Common/locale.c" ),
931+ Object (Matching , "MSL_C/MSL_Common/mbstring.c" , mw_version = "GC/1.3" , cflags = cflags_msl_gc13_runtime ),
932+ Object (Matching , "MSL_C/MSL_Common/mem.c" , mw_version = "GC/1.3" , cflags = cflags_msl_gc13_runtime ),
933+ Object (Matching , "MSL_C/MSL_Common/mem_funcs.c" , cflags = cflags_runtime ),
934+ Object (Matching , "MSL_C/MSL_Common/misc_io.c" , cflags = cflags_runtime ),
935+ Object (Matching , "MSL_C/MSL_Common/printf.c" , mw_version = "GC/2.0p1" , cflags = cflags_msl_runtime_c ),
936+ Object (Matching , "MSL_C/MSL_Common/qsort.c" , cflags = cflags_msl_runtime_c ),
937+ Object (Matching , "MSL_C/MSL_Common/rand.c" , cflags = cflags_runtime ),
938+ Object (Matching , "MSL_C/MSL_Common/scanf.c" , cflags = cflags_runtime + [ "-inline deferred" ] ),
939+ Object (Matching , "MSL_C/MSL_Common/signal.c" , cflags = cflags_msl_gc13_runtime ),
940+ Object (Matching , "MSL_C/MSL_Common/string.c" , cflags = cflags_runtime ),
941+ Object (Matching , "MSL_C/MSL_Common/strtold.c" , cflags = cflags_msl_runtime_c ),
942+ Object (Matching , "MSL_C/MSL_Common/strtoul.c" , cflags = cflags_runtime ),
943+ Object (Matching , "MSL_C/MSL_Common/float.c" ),
944+ Object (Matching , "MSL_C/MSL_Common/char_io.c" , cflags = cflags_runtime ),
945+ Object (Matching , "MSL_C/MSL_Common/wchar_io.c" , cflags = cflags_runtime ),
946+ Object (Matching , "MSL_C/MSL_Common_Embedded/uart_console_io_gcn.c" , cflags = cflags_runtime )
891947 ]
892948 ),
893949 mslLib (
894950 "fdlibm.PPCEABI.H" ,
895951 [],
896952 [
897- Object (NonMatching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c" ),
898- Object (NonMatching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c" ),
953+ Object (Matching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c" ),
954+ Object (Matching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c" ),
899955 Object (Matching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c" ),
900956 Object (Matching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_exp.c" ),
901957 Object (Matching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_fmod.c" ),
902958 Object (Matching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_log.c" ),
903- Object (NonMatching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c" ),
959+ Object (Matching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c" ),
904960 Object (Matching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_rem_pio2.c" ),
905961 Object (Matching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/k_cos.c" ),
906962 Object (Matching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/k_rem_pio2.c" ),
@@ -923,52 +979,57 @@ def MatchingFor(*versions):
923979 Object (Matching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/w_fmod.c" ),
924980 Object (Matching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/w_log.c" ),
925981 Object (Matching , "MSL_C/MSL_Common_Embedded/Math/Double_precision/w_pow.c" ),
926- Object (NonMatching , "MSL_C/PPC_EABI/math_ppc.c" ),
982+ Object (Matching , "MSL_C/PPC_EABI/math_ppc.c" ),
927983 ]
928984 ),
929985 trkLib (
930986 "TRK_MINNOW_DOLPHIN" ,
931987 [
932- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/mainloop.c" ),
933- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/nubevent.c" ),
934- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/nubassrt.c" ),
935- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/nubinit.c" ),
936- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/msg.c" ),
937- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/msgbuf.c" ),
938- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/serpoll.c" ),
939- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/dispatch.c" ),
940- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/msghndlr.c" ),
941- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/support.c" ),
988+ Object (Matching , "debugger/embedded/MetroTRK/Portable/mainloop.c" ),
989+ Object (Matching , "debugger/embedded/MetroTRK/Portable/nubevent.c" ),
990+ Object (Matching , "debugger/embedded/MetroTRK/Portable/nubassrt.c" ),
991+ Object (Matching , "debugger/embedded/MetroTRK/Portable/nubinit.c" , extra_cflags = [ "-sdata 0" , "-sdata2 0" ] ),
992+ Object (Matching , "debugger/embedded/MetroTRK/Portable/msg.c" , mw_version = "GC/1.3" , cflags = cflags_trk ),
993+ Object (Matching , "debugger/embedded/MetroTRK/Portable/msgbuf.c" , mw_version = "GC/1.3" , cflags = cflags_trk ),
994+ Object (Matching , "debugger/embedded/MetroTRK/Portable/serpoll.c" , extra_cflags = [ "-sdata 0" , "-sdata2 0" ] ),
995+ Object (Matching , "debugger/embedded/MetroTRK/Portable/dispatch.c" , extra_cflags = [ "-sdata 0" , "-sdata2 0" ] ),
996+ Object (Matching , "debugger/embedded/MetroTRK/Portable/msghndlr.c" , mw_version = "GC/2.6" , cflags = cflags_trk ),
997+ Object (Matching , "debugger/embedded/MetroTRK/Portable/support.c" ),
942998 Object (Matching , "debugger/embedded/MetroTRK/Portable/mutex_TRK.c" ),
943- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/notify.c" ),
944- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/main_TRK.c" ),
945- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/mem_TRK.c" ),
946- Object (NonMatching , "debugger/embedded/MetroTRK/Portable/string_TRK.c" ),
999+ Object (Matching , "debugger/embedded/MetroTRK/Portable/notify.c" ),
1000+ Object (Matching , "debugger/embedded/MetroTRK/Portable/main_TRK.c" , extra_cflags = [ "-sdata 0" , "-sdata2 0" ] ),
1001+ Object (Matching , "debugger/embedded/MetroTRK/Portable/mem_TRK.c" ),
1002+ Object (Matching , "debugger/embedded/MetroTRK/Portable/string_TRK.c" ),
9471003 Object (Matching , "debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c" ),
948- Object (NonMatching , "debugger/embedded/MetroTRK/Processor/ppc/Generic/__exception.s" ),
949- Object (NonMatching , "debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c" ),
1004+ Object (Matching , "debugger/embedded/MetroTRK/Processor/ppc/Generic/__exception.s" ),
1005+ Object (Matching , "debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c" , mw_version = "GC/2.6" , cflags = [ * cflags_trk , "-gccinc" , "-common off" ] ),
9501006 Object (Matching , "debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s" ),
9511007 Object (Matching , "debugger/embedded/MetroTRK/Processor/ppc/Generic/mpc_7xx_603e.c" ),
952- Object (NonMatching , "debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c" ),
953- Object (NonMatching , "debugger/embedded/MetroTRK/Os/dolphin/usr_put.c" ),
954- Object (NonMatching , "debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c" ),
1008+ Object (Matching , "debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c" , mw_version = "GC/2.6" , cflags = cflags_trk ),
1009+ Object (Matching , "debugger/embedded/MetroTRK/Os/dolphin/usr_put.c" ),
1010+ Object (Matching , "debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c" , mw_version = "GC/2.6" , cflags = cflags_trk ),
9551011 Object (Matching , "debugger/embedded/MetroTRK/Os/dolphin/targcont.c" ),
956- Object (NonMatching , "debugger/embedded/MetroTRK/Os/dolphin/target_options.c" ),
957- Object (NonMatching , "debugger/embedded/MetroTRK/Os/dolphin/UDP_Stubs.c" ),
958- Object (NonMatching , "debugger/embedded/MetroTRK/Export/mslsupp.c" ),
1012+ Object (Matching , "debugger/embedded/MetroTRK/Os/dolphin/target_options.c" , extra_cflags = ["-sdata 0" , "-sdata2 0" ]),
1013+ Object (Matching , "debugger/embedded/MetroTRK/Os/dolphin/UDP_Stubs.c" ),
1014+ Object (
1015+ Matching ,
1016+ "debugger/embedded/MetroTRK/Export/mslsupp.c" ,
1017+ mw_version = "GC/2.6" ,
1018+ cflags = cflags_trk ,
1019+ ),
9591020
960- Object (NonMatching , "gamedev/cust_connection/cc/exi2/GCN/EXI2_DDH_GCN/main.c" ),
961- Object (NonMatching , "gamedev/cust_connection/utils/common/CircleBuffer.c" ),
962- Object (NonMatching , "gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c" ),
963- Object (NonMatching , "gamedev/cust_connection/utils/common/MWTrace.c" ),
964- Object (NonMatching , "gamedev/cust_connection/utils/gc/MWCriticalSection_gc.cpp" ),
1021+ Object (Matching , "gamedev/cust_connection/cc/exi2/GCN/EXI2_DDH_GCN/main.c" ),
1022+ Object (Matching , "gamedev/cust_connection/utils/common/CircleBuffer.c" ),
1023+ Object (Matching , "gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c" ),
1024+ Object (Matching , "gamedev/cust_connection/utils/common/MWTrace.c" ),
1025+ Object (Matching , "gamedev/cust_connection/utils/gc/MWCriticalSection_gc.cpp" ),
9651026 ]
9661027 ),
9671028 mslLib (
9681029 "MSL_C.PPCEABI.bare.H" ,
9691030 [],
9701031 [
971- Object (NonMatching , "MSL_C/MSL_Common/extras.c" )
1032+ Object (Matching , "MSL_C/MSL_Common/extras.c" )
9721033 ]
9731034 ),
9741035 RenderWareLib (
0 commit comments