From nobody@FreeBSD.org  Sun Mar 30 19:26:42 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id BB76F96
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 30 Mar 2014 19:26:42 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id A756FB6
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 30 Mar 2014 19:26:42 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s2UJQgVA073348
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 30 Mar 2014 19:26:42 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s2UJQgMh073344;
	Sun, 30 Mar 2014 19:26:42 GMT
	(envelope-from nobody)
Message-Id: <201403301926.s2UJQgMh073344@cgiserv.freebsd.org>
Date: Sun, 30 Mar 2014 19:26:42 GMT
From: Linas Valiukas <shirshegsm@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch][maintainer update] games/quake3: fix compiler errors with Clang
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         188095
>Category:       ports
>Synopsis:       [patch][maintainer update] games/quake3: fix compiler errors with Clang
>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:   Sun Mar 30 19:30:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Linas Valiukas
>Release:        11.0-CURRENT
>Organization:
>Environment:
FreeBSD  11.0-CURRENT FreeBSD 11.0-CURRENT #0 r263665: Sun Mar 23 22:17:29 UTC 2014     root@grind.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
games/quake3 didn't manage to build on 11.0-CURRENT (clang version 3.4 (tags/RELEASE_34/final 197956) 20140216) because:

  cc: error: unknown argument: '-falign-loops=2'
  cc: error: unknown argument: '-falign-jumps=2'

The patch fixes that.
>How-To-Repeat:
1) $ cd games/quake3
2) $ make
3) exit 1 :(
>Fix:
1) apply patch
2) $ cd games/quake3
3) $ make
4) woo!

Patch attached with submission follows:

Index: files/patch-code-unix-Makefile
===================================================================
--- files/patch-code-unix-Makefile	(revision 349667)
+++ files/patch-code-unix-Makefile	(working copy)
@@ -40,7 +40,7 @@
        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 -O2 -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-functions=2 -fno-strict-aliasing -fstrength-reduce
      else
        #NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc # bk001205
        #NEWPGCC=/loki/global/x86/bin/gcc
@@ -49,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 -O2 -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-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 -O2 -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-functions=2 -fno-strict-aliasing -fstrength-reduce
      endif
    endif
  
@@ -95,7 +95,7 @@
 -GL_CFLAGS = -I$(MESADIR)/include -I/usr/X11R6/include
 +ifdef OPTIMIZED_CFLAGS
 +  ifeq ($(ARCH),i386)
-+RELEASE_CFLAGS+=-O2 -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-functions=2 -fno-strict-aliasing -fstrength-reduce
 +  else
 +RELEASE_CFLAGS+=-O2 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
 +  endif


>Release-Note:
>Audit-Trail:
>Unformatted:
