diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index e566fcf11..2c45457de 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -206,7 +206,7 @@ endif # compiler flags etc. -BASECFLAGS= +BASECFLAGS= -Wno-attributes BASECONLYFLAGS=-Wimplicit -Wdeclaration-after-statement BASECXXFLAGS= -fno-exceptions -fno-rtti -fpermissive BASEASFLAGS=-s #-g diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index e665eaade..8c43ef328 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -415,7 +415,9 @@ EXTERN char show2dwall[(MAXWALLS+7)>>3]; EXTERN char show2dsprite[(MAXSPRITES+7)>>3]; //EXTERN char automapping; -EXTERN char gotpic[(MAXTILES+7)>>3]; +// In the editor, gotpic is only referenced from inline assembly; +// the compiler needs that hint or building with LTO will discard it. +EXTERN char ATTRIBUTE((used)) gotpic[(MAXTILES+7)>>3]; EXTERN char gotsector[(MAXSECTORS+7)>>3]; EXTERN char editorcolors[256];