pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ppsspp: Build with Clang



Module Name:	pkgsrc-wip
Committed By:	Charlotte Koch <charlotte%NetBSD.org@localhost>
Pushed By:	cfkoch
Date:		Sun Jul 30 00:03:51 2023 -0700
Changeset:	0d96f39c144624c2dbaeb1e80ce18bafe2f926ff

Modified Files:
	ppsspp/Makefile
	ppsspp/TODO
	ppsspp/distinfo
	ppsspp/patches/patch-CMakeLists.txt

Log Message:
ppsspp: Build with Clang

It's the only way I could find to a particular crash that always happens
otherwise.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0d96f39c144624c2dbaeb1e80ce18bafe2f926ff

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 ppsspp/Makefile                     |  7 +++++++
 ppsspp/TODO                         |  1 +
 ppsspp/distinfo                     |  2 +-
 ppsspp/patches/patch-CMakeLists.txt | 13 +++++++++++--
 4 files changed, 20 insertions(+), 3 deletions(-)

diffs:
diff --git a/ppsspp/Makefile b/ppsspp/Makefile
index 3c3f636375..a287f39332 100644
--- a/ppsspp/Makefile
+++ b/ppsspp/Makefile
@@ -16,8 +16,14 @@ USE_LANGUAGES=	c c++17
 USE_TOOLS+=	pkg-config
 .include "../../lang/python/tool.mk"
 
+# There's a crash that consistently happens whenever PPSSPPSDL exits, but
+# only when built with GCC. Works fine with Clang, though.
+BUILD_DEPENDS+=	clang-[0-9]*:../../lang/clang
+
 ONLY_FOR_PLATFORM=	*-*-*arm* *-*-x86_64 *-*-i386
 
+CMAKE_ARGS+=	-DCMAKE_C_COMPILER=${CLANGBASE:Q}/bin/clang
+CMAKE_ARGS+=	-DCMAKE_CXX_COMPILER=${CLANGBASE:Q}/bin/clang++
 CMAKE_ARGS+=	-DUSE_DISCORD=OFF
 CMAKE_ARGS+=	-DUSE_SYSTEM_FFMPEG=ON
 CMAKE_ARGS+=	-DUSE_SYSTEM_LIBPNG=ON
@@ -29,6 +35,7 @@ CMAKE_ARGS+=	-DUSE_SYSTEM_ZSTD=ON
 
 NOT_PAX_MPROTECT_SAFE+=	bin/PPSSPPSDL
 
+.include "../../mk/compiler/clang.mk"
 .include "../../archivers/libzip/buildlink3.mk"
 .include "../../archivers/zstd/buildlink3.mk"
 .include "../../devel/SDL2/buildlink3.mk"
diff --git a/ppsspp/TODO b/ppsspp/TODO
index ca8ee1b0d9..db8af81348 100644
--- a/ppsspp/TODO
+++ b/ppsspp/TODO
@@ -1,3 +1,4 @@
 PPSSPP TODO:
 
 - audio problems on NetBSD
+- unclear if ASLR needs to be disabled at build-time as well as runtime
diff --git a/ppsspp/distinfo b/ppsspp/distinfo
index e1ce3c158b..24c05d2c36 100644
--- a/ppsspp/distinfo
+++ b/ppsspp/distinfo
@@ -3,6 +3,6 @@ $NetBSD$
 BLAKE2s (ppsspp-1.15.4.tar.xz) = d44cf41b85ddb81847059235ebbd0cb99e839de6c2915a7057178e698a188dfd
 SHA512 (ppsspp-1.15.4.tar.xz) = 9d2c140b0d633e5ca6191aaf276b7e4f6d029f29d1313a45fb78ee3879fec09f57d816604c51474ab6fe9cde713787d5769e87466d3c3015fe6a9b195ff198d2
 Size (ppsspp-1.15.4.tar.xz) = 51947468 bytes
-SHA1 (patch-CMakeLists.txt) = 1b746704a416f65552b99e9244638c0f03502d80
+SHA1 (patch-CMakeLists.txt) = b7ef0ca40d369607e5119c113fb48a6138f21bae
 SHA1 (patch-Core_HLE_proAdhoc.cpp) = 36173e947964545f97eb3405be0666ce7c8ad09e
 SHA1 (patch-ppsspp_config.h) = 26ab11265c16d97904613b8b73ccf85f6258a5b1
diff --git a/ppsspp/patches/patch-CMakeLists.txt b/ppsspp/patches/patch-CMakeLists.txt
index 05096583a3..740ee16fa5 100644
--- a/ppsspp/patches/patch-CMakeLists.txt
+++ b/ppsspp/patches/patch-CMakeLists.txt
@@ -1,9 +1,10 @@
 $NetBSD$
 
-Several functions are hidden behind _NETBSD_SOURCE.
+* Several functions are hidden behind _NETBSD_SOURCE.
+* Deal with a failure specific to Clang.
 
 --- CMakeLists.txt.orig	2023-05-22 07:27:43.000000000 -0700
-+++ CMakeLists.txt	2023-06-29 00:17:35.378577080 -0700
++++ CMakeLists.txt	2023-07-29 23:46:33.678325802 -0700
 @@ -13,6 +13,10 @@
  
  add_definitions(-D__STDC_CONSTANT_MACROS)
@@ -15,3 +16,11 @@ Several functions are hidden behind _NETBSD_SOURCE.
  # Include AppleClang and Clang.
  if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
  	set(CLANG ON)
+@@ -336,6 +340,7 @@
+ 		add_definitions(-Wno-nullability-completeness)
+ 		add_definitions(-Wno-tautological-pointer-compare)
+ 		add_definitions(-Wno-deprecated-register)
++		add_definitions(-Wno-c++11-narrowing)
+ 	endif()
+ 
+ 	if(USE_ASAN)


Home | Main Index | Thread Index | Old Index