From eed78085bc12890ee93343fc0da9d49102687725 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Tue, 8 Sep 2015 02:58:03 +0000 Subject: [PATCH] Merge compat-from-mingw-w64 into compat-to-msvc since we dropped support for mainline MinGW32, and add dll_dependency.S so we don't need to build the libs with "-fno-stack-check -fno-stack-protector -mno-stack-arg-probe". git-svn-id: https://svn.eduke32.com/eduke32@5341 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/Makefile | 2 +- polymer/eduke32/Makefile.msvc | 2 +- .../Windows/lib/32/libcompat-from-mingw-w64.a | Bin 830 -> 0 bytes .../Windows/lib/32/libcompat-to-msvc.a | Bin 9600 -> 10592 bytes .../Windows/lib/64/libcompat-from-mingw-w64.a | Bin 880 -> 0 bytes .../Windows/lib/64/libcompat-to-msvc.a | Bin 1960 -> 3758 bytes .../src/compat-from-mingw-w64/Makefile | 18 ---- .../src/compat-from-mingw-w64/vsnprintf.c | 13 --- .../Windows/src/compat-to-msvc/Makefile | 12 ++- .../src/compat-to-msvc/dll_dependency.S | 88 ++++++++++++++++++ .../Windows/src/compat-to-msvc/vsnprintf.c | 19 ++++ 11 files changed, 117 insertions(+), 37 deletions(-) delete mode 100644 polymer/eduke32/platform/Windows/lib/32/libcompat-from-mingw-w64.a delete mode 100644 polymer/eduke32/platform/Windows/lib/64/libcompat-from-mingw-w64.a delete mode 100644 polymer/eduke32/platform/Windows/src/compat-from-mingw-w64/Makefile delete mode 100644 polymer/eduke32/platform/Windows/src/compat-from-mingw-w64/vsnprintf.c create mode 100644 polymer/eduke32/platform/Windows/src/compat-to-msvc/dll_dependency.S create mode 100644 polymer/eduke32/platform/Windows/src/compat-to-msvc/vsnprintf.c diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index 4b0d53805..7c215564e 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -319,7 +319,7 @@ ifeq ($(PLATFORM),DARWIN) endif ifeq ($(PLATFORM),WINDOWS) - LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lcompat-from-mingw-w64 + LIBS += -lFLAC -lvorbisfile -lvorbis -logg LIBDIRS += -L$(AUDIOLIB_ROOT)/third-party/Windows/lib$(WINLIB) DUKE3D_OBJS+= gameres winbits startwin.game DUKE3D_EDITOR_OBJS+= buildres diff --git a/polymer/eduke32/Makefile.msvc b/polymer/eduke32/Makefile.msvc index 6eeaa53a5..0771121b4 100644 --- a/polymer/eduke32/Makefile.msvc +++ b/polymer/eduke32/Makefile.msvc @@ -98,7 +98,7 @@ ENET_CFLAGS=/I$(ENET_INC) /I$(ENET_SRC) AUDIOLIB_CFLAGS=/I$(AUDIOLIB_INC) /I$(AUDIOLIB_SRC) LIBS=user32.lib gdi32.lib shell32.lib winmm.lib ws2_32.lib comctl32.lib shlwapi.lib oleaut32.lib ole32.lib imm32.lib version.lib \ - libogg.a libvorbis.a libvorbisfile.a libvpx.a libpng_mini.a libz_mini.a libcompat-from-mingw-w64.a \ + libogg.a libvorbis.a libvorbisfile.a libvpx.a libpng_mini.a libz_mini.a \ dxguid.lib dsound.lib advapi32.lib libcompat-to-msvc.a !if ("$(RENDERTYPE)"=="SDL") diff --git a/polymer/eduke32/platform/Windows/lib/32/libcompat-from-mingw-w64.a b/polymer/eduke32/platform/Windows/lib/32/libcompat-from-mingw-w64.a deleted file mode 100644 index 3a82a4586a66bd0111c56f38a5cf039df071bc27..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 830 zcmZ`%%}T>S5T0$KmLTe(7paF8JXp|eqDfjsLZJsecqpEQB(13}*jkcUBzW-X(O2+I zd=L*lfX`r^+5VUW^1;l`?0oy}?(FVg_+fA0Xmy^2ae8JnExTb^oa?fb_MD%XOTMQ8 z07JWVU3V0@(`Y;ihvT>pt4KUb`65k2*KOP8+-@`%qMmlm)=(1Q3YE8Iq%si)&#{c> zZU=`iG?R8m(7>VNi90{`YmRT<~q@>%GoD2%$DJrD66atoB8gOLd7dmJQ50wNf={m>r; QkpH>`q~U0S%vA^B4{E+>qyPW_ diff --git a/polymer/eduke32/platform/Windows/lib/32/libcompat-to-msvc.a b/polymer/eduke32/platform/Windows/lib/32/libcompat-to-msvc.a index b585978fb65f972b8c247cefaa2e8f1ba44d695e..e3c6507fbc6035d84af79cc9f16c9761b3fd3a0a 100644 GIT binary patch literal 10592 zcmc&)4RBOdmVW(XNGI9623u{$2A@06*|ZfxH#8v`DRUkhDY_lI@>> zm}PXD#<`VgCROWHSzFf3*3@j3Q?*sNTa?ZCGn-B%36wt}J*%BCK-5}I8$lo=9YM){ z=f3y4J3p?}?o92gdhgwL?m73Kd+xdCyXU=kdqtCP$Ic(+Eth51}RZDJVss zTHLX#y}5M-5t~~(RGQbnQ>)(9)~pi$9`(MKUBns82n91zL554-#g9sb?zzSi9V4}Wgm{luOu z((>7+o@w|wPtG!p)R@=o^)@uOw72YTZrQ!#>5{hPoU*GauoGp@mY%m&Gw03eaFmu} zE>}BOtXA4<%&XDmVCn?nM~emFd%R@Sl>}P$26$Pyv}0zCIzf2Wsyyf7CJ7HVmNYj7 znzHzeC~ZI%e<< z>ILB__=ePRAfH^$#|>=QE@i+ze~!t^eiG9}oh&|964ZEJYEFXEN!2i&raW)64Bpxn6~ z@LWs{gfB-r<;`8F4VL0+jdTc+H~tP4LTErA8rOM3KhX<;NfvvJxG^rP{lrmf$UYb; zSOk07!ac7Md!$D8i1!Ue+=3o$bKN4fi}cP@_8}N4S2xIv@;EWlm@Ics{{*Gy|Ago6 z$dMlqUDp%p({XyopP@;y0eyvg(4#CKI)ffrOpLBRY6fSdW~1Joh&-%^g&klpvtyW$ zA}C{F7sTiaHWD9W$xyGJrQ*}3DG$5%>+)LJ68xwOTxeSEf?UM1PK@f=h!_p(AuY$p zJWP*D3AU#x>}D6JGO)!M9}{1#K__Zs?k)OIukJ21*!icf8d*AuH6oy8Iec8)7-J)m z+BJH#%-a*AYxG?KxfmT-aIS}CBybDxm6}N1H2H~)vnb*&y%IXFhoM}Nf(5Y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1pt~XdUiJW859<4`WQ}FAsV-4*n0)^jBu| z*Z4}B?#i+Rp&4DYp#67n@bfSoPVwZbZo0KXHk~5ISq5A zF}DHq^%hPN??#t2Hrl-Y0RD{l+!l!BpZAM@mg!V_EEe>+rGhvZiL_uo<|ZafXAP|EQ{7ltGd%m~8QQCgv+gq#;Z z38heIa9z+|g6AbreoiOTG(yw`;T4qe6w2#FhJFp6cbBq2k5C{>90^nLS=$%2Q@Wa%6>as3e0{5Co=Rt_FKDC9Ra z*K2LN_BNSk>34Okez2)+U%vWOVF5Mzzn!qB9m<}4DF^AUJDsGfs|(G)7tl%iB0kv> z%>1u-ZQ)6J2z1(UT8(8E?!|MulXTvE-p~K$B;A-?LIADX@p)@YC*P+Qe_TPp_u48MmU z7)QY@noPstBpv{)Qu(apH))m}$8}vHs%3Ab*?ZeYNq`Y5AE+z~GVae~m20<;A&dAe zt&T=PK(i%#?YON*Haj1hpRyB0n;9B;CEnZ?%p!D{teMXD!SUtP=ItVQguMHN%dsY2 zv69ZxQDDgb(QEpR_bnncmR}#rQVLx-*&MVTBPC=-kaavE^kt%7| z9LVcz2QyOQAP2)yA2YJ=CBP$Fcdo04mETKp1_CnaW(?fy55b(JPh(9ody`R|HI`;( zU+4_{zqO2>sPi!Lwwe8)o8*i-LW;JXBqhB#&W>#`sS3tu25MNzkh+~;EEe$V;akXX JJPnMW;s?v$WpDrh diff --git a/polymer/eduke32/platform/Windows/lib/64/libcompat-to-msvc.a b/polymer/eduke32/platform/Windows/lib/64/libcompat-to-msvc.a index 477b7ddd02f2612990d35095655ecf0ca086198b..5428547cca8c20fc722ab0c8187e79f0310e4f13 100644 GIT binary patch literal 3758 zcmcgv&2Jk;6d%V9Ee2s)@zDUHixi|pve#a^*(4~XPJ8GE1t}CzTNTN1>~*tvV_UY9 zCJ~2LK}eB6@*l#HKOi(5IB-He_E2%5MI2DXu>#)j&CYt)>okWDo;0)XYd+q4Gw;p5 zGgod`RzFDRwI~>-X;{|mv}I{pfkok7(+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XcndMn^ z7#SE$CigPOi|SRRB$gzCrND#?kX$qQA-6K84UlyLsIFylD2p;9%jAVD!lL>n2$dj~ z0uYOAUdY18D1pm~n{TmxU<7JE&92PII{7`jGCLbk6Ema0 -#include - -int __cdecl __ms_vsnprintf (char *s,size_t n,const char *format,va_list arg) -{ - return _vsnprintf(s, n, format, arg); -} diff --git a/polymer/eduke32/platform/Windows/src/compat-to-msvc/Makefile b/polymer/eduke32/platform/Windows/src/compat-to-msvc/Makefile index b5023fdd5..6928f9825 100644 --- a/polymer/eduke32/platform/Windows/src/compat-to-msvc/Makefile +++ b/polymer/eduke32/platform/Windows/src/compat-to-msvc/Makefile @@ -7,12 +7,16 @@ NAME:=libcompat-to-msvc %.$o: %.c gcc -Wall -Wextra -O3 -c $< -o $@ -$(NAME).a: dll_math.$o io_math.$o +%.$o: %.S + gcc -c $< -o $@ + +OBJS=dll_math.$o io_math.$o dll_dependency.$o vsnprintf.$o + +.INTERMEDIATE: $(OBJS) + +$(NAME).a: $(OBJS) ar rc $@ $^ ranlib $@ -all : $(NAME).a - @ls -l $^ - clean: -rm -f *.a *.o diff --git a/polymer/eduke32/platform/Windows/src/compat-to-msvc/dll_dependency.S b/polymer/eduke32/platform/Windows/src/compat-to-msvc/dll_dependency.S new file mode 100644 index 000000000..e69f86be6 --- /dev/null +++ b/polymer/eduke32/platform/Windows/src/compat-to-msvc/dll_dependency.S @@ -0,0 +1,88 @@ +/* Implementation for gcc's internal stack-allocation routines. */ +.global ___chkstk +.global __alloca + +.global ___chkstk_ms +___chkstk_ms: +#ifdef _WIN64 + pushq %rax + pushq %rcx + cmpq $0x1000, %rax + leaq 24(%rsp), %rcx + jb .Lchkstk_ms_end +.Lchkstk_ms_loop: + subq $0x1000, %rcx + subq $0x1000, %rax + orq $0x0, (%rcx) + cmpq $0x1000, %rax + ja .Lchkstk_ms_loop +.Lchkstk_ms_end: + subq %rax, %rcx + orq $0x0, (%rcx) + popq %rcx + popq %rax + ret +#else + pushl %eax + pushl %ecx + cmpl $0x1000, %eax + leal 12(%esp), %ecx + jb chkstk_ms_end +chkstk_ms_loop: + subl $0x1000, %ecx + subl $0x1000, %eax + orl $0x0, (%ecx) + cmpl $0x1000, %eax + ja chkstk_ms_loop +chkstk_ms_end: + subl %eax, %ecx + orl $0x0, (%ecx) + popl %ecx + popl %eax + ret +#endif + +#ifdef _WIN64 +__alloca: + movq %rcx, %rax +.align 4 +___chkstk: + popq %r11 + movq %rsp, %r10 + cmpq $0x1000, %rax + jb .Lchkstk_end +.Lchkstk_loop: + subq $0x1000, %r10 + subq $0x1000, %rax + orl $0x0, (%r10) + cmpq $0x1000, %rax + ja .Lchkstk_loop +.Lchkstk_end: + subq %rax, %r10 + movq %rsp, %rax + orl $0x0, (%r10) + movq %r10, %rsp + pushq %r11 + ret +#else +___chkstk: +__alloca: + pushl %ecx + leal 8(%esp), %ecx + cmpl $0x1000, %eax /* > 4k ?*/ + jb chkstk_end +chkstk_loop: + subl $0x1000, %ecx + subl $0x1000, %eax + orl $0x0, (%ecx) + cmpl $0x1000, %eax + ja chkstk_loop +chkstk_end: + subl %eax, %ecx + orl $0x0, (%ecx) + movl %esp, %eax + movl %ecx, %esp + movl (%eax), %ecx + pushl 4(%eax) + ret +#endif diff --git a/polymer/eduke32/platform/Windows/src/compat-to-msvc/vsnprintf.c b/polymer/eduke32/platform/Windows/src/compat-to-msvc/vsnprintf.c new file mode 100644 index 000000000..7992984fc --- /dev/null +++ b/polymer/eduke32/platform/Windows/src/compat-to-msvc/vsnprintf.c @@ -0,0 +1,19 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ +#define __CRT__NO_INLINE +#include +#include + +extern int __cdecl _vsnprintf(char * __restrict__, size_t, const char * __restrict__, va_list); + +int __cdecl __ms_vsnprintf (char * __restrict__ s, size_t n, const char * __restrict__ format, va_list arg) +{ + return _vsnprintf(s, n, format, arg); +} +int __cdecl __mingw_vsnprintf (char * __restrict__ s, size_t n, const char * __restrict__ format, va_list arg) +{ + return _vsnprintf(s, n, format, arg); +}