Skip to content

Commit 623fc2e

Browse files
committed
Link with gcc
1 parent 0b474c4 commit 623fc2e

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

build-scripts/djgpp-dxe-linker-wrapper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,15 @@ def parse_linker_args(args):
5252
dxe3gen_command = [
5353
wrapper_args.dxe3gen,
5454
"-o", output_path,
55+
"-U",
5556
]
5657
if wrapper_args.import_library:
5758
dxe3gen_command.extend(["-Y", wrapper_args.import_library])
5859
for libpath in wrapper_args.library_paths:
5960
dxe3gen_command.append("-L" + libpath)
6061
dxe3gen_command.extend(original_linker_args)
61-
dxe3gen_command.append("-U")
62+
if not "-nostlib" in original_linker_args:
63+
dxe3gen_command.append("-lgcc")
6264

6365
os.environ["DXE_LD_LIBRARY_PATH"] = "dontcare"
6466
os.environ["DJDIR"] = "dontcare"

include/SDL3/SDL_main_impl.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@
154154
*/
155155
#define FOR_EACH_DXE_EXPORT(X) \
156156
X(__Exit) \
157+
\
157158
X(___deregister_frame_info) \
158-
X(___divdi3) \
159-
X(___divmoddi4) \
159+
\
160160
X(___dj_huge_val) \
161161
X(___dj_stderr) \
162162
X(___dj_stdin) \
@@ -168,10 +168,9 @@
168168
X(___dpmi_simulate_real_mode_procedure_retf) \
169169
X(___fpclassifyd) \
170170
X(___fpclassifyf) \
171+
\
171172
X(___register_frame_info) \
172-
X(___udivdi3) \
173-
X(___udivmoddi4) \
174-
X(___umoddi3) \
173+
\
175174
X(__go32_dpmi_allocate_dos_memory) \
176175
X(__go32_dpmi_chain_protected_mode_interrupt_vector) \
177176
X(__go32_dpmi_free_dos_memory) \
@@ -188,6 +187,7 @@
188187
X(_close) \
189188
X(_closedir) \
190189
X(_delay) \
190+
X(_dlregsym) \
191191
X(_dosmemput) \
192192
X(_environ) \
193193
X(_errno) \

0 commit comments

Comments
 (0)