diff --git a/src/Makefile b/src/Makefile index a75fe2656..d188f43b5 100644 --- a/src/Makefile +++ b/src/Makefile @@ -244,9 +244,8 @@ ifdef STATIC libs+=-static endif -ifeq ($(CC),gcc) +ifneq (,$(filter $(CC) $(CXX),gcc g++)) opts+=-mno-ms-bitfields - libs+=-mno-ms-bitfields endif # build with profiling information @@ -279,7 +278,7 @@ opts+=-fsanitize=undefined libs+=-fsanitize=undefined endif -ifeq ($(CC),clang) +ifneq (,$(filter $(CC) $(CXX),clang clang++)) libs+=-fuse-ld=lld endif @@ -290,6 +289,13 @@ opts+=-g libs+=-g endif +ifdef MINGW +# mingw needs this passed AFTER lto and the likes were passed +# otherwise libbacktrace may break +opts+=-g +libs+=-g +endif + # debug_opts also get passed to windres opts+=$(debug_opts) diff --git a/src/p_mobj.c b/src/p_mobj.c index c16d5ce4c..2bd58e8cf 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -11889,7 +11889,7 @@ void P_SpawnHoops(mapthing_t *mthing) z += P_GetSectorFloorZAt(sec, x, y); - hoopcenter->z -= hoopcenter->height/2; + hoopcenter->z = z - hoopcenter->height/2; P_UnsetThingPosition(hoopcenter); hoopcenter->x = x;