Skip to content

Commit

Permalink
Fix endian-related warnings + samples
Browse files Browse the repository at this point in the history
+ 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
  • Loading branch information
Cryptogenic committed Jun 17, 2020
1 parent a91589a commit 37f719d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion samples/font/font/build.bat
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion samples/library_example/library_example/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 37f719d

Please sign in to comment.