ports/183074: [patch][maintainer update] games/quake3: fix compiler errors with Clang, new mirrors
Linas Valiukas
shirshegsm at gmail.com
Fri Oct 18 00:20:00 UTC 2013
>Number: 183074
>Category: ports
>Synopsis: [patch][maintainer update] games/quake3: fix compiler errors with Clang, new mirrors
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Fri Oct 18 00:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Linas Valiukas
>Release: 10.0-ALPHA5
>Organization:
>Environment:
FreeBSD freebsd 10.0-ALPHA5 FreeBSD 10.0-ALPHA5 #0 r256092: Mon Oct 7 00:40:42 UTC 2013 root at snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386
>Description:
games/quake3 didn't manage to build on 10.0-ALPHA5 (clang version 3.3 (tags/RELEASE_33/final 183502) 20130610) because:
error: invalid value '6' in '-O6'
gmake[2]: *** [release/client/cl_cgame.o] Error 1
and:
build/release-freebsd-i386/ded/vm_x86.o: In function `AsmCall':
code/qcommon/vm_x86.c:(.text+0x18): undefined reference to `callMask'
The patch fixes that.
Also, more live mirrors added and dead ones removed.
>How-To-Repeat:
1) $ cd games/quake3
2) $ make
3) fail :(
>Fix:
1) apply patch
2) $ cd games/quake3
3) $ make
4) yay!
Patch attached with submission follows:
Index: Makefile
===================================================================
--- Makefile (revision 330700)
+++ Makefile (working copy)
@@ -1,22 +1,20 @@
# Created by: pypt
-# $FreeBSD$
+# $FreeBSD: games/quake3/Makefile 327730 2013-09-20 17:36:33Z bapt $
PORTNAME= quake3
PORTVERSION= 1.32c
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= games
-MASTER_SITES= http://www.proarena.com/p/ftpx/x8524/quake_3_arena/ \
- http://www.planetgargoyle.com/ \
- http://www.teamdarkside.net/ \
- http://0day.icculus.org/mirrors/quake3/ \
- http://www.olpainless.net/files/ \
+MASTER_SITES= ftp://mancubus.net/pub/idgames/idstuff/source/ \
+ http://ftp.mancubus.net/pub/idgames/idstuff/source/ \
+ http://www.gamers.org/pub/idgames/idstuff/source/ \
${MASTER_SITE_IDSOFTWARE:S|$|source/|}
DISTNAME= ${PORTNAME}-${REALVERSION}-source
MAINTAINER= shirshegsm at gmail.com
COMMENT= Quake III Arena -- first person shooter (native build)
-USES= gmake
+USES= ${GMAKE}
ONLY_FOR_ARCHS= i386
ONLY_FOR_ARCHS_REASON= does not run properly; try games/ioquake3
USE_ZIP= yes
Index: files/patch-code-Construct
===================================================================
--- files/patch-code-Construct (revision 0)
+++ files/patch-code-Construct (working copy)
@@ -0,0 +1,11 @@
+--- code/Construct.orig 2013-10-18 02:05:36.000000000 +0300
++++ code/Construct 2013-10-18 02:05:53.000000000 +0300
+@@ -237,7 +237,7 @@
+ }
+ else
+ {
+- $BASE_CFLAGS = $COMMON_CFLAGS . '-DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce ';
++ $BASE_CFLAGS = $COMMON_CFLAGS . '-DNDEBUG -O2 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce ';
+ $BSPC_BASE_CFLAGS = $BASE_CFLAGS . '-DLINUX -DBSPC -Dstricmp=strcasecmp ';
+ }
+
Index: files/patch-code-botlib-linux-i386.mak
===================================================================
--- files/patch-code-botlib-linux-i386.mak (revision 0)
+++ files/patch-code-botlib-linux-i386.mak (working copy)
@@ -0,0 +1,11 @@
+--- code/botlib/linux-i386.mak.orig 2013-10-18 02:02:20.000000000 +0300
++++ code/botlib/linux-i386.mak 2013-10-18 02:02:35.000000000 +0300
+@@ -8,7 +8,7 @@
+ BASE_CFLAGS=-Dstricmp=strcasecmp
+
+ #use these cflags to optimize it
+-CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
++CFLAGS=$(BASE_CFLAGS) -m486 -O2 -ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
+ -malign-jumps=2 -malign-functions=2
+ #use these when debugging
Index: files/patch-code-bspc-Makefile
===================================================================
--- files/patch-code-bspc-Makefile (revision 0)
+++ files/patch-code-bspc-Makefile (working copy)
@@ -0,0 +1,11 @@
+--- code/bspc/Makefile.orig 2013-10-18 02:04:52.000000000 +0300
++++ code/bspc/Makefile 2013-10-18 02:05:03.000000000 +0300
+@@ -12,7 +12,7 @@
+ BASE_CFLAGS=-Dstricmp=strcasecmp
+
+ #use these cflags to optimize it
+-CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
++CFLAGS=$(BASE_CFLAGS) -m486 -O2 -ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
+ -malign-jumps=2 -malign-functions=2 -DLINUX -DBSPC
+ #use these when debugging
Index: files/patch-code-bspc-linux-i386.mak
===================================================================
--- files/patch-code-bspc-linux-i386.mak (revision 0)
+++ files/patch-code-bspc-linux-i386.mak (working copy)
@@ -0,0 +1,11 @@
+--- code/bspc/linux-i386.mak.orig 2013-10-18 02:04:04.000000000 +0300
++++ code/bspc/linux-i386.mak 2013-10-18 02:04:18.000000000 +0300
+@@ -8,7 +8,7 @@
+ BASE_CFLAGS=-Dstricmp=strcasecmp
+
+ #use these cflags to optimize it
+-CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
++CFLAGS=$(BASE_CFLAGS) -m486 -O2 -ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
+ -malign-jumps=2 -malign-functions=2 -DLINUX -DBSPC
+ #use these when debugging
Index: files/patch-code-qcommon-vm_x86.c
===================================================================
--- files/patch-code-qcommon-vm_x86.c (revision 0)
+++ files/patch-code-qcommon-vm_x86.c (working copy)
@@ -0,0 +1,11 @@
+--- code/qcommon/vm_x86.c.orig 2013-10-18 02:26:13.000000000 +0300
++++ code/qcommon/vm_x86.c 2013-10-18 02:26:30.000000000 +0300
+@@ -84,7 +84,7 @@
+ #endif // !_WIN32
+
+
+-static int callMask = 0; // bk001213 - init
++static int __attribute__((used)) callMask = 0; // bk001213 - init
+
+ static int instruction, pass;
+ static int lastConst = 0;
Index: files/patch-code-unix-Makefile
===================================================================
--- files/patch-code-unix-Makefile (revision 330700)
+++ files/patch-code-unix-Makefile (working copy)
@@ -1,5 +1,5 @@
---- code/unix/Makefile.orig Sun Jun 4 18:13:21 2006
-+++ code/unix/Makefile Sun Jun 4 18:14:42 2006
+--- code/unix/Makefile.orig 2013-10-18 02:01:30.000000000 +0300
++++ code/unix/Makefile 2013-10-18 02:07:18.000000000 +0300
@@ -34,7 +34,7 @@
# Build name
@@ -29,12 +29,18 @@
# bk010215 - TODO - add all defaults / kill Ryan
-@@ -136,7 +136,7 @@
+@@ -131,12 +131,12 @@
+ # DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -O
+ ifeq ($(ARCH),axp)
+ CC=pgcc
+- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
++ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O2 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
+ else
ifeq ($(ARCH),ppc)
NEWPGCC=/loki/global/ppc/bin/gcc
CC=$(NEWPGCC)
- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -fomit-frame-pointer -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce
-+ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -fomit-frame-pointer -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
++ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O2 -fomit-frame-pointer -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
else
#NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc # bk001205
#NEWPGCC=/loki/global/x86/bin/gcc
@@ -43,10 +49,10 @@
# NOTE: the -fomit-frame-pointer option leads to an unstable binary on my test box if it was built on the main box
# but building on the Mdk 7.2 baseline seems to work
- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce
-+ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -fomit-frame-pointer -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
++ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O2 -fomit-frame-pointer -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
# TTimo: use this for building on P3 gcc 2.95.3 libc2.2 for all targets (experimental! -fomit-fram-pointer removed)
-# RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce
-+# RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
++# RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O2 -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
endif
endif
@@ -89,9 +95,9 @@
-GL_CFLAGS = -I$(MESADIR)/include -I/usr/X11R6/include
+ifdef OPTIMIZED_CFLAGS
+ ifeq ($(ARCH),i386)
-+RELEASE_CFLAGS+=-O6 -fomit-frame-pointer -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
++RELEASE_CFLAGS+=-O2 -fomit-frame-pointer -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
+ else
-+RELEASE_CFLAGS+=-O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
++RELEASE_CFLAGS+=-O2 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
+ endif
+endif
@@ -230,10 +236,7 @@
$(B)/client/linux_glimp.o \
$(B)/client/linux_snd.o \
+ $(B)/client/linux_signals.o \
- $(B)/client/snd_mixa.o \
-- $(B)/client/matha.o \
-- $(B)/client/ftol.o \
-- $(B)/client/snapvector.o
++ $(B)/client/snd_mixa.o \
+ $(B)/client/matha.o
+
+ Q3POBJ_SMP=\
@@ -242,7 +245,10 @@
+ $(B)/client/linux_glimp_smp.o \
+ $(B)/client/linux_snd.o \
+ $(B)/client/linux_signals.o \
-+ $(B)/client/snd_mixa.o \
+ $(B)/client/snd_mixa.o \
+- $(B)/client/matha.o \
+- $(B)/client/ftol.o \
+- $(B)/client/snapvector.o
+ $(B)/client/matha.o
+
+ ifeq ($(ARCH),i386)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list