Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Mar 2014 19:26:42 GMT
From:      Linas Valiukas <shirshegsm@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/188095: [patch][maintainer update] games/quake3: fix compiler errors with Clang
Message-ID:  <201403301926.s2UJQgMh073344@cgiserv.freebsd.org>
Resent-Message-ID: <201403301930.s2UJU08J038514@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403301926.s2UJQgMh073344>