From 4f2e0702929967bd2c104682f8628a6c2f993183 Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Sat, 29 Aug 2020 14:44:55 +0000 Subject: - Remove -O3 and unsupported -fexpensive-optimizations from CFLAGS - Add -fcommon to unbreak the build against Clang 11 and GCC 10 Reported by: pkg-fallout --- games/qudos/Makefile | 3 --- games/qudos/files/patch-Makefile | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 games/qudos/files/patch-Makefile (limited to 'games') diff --git a/games/qudos/Makefile b/games/qudos/Makefile index eb8f235631e7..3d2b12e0453a 100644 --- a/games/qudos/Makefile +++ b/games/qudos/Makefile @@ -175,9 +175,6 @@ post-patch: # Resolve name collision with jpeg-8 @${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \ ${WRKSRC}/src/ref_gl/gl_image.c -# Remove controversial options unsupported by modern compilers (e.g. Clang) - @${REINPLACE_CMD} -e 's|-falign-loops=2 -falign-jumps=2 ||' \ - ${WRKSRC}/src/ref_gl/Makefile ${WRKSRC}/Makefile post-build: .for bin in ${Q2BIN} diff --git a/games/qudos/files/patch-Makefile b/games/qudos/files/patch-Makefile new file mode 100644 index 000000000000..f6c6589ff280 --- /dev/null +++ b/games/qudos/files/patch-Makefile @@ -0,0 +1,15 @@ +--- Makefile.orig 2006-06-10 16:31:19 UTC ++++ Makefile +@@ -109,10 +109,9 @@ else + ifeq ($(TYPE),profile) + CFLAGS+= -pg + else +-CFLAGS+= -O3 -ffast-math -funroll-loops -fomit-frame-pointer \ +- -fexpensive-optimizations ++CFLAGS+= -fcommon -ffast-math -funroll-loops -fomit-frame-pointer + ifeq ($(ARCH),i386) +-CFLAGS+= -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ ++CFLAGS+= -falign-functions=2 \ + -fno-strict-aliasing + endif + endif -- cgit