Skip to content
Snippets Groups Projects
Commit c27c3ad8 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix win32 builds, symbols need to be mangled appropriately.

Note, the CI job is needs to be updated with AS=mingw32-as... need
to find where that lives.
parent 9593cd5e
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4223 failed
...@@ -71,7 +71,7 @@ $(EXEODIR)$(DIRSEP)genmap$(EXEFILE): $(EXEODIR) ...@@ -71,7 +71,7 @@ $(EXEODIR)$(DIRSEP)genmap$(EXEFILE): $(EXEODIR)
rgbmap.s: $(EXEODIR)$(DIRSEP)genmap$(EXEFILE) rgbmap.s: $(EXEODIR)$(DIRSEP)genmap$(EXEFILE)
@echo Creating $@... @echo Creating $@...
$(QUIET)$(EXEODIR)$(DIRSEP)genmap$(EXEFILE) $(QUIET)$(EXEODIR)$(DIRSEP)genmap$(EXEFILE) $(os)
rgbmap.h: rgbmap.s rgbmap.h: rgbmap.s
......
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <inttypes.h> #include <inttypes.h>
uint32_t r2y[16777216]; uint32_t r2y[16777216];
uint32_t y2r[16777216]; uint32_t y2r[16777216];
...@@ -58,20 +60,21 @@ main(int argc, char **argv) ...@@ -58,20 +60,21 @@ main(int argc, char **argv)
FILE *h = fopen("rgbmap.h", "w"); FILE *h = fopen("rgbmap.h", "w");
FILE *r = fopen("r2y.bin", "wb"); FILE *r = fopen("r2y.bin", "wb");
FILE *y = fopen("y2r.bin", "wb"); FILE *y = fopen("y2r.bin", "wb");
char *mangle = "";
init_r2y(); init_r2y();
if (argc > 1 && strcmp(argv[1], "win32") == 0)
mangle = "_";
fprintf(s, fprintf(s,
".section .rodata\n" ".section .rodata\n"
".global r2y\n" ".global %sr2y\n"
".type r2y, @object\n" ".global %sy2r\n"
".align 4\n" ".align 4\n"
"r2y:\n" "%sr2y:\n"
" .incbin \"r2y.bin\"\n" " .incbin \"r2y.bin\"\n"
".global y2r\n" "%sy2r:\n"
".type y2r, @object\n" " .incbin \"y2r.bin\"\n", mangle, mangle, mangle, mangle);
".align 4\n"
"y2r:\n"
" .incbin \"y2r.bin\"\n");
fprintf(h, fprintf(h,
"#ifndef RGBMAP_H\n" "#ifndef RGBMAP_H\n"
"#define RGBMAP_H\n" "#define RGBMAP_H\n"
......
...@@ -46,7 +46,7 @@ with the following command: ...@@ -46,7 +46,7 @@ with the following command:
hdiutil convert ~/Desktop/SyncTERM.dmg -format UDRO -o /Volumes/Synchronet/sbbs/web/root/syncterm.bbsdev.net/SyncTERM.dmg -ov hdiutil convert ~/Desktop/SyncTERM.dmg -format UDRO -o /Volumes/Synchronet/sbbs/web/root/syncterm.bbsdev.net/SyncTERM.dmg -ov
Release builds for Win32 using MinGW32 use the following command line: Release builds for Win32 using MinGW32 use the following command line:
gmake CC=mingw32-gcc VERBOSE=please AR=mingw32-ar RANLIB=mingw32-ranlib RELEASE=1 CXX=mingw32-g++ WINDRES=mingw32-windres gmake CC=mingw32-gcc VERBOSE=please AR=mingw32-ar AS=mingw32-as RANLIB=mingw32-ranlib RELEASE=1 CXX=mingw32-g++ WINDRES=mingw32-windres
Release builds of jsdoor (not related at all) Release builds of jsdoor (not related at all)
gmake jsdoor NO_LD_RUN_PATH=dumbass CC=mingw32-gcc VERBOSE=please AR=mingw32-ar RANLIB=mingw32-ranlib RELEASE=1 CXX=mingw32-g++ WINDRES=mingw32-windres JSLIBDIR=../../3rdp/win32.release/mozjs/bin/ JSINCLUDE=../../3rdp/win32.release/mozjs/include/ JSLIB=mozjs gmake jsdoor NO_LD_RUN_PATH=dumbass CC=mingw32-gcc VERBOSE=please AR=mingw32-ar AS=mingw32-as RANLIB=mingw32-ranlib RELEASE=1 CXX=mingw32-g++ WINDRES=mingw32-windres JSLIBDIR=../../3rdp/win32.release/mozjs/bin/ JSINCLUDE=../../3rdp/win32.release/mozjs/include/ JSLIB=mozjs
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment