Bug 232016 - games/nxengine: fix build with powerpc64
Summary: games/nxengine: fix build with powerpc64
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Nikolai Lifanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-06 19:16 UTC by Piotr Kubaj
Modified: 2019-04-18 11:02 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (lifanov)


Attachments
patch (341 bytes, patch)
2018-10-06 19:16 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2018-10-06 19:16:20 UTC
Created attachment 197851 [details]
patch

Building this port on powerpc64 currently fails with:
/tmp/usr/local/poudriere/ports/default/games/nxengine/work/nxengine-evo-2.6.3/src/player.cpp:763:53: error: narrowing conversion of '-1' from 'int' to 'char' i
nside { } [-Wnarrowing]
    { LEFTKEY, RIGHTKEY, UPKEY, JUMPKEY, FIREKEY, -1 };
                                                     ^

Fix this by adding -Wno-error=narrowing to CXXFLAGS for powerpc64.

Hardware sponsored by IntegriCloud.
Comment 1 Nikolai Lifanov freebsd_committer freebsd_triage 2018-10-15 00:02:32 UTC
I don't have powerpc64 hardware to test on, but the fix seems reasonable.
I'm going to commit it as-is.
Comment 2 Nikolai Lifanov freebsd_committer freebsd_triage 2018-10-15 00:05:39 UTC
Actually, I'm going to appy the same fix for everything.
aarch64, armv6, and armv7 are broken in the same way.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-10-15 00:13:27 UTC
A commit references this bug:

Author: lifanov
Date: Mon Oct 15 00:13:06 UTC 2018
New revision: 482126
URL: https://svnweb.freebsd.org/changeset/ports/482126

Log:
  unbreak games/nxengine on powerpc64 and others

  PR:		232016
  Submitted by:	Piotr Kubaj

Changes:
  head/games/nxengine/Makefile
Comment 4 Nikolai Lifanov freebsd_committer freebsd_triage 2018-10-15 00:13:27 UTC
I made the CXXFLAGS addition global to also unbreak arm platforms.
Comment 5 Nikolai Lifanov freebsd_committer freebsd_triage 2018-10-15 00:13:47 UTC
Committed, thanks!
Comment 6 Piotr Kubaj freebsd_committer freebsd_triage 2018-12-27 09:50:22 UTC
Could you replace -Wno-error-narrowing with -Wno-error=narrowing? The former is not supported by GCC, the latter is supported by both Clang and GCC.