Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Mar 2021 21:13:05 +0100
From:      Piotr Kubaj <pkubaj@anongoth.pl>
To:        Guido Falsi <madpilot@freebsd.org>
Cc:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r567405 - in head/games/0ad: . files
Message-ID:  <YEKQ0TthL1os3MGj@KGPE-D16>
In-Reply-To: <202103051851.125IpWM7053002@repo.freebsd.org>
References:  <202103051851.125IpWM7053002@repo.freebsd.org>

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

--J/q1ewrBcv3vYBTm
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 21-03-05 18:51:32, Guido Falsi wrote:
> Author: madpilot
> Date: Fri Mar  5 18:51:31 2021
> New Revision: 567405
> URL: https://svnweb.freebsd.org/changeset/ports/567405
>=20
> Log:
>   - Import patches for powerpc64le
>   - Force the -msse2 option only for i386 where it is actually needed
>  =20
>   PR:		253924
>   Submitted by:	pkubaj@
>=20
> Added:
>   head/games/0ad/files/patch-libraries_source_nvtt_src_src_nvcore_Debug.c=
pp   (contents, props changed)
>   head/games/0ad/files/patch-source_lib_byte__order.h   (contents, props =
changed)
>   head/games/0ad/files/patch-source_lib_sysdep_arch.h   (contents, props =
changed)
>   head/games/0ad/files/patch-source_lib_sysdep_arch_ppc64_ppc64.cpp   (co=
ntents, props changed)
>   head/games/0ad/files/patch-source_ps_GameSetup_HWDetect.cpp   (contents=
, props changed)
> Modified:
>   head/games/0ad/Makefile
>   head/games/0ad/files/patch-build_premake_premake5.lua
>=20
> Modified: head/games/0ad/Makefile
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/games/0ad/Makefile	Fri Mar  5 18:28:34 2021	(r567404)
> +++ head/games/0ad/Makefile	Fri Mar  5 18:51:31 2021	(r567405)
> @@ -45,7 +45,6 @@ WRKSRC=3D		${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha
>  BUILD_WRKSRC=3D	${WRKSRC}/build/workspaces/gcc
>  MAKE_ARGS=3D	config=3Drelease verbose=3D1
>  CPPFLAGS+=3D	-DU_USING_ICU_NAMESPACE=3D1
> -CFLAGS+=3D	-msse2
>  BUNDLE_LIBS=3D	yes
>  DOS2UNIX_REGEX=3D	.*\.([ch]p{0,2}|make)
>  BINARY_ALIAS=3D	python3=3D${PYTHON_CMD}
> @@ -57,6 +56,10 @@ MAKE_ENV+=3D	JOBS=3D${_MAKE_JOBS}
>  PORTDATA=3D	*
> =20
>  .include <bsd.port.pre.mk>
> +
> +.if ${ARCH} =3D=3D i386
> +CFLAGS+=3D	-msse2
> +.endif

Instead of this, you could just set:
CFLAGS_i386=3D	-msse2
right below CPPFLAGS+=3D	-DU_USING_ICU_NAMESPACE=3D1

> =20
>  post-patch:
>  	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
>=20
> Modified: head/games/0ad/files/patch-build_premake_premake5.lua
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/games/0ad/files/patch-build_premake_premake5.lua	Fri Mar  5 18:2=
8:34 2021	(r567404)
> +++ head/games/0ad/files/patch-build_premake_premake5.lua	Fri Mar  5 18:5=
1:31 2021	(r567405)
> @@ -1,5 +1,14 @@
> ---- build/premake/premake5.lua.orig	2021-02-06 00:32:37 UTC
> +--- build/premake/premake5.lua.orig	2021-02-28 23:45:14 UTC
>  +++ build/premake/premake5.lua
> +@@ -87,6 +87,8 @@ else
> + 			arch =3D "aarch64"
> + 		elseif string.find(machine, "e2k") =3D=3D 1 then
> + 			arch =3D "e2k"
> ++		elseif string.find(machine, "ppc64") =3D=3D 1 or string.find(machine,=
 "powerpc64") =3D=3D 1 then
> ++			arch =3D "ppc64"
> + 		else
> + 			print("WARNING: Cannot determine architecture from GCC, assuming x86=
")
> + 		end
>  @@ -365,7 +365,7 @@ function project_set_build_flags()
>  =20
>   		if os.istarget("linux") or os.istarget("bsd") then
> @@ -9,3 +18,12 @@
>   			end
>  =20
>   			-- To use our local shared libraries, they need to be found in the
> +@@ -865,6 +867,8 @@ function setup_all_libs ()
> + 		table.insert(source_dirs, "lib/sysdep/arch/aarch64");
> + 	elseif arch =3D=3D "e2k" then
> + 		table.insert(source_dirs, "lib/sysdep/arch/e2k");
> ++	elseif arch =3D=3D "ppc64" then
> ++		table.insert(source_dirs, "lib/sysdep/arch/ppc64");
> + 	end
> +
> + 	-- OS-specific
>=20
> Added: head/games/0ad/files/patch-libraries_source_nvtt_src_src_nvcore_De=
bug.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/games/0ad/files/patch-libraries_source_nvtt_src_src_nvcore_Debug=
=2Ecpp	Fri Mar  5 18:51:31 2021	(r567405)
> @@ -0,0 +1,12 @@
> +--- libraries/source/nvtt/src/src/nvcore/Debug.cpp.orig	2021-02-28 23:45=
:14 UTC
> ++++ libraries/source/nvtt/src/src/nvcore/Debug.cpp
> +@@ -628,6 +628,9 @@ namespace=20
> + #  elif NV_CPU_X86
> +         ucontext_t * ucp =3D (ucontext_t *)secret;
> +         return (void *)ucp->uc_mcontext.mc_eip;
> ++#  elif NV_CPU_PPC
> ++        ucontext_t * ucp =3D (ucontext_t *)secret;
> ++        return (void *)ucp->uc_mcontext.mc_srr0;
> + #    else
> + #      error "Unknown CPU"
> + #    endif
>=20
> Added: head/games/0ad/files/patch-source_lib_byte__order.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/games/0ad/files/patch-source_lib_byte__order.h	Fri Mar  5 18:51:=
31 2021	(r567405)
> @@ -0,0 +1,11 @@
> +--- source/lib/byte_order.h.orig	2021-02-28 23:45:13 UTC
> ++++ source/lib/byte_order.h
> +@@ -33,7 +33,7 @@
> + #ifndef BYTE_ORDER
> + # define LITTLE_ENDIAN 0x4321
> + # define BIG_ENDIAN    0x1234
> +-# if ARCH_IA32 || ARCH_IA64 || ARCH_AMD64 || ARCH_ALPHA || ARCH_ARM || =
ARCH_AARCH64 || ARCH_MIPS || ARCH_E2K || defined(__LITTLE_ENDIAN__)
> ++# if ARCH_IA32 || ARCH_IA64 || ARCH_AMD64 || ARCH_ALPHA || ARCH_ARM || =
ARCH_AARCH64 || ARCH_MIPS || ARCH_E2K || ARCH_PPC64 || defined(__LITTLE_END=
IAN__)
> + #  define BYTE_ORDER LITTLE_ENDIAN
> + # else
> + #  define BYTE_ORDER BIG_ENDIAN
>=20
> Added: head/games/0ad/files/patch-source_lib_sysdep_arch.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/games/0ad/files/patch-source_lib_sysdep_arch.h	Fri Mar  5 18:51:=
31 2021	(r567405)
> @@ -0,0 +1,18 @@
> +--- source/lib/sysdep/arch.h.orig	2021-02-28 23:45:13 UTC
> ++++ source/lib/sysdep/arch.h
> +@@ -76,9 +76,14 @@
> + #else
> + # define ARCH_E2K 0
> + #endif
> ++#if defined(__PPC64__)
> ++# define ARCH_PPC64 1
> ++#else
> ++# define ARCH_PPC64 0
> ++#endif
> +=20
> + // ensure exactly one architecture has been detected
> +-#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+AR=
CH_MIPS+ARCH_E2K) !=3D 1
> ++#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+AR=
CH_MIPS+ARCH_E2K+ARCH_PPC64) !=3D 1
> + # error "architecture not correctly detected (either none or multiple A=
RCH_* defined)"
> + #endif
> +=20
>=20
> Added: head/games/0ad/files/patch-source_lib_sysdep_arch_ppc64_ppc64.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/games/0ad/files/patch-source_lib_sysdep_arch_ppc64_ppc64.cpp	Fri=
 Mar  5 18:51:31 2021	(r567405)
> @@ -0,0 +1,53 @@
> +--- source/lib/sysdep/arch/ppc64/ppc64.cpp.orig	2021-02-28 23:47:02 UTC
> ++++ source/lib/sysdep/arch/ppc64/ppc64.cpp
> +@@ -0,0 +1,50 @@
> ++/* Copyright (C) 2012 Wildfire Games
> ++ * Copyright (C) 2018 Raptor Engineering, LLC
> ++ *
> ++ * Permission is hereby granted, free of charge, to any person obtaining
> ++ * a copy of this software and associated documentation files (the
> ++ * "Software"), to deal in the Software without restriction, including
> ++ * without limitation the rights to use, copy, modify, merge, publish,
> ++ * distribute, sublicense, and/or sell copies of the Software, and to
> ++ * permit persons to whom the Software is furnished to do so, subject to
> ++ * the following conditions:
> ++ *
> ++ * The above copyright notice and this permission notice shall be inclu=
ded
> ++ * in all copies or substantial portions of the Software.
> ++ *
> ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMEN=
T.
> ++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
> ++ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> ++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> ++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
> ++ */
> ++
> ++/*
> ++ * routines specific to POWER
> ++ */
> ++
> ++#include "precompiled.h"
> ++
> ++#include "lib/sysdep/cpu.h"
> ++
> ++intptr_t cpu_AtomicAdd(volatile intptr_t* location, intptr_t increment)
> ++{
> ++	return __sync_fetch_and_add(location, increment);
> ++}
> ++
> ++bool cpu_CAS(volatile intptr_t* location, intptr_t expected, intptr_t n=
ewValue)
> ++{
> ++	return __sync_bool_compare_and_swap(location, expected, newValue);
> ++}
> ++
> ++bool cpu_CAS64(volatile i64* location, i64 expected, i64 newValue)
> ++{
> ++	return __sync_bool_compare_and_swap(location, expected, newValue);
> ++}
> ++
> ++const char* cpu_IdentifierString()
> ++{
> ++	return "IBM POWER"; // TODO
> ++}
>=20
> Added: head/games/0ad/files/patch-source_ps_GameSetup_HWDetect.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/games/0ad/files/patch-source_ps_GameSetup_HWDetect.cpp	Fri Mar  =
5 18:51:31 2021	(r567405)
> @@ -0,0 +1,10 @@
> +--- source/ps/GameSetup/HWDetect.cpp.orig	2021-02-28 23:45:13 UTC
> ++++ source/ps/GameSetup/HWDetect.cpp
> +@@ -124,6 +124,7 @@ void RunHardwareDetection()
> + 	scriptInterface.SetProperty(settings, "arch_arm", ARCH_ARM);
> + 	scriptInterface.SetProperty(settings, "arch_aarch64", ARCH_AARCH64);
> + 	scriptInterface.SetProperty(settings, "arch_e2k", ARCH_E2K);
> ++	scriptInterface.SetProperty(settings, "arch_ppc64", ARCH_PPC64);
> +=20
> + #ifdef NDEBUG
> + 	scriptInterface.SetProperty(settings, "build_debug", 0);

--J/q1ewrBcv3vYBTm
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEycyIeNkkgohzsoorelmbhSCDnJ0FAmBCkNEACgkQelmbhSCD
nJ11fA//d7yF0vaf5WVM9XnQuA7kMHC5D8ajjICenXVV+2d5DXJe1iw3zOCtLyQy
YnTy2BNOa5tlsQgA+An1T/yUI2T10ffM5/hQ5GLYUeKjnCXT5jdp8AesbpIO6w32
DdY4DxyvpJx2un/zSQIB1M51K6oAOqwA7azY+MML3GqJwcEkapaeGc2k3whMq2OK
Xj7m9bV3BuStAGbY++3ihm3D0YhZQQ1eUg8mSt3Kji3BK+qu64KKtYxBDNhZijUn
9Y3uyRdaZK7Dfc2mBFnnRAF3tSWNSYTE8tjHhtp95vHVKHcYLbTYA5NLKZo0DKmg
/Yj/4QWKLq9xQjwWLepW3lWD7WkLYGoHvayNyPLaqL8c0X8W8uOw9O4FE6UqJvnd
z684Ccj0OpOWU0Cf2SpE1tw4eD7NZ5Q2Aaosm5TgsSagj2/6CHu8cc7F0xfuOQX4
eCFsvsLYWvZszCERGwfTjIqqSwVfZIt86pIGVkttmSKuJJx33p2+OGNxtjQ12iD9
pymqbybqSdAaNcsWG603hn2AO11aj2C8t/CWafPajHpkYs1zNbMSIl+go9sgpsu2
wv39klacdxK/r3tbUFxkbSnreJPsdMGsZSh+QBAzE9xLPRoYZnHk2R05Qg6T3YO2
K2yjAQKWeD7wyqO5BmQJ4VvtMqy8ggI2J6eqX/7Y/oPLkn1HOb0=
=LUu3
-----END PGP SIGNATURE-----

--J/q1ewrBcv3vYBTm--



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