From 37f719dc1f37fb4bc5985be47aaeca9b778fbba0 Mon Sep 17 00:00:00 2001 From: Specter Date: Wed, 17 Jun 2020 15:41:31 -0400 Subject: [PATCH] Fix endian-related warnings + samples + Fixed an issue where ambiguous order of operations in the endian header was causing warnings on samples + Fixed an issue where the font sample would fail to build on Windows due to an outdated build batch file + Fixed an issue where the library sample would fail to build on Windows due to an outdated build batch file --- include/endian.h | 2 +- samples/font/font/build.bat | 2 +- samples/library_example/library_example/build.bat | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/endian.h b/include/endian.h index 172c4320..9c745ece 100644 --- a/include/endian.h +++ b/include/endian.h @@ -28,7 +28,7 @@ static __inline uint32_t __bswap32(uint32_t __x) static __inline uint64_t __bswap64(uint64_t __x) { - return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32); + return (__bswap32(__x)+0ULL)<<32 | __bswap32(__x>>32); } #if __BYTE_ORDER == __LITTLE_ENDIAN diff --git a/samples/font/font/build.bat b/samples/font/font/build.bat index c275030b..0c9e82cf 100644 --- a/samples/font/font/build.bat +++ b/samples/font/font/build.bat @@ -1,7 +1,7 @@ SETLOCAL EnableDelayedExpansion Rem Libraries to link in -set libraries=-lSceLibcInternal -lkernel -lSceVideoOut -lSceSysmodule -lSceFreeType +set libraries=-lc -lkernel -lSceVideoOut -lSceSysmodule -lSceFreeType Rem Read the script arguments into local vars set intdir=%1 diff --git a/samples/library_example/library_example/build.bat b/samples/library_example/library_example/build.bat index df725041..a465841c 100644 --- a/samples/library_example/library_example/build.bat +++ b/samples/library_example/library_example/build.bat @@ -25,7 +25,7 @@ set obj_files= for %%f in (%intdir%\\*.o) do set obj_files=!obj_files! .\%%f Rem Link the input ELF -ld.lld -m elf_x86_64 -pie --script "%OO_PS4_TOOLCHAIN%\link.x" --eh-frame-hdr -o "%outputElf%" "-L%OO_PS4_TOOLCHAIN%\lib" -lc -lkernel --verbose "%OO_PS4_TOOLCHAIN%\lib\crtlib.o" %obj_files% +ld.lld -m elf_x86_64 -pie --script "%OO_PS4_TOOLCHAIN%\link.x" --eh-frame-hdr -o "%outputElf%" "-L%OO_PS4_TOOLCHAIN%\lib" %libraries% --verbose "%OO_PS4_TOOLCHAIN%\lib\crtlib.o" %obj_files% Rem Create stub shared libraries for %%f in (*.cpp) do (