Thursday, March 09, 2023

Re: Non-standard allocations in games/vkquake

Stuart Henderson <stu@spacehopper.org> wrote:
> On 2023/03/09 07:13, Ali Farzanrad wrote:
> > --- Quake/Makefile.orig
> > +++ Quake/Makefile
> > -@@ -29,7 +29,7 @@ VORBISLIB=vorbis
> > - # Helper functions
> > - # ---------------------------
> > -
> > --check_gcc = $(shell if echo | $(CC) $(1) -Werror -S -o /dev/null -xc - > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;)
> > -+check_gcc = $(shell if echo | $(CC) $(1) -S -o /dev/null -xc - > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;)
> > -
>
> Please leave in the hunk that removes -Werror

That's just a check_gcc, which is used to detect supported compiler
options; without this -Werror, it adds a lot of compiler options which
produces a lot of not supported warnings:

cc: warning: optimization flag '-fweb' is not supported [-Wignored-optimization-argument]
cc: warning: optimization flag '-frename-registers' is not supported [-Wignored-optimization-argument]

> > - # ---------------------------
> > -
> > -@@ -51,7 +51,7 @@ LDFLAGS ?=
> > +@@ -51,15 +51,15 @@ LDFLAGS ?=
> > DFLAGS ?=
> > CFLAGS ?=
> >
> > -CFLAGS += -Wall -Wno-trigraphs -Wno-unused-function -Werror -std=gnu11 -MMD
> > +CFLAGS += -Wall -Wno-trigraphs -Wno-unused-function -std=gnu11 -MMD
> > CFLAGS += $(CPUFLAGS)
> > ++CFLAGS += -DUSE_CRT_MALLOC
> > ifneq ($(DEBUG),0)
> > DFLAGS += -D_DEBUG
> > -@@ -59,7 +59,6 @@ CFLAGS += -g
> > + CFLAGS += -g
> > do_strip=
> > else
> > DFLAGS += -DNDEBUG
> >

No comments:

Post a Comment