Commit 3ba1e3d8 authored by qubitnano's avatar qubitnano
Browse files

duckstation: build with clang

Fails to build with gcc:

duckstation> In function 'void* memcpy(void*, const void*, size_t)',
duckstation>     inlined from 'FileSystem::AtomicRenamedFile
FileSystem::CreateAtomicRenamedFile(std::string, const char*, Error*)'
at /build/source/src/common/file_system.cpp:1213:16:
duckstation>
/nix/store/wlavaybjbzgllhq11lib6qgr7rm8imgp-glibc-2.39-52-dev/include/bits/string_fortified.h:29:33:
warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned
int, long unsigned int)' accessing 9223372036854775801 or more bytes at
offsets 0 and 0 overlaps 9223372036854775795 bytes at offset 6
[-Wrestrict]

Warnings before building:

duckstation>   *************** UNSUPPORTED CONFIGURATION ***************
duckstation>
duckstation>   You are not compiling DuckStation with a supported
compiler.
duckstation>
duckstation>   It may not even build successfully.
duckstation>
duckstation>   DuckStation only supports the Clang and MSVC compilers.
duckstation>
duckstation>   No support will be provided, continue at your own risk.
duckstation>
duckstation>   *********************************************************
parent f88567b6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  llvmPackages,
  SDL2,
  callPackage,
  cmake,
@@ -31,7 +32,7 @@ let
    wrapQtAppsHook
    ;
in
stdenv.mkDerivation (finalAttrs: {
llvmPackages.stdenv.mkDerivation (finalAttrs: {
  inherit (sources.duckstation) pname version src;

  patches = [