Index: ps/trunk/build/premake/extern_libs5.lua =================================================================== --- ps/trunk/build/premake/extern_libs5.lua +++ ps/trunk/build/premake/extern_libs5.lua @@ -351,8 +351,8 @@ add_default_include_paths("iconv") defines { "LIBICONV_STATIC" } elseif os.getversion().description == "FreeBSD" then - defines { "HAVE_ICONV_CONST" } - defines { "ICONV_CONST=const" } + -- On FreeBSD you need this flag to tell it to use the BSD libc iconv + defines { "LIBICONV_PLUG" } end end, link_settings = function() @@ -366,14 +366,6 @@ no_delayload = 1, }) -- glibc (used on Linux and GNU/kFreeBSD) has iconv - -- FreeBSD 10+ has iconv as a part of libc - if os.istarget("bsd") - and not (os.getversion().description == "FreeBSD" and os.getversion().majorversion >= 10 - or os.getversion().description == "GNU/kFreeBSD") then - add_default_links({ - bsd_names = { "iconv" }, - }) - end end, }, icu = { Index: ps/trunk/build/premake/premake5.lua =================================================================== --- ps/trunk/build/premake/premake5.lua +++ ps/trunk/build/premake/premake5.lua @@ -42,6 +42,8 @@ cc = "clang" elseif os.istarget("linux") and _OPTIONS["icc"] then cc = "icc" +elseif os.istarget("bsd") and os.getversion().description == "FreeBSD" then + cc = "clang" elseif not os.istarget("windows") then cc = os.getenv("CC") if cc == nil or cc == "" then @@ -1103,8 +1105,13 @@ links { "winmm", "delayimp" } elseif os.istarget("linux") or os.istarget("bsd") then - buildoptions { "-rdynamic", "-fPIC" } - linkoptions { "-fPIC", "-rdynamic" } + if os.getversion().description == "FreeBSD" then + buildoptions { "-fPIC" } + linkoptions { "-fPIC" } + else + buildoptions { "-rdynamic", "-fPIC" } + linkoptions { "-fPIC", "-rdynamic" } + end -- warnings triggered by wxWidgets buildoptions { "-Wno-unused-local-typedefs" } @@ -1252,9 +1259,10 @@ -- FCollada is not aliasing-safe, so disallow dangerous optimisations -- (TODO: It'd be nice to fix FCollada, but that looks hard) buildoptions { "-fno-strict-aliasing" } - - buildoptions { "-rdynamic" } - linkoptions { "-rdynamic" } + if os.getversion().description ~= "FreeBSD" then + buildoptions { "-rdynamic" } + linkoptions { "-rdynamic" } + end elseif os.istarget("bsd") then if os.getversion().description == "OpenBSD" then Index: ps/trunk/libraries/source/nvtt/build.sh =================================================================== --- ps/trunk/libraries/source/nvtt/build.sh +++ ps/trunk/libraries/source/nvtt/build.sh @@ -1,6 +1,6 @@ #!/bin/sh set -e -LIB_VERSION="nvtt-2.1.1+wildfiregames.3" +LIB_VERSION="nvtt-2.1.1+wildfiregames.4" JOBS=${JOBS:="-j2"} MAKE=${MAKE:="make"} LDFLAGS=${LDFLAGS:=""} Index: ps/trunk/libraries/source/nvtt/patches/fix-sse-i386-build.diff =================================================================== --- ps/trunk/libraries/source/nvtt/patches/fix-sse-i386-build.diff +++ ps/trunk/libraries/source/nvtt/patches/fix-sse-i386-build.diff @@ -0,0 +1,15 @@ +diff --git "a/src/nvmath/Half.cpp" "b/src/nvmath/Half.cpp" +index 9021771..bf37d3e 100644 +--- "a/src/nvmath/Half.cpp" ++++ "b/src/nvmath/Half.cpp" +@@ -492,7 +492,9 @@ nv::half_to_float( uint16 h ) + #if !NV_OS_IOS && (defined(__i386__) || defined(__x86_64__)) + + #if NV_CC_GNUC +-#if defined(__i386__) || defined(__x86_64__) ++#if defined(__i386__) ++#include ++#elif defined(__x86_64__) + #include + #endif + #endif Index: ps/trunk/libraries/source/nvtt/src/src/nvmath/Half.cpp =================================================================== --- ps/trunk/libraries/source/nvtt/src/src/nvmath/Half.cpp +++ ps/trunk/libraries/source/nvtt/src/src/nvmath/Half.cpp @@ -492,7 +492,9 @@ #if !NV_OS_IOS && (defined(__i386__) || defined(__x86_64__)) #if NV_CC_GNUC -#if defined(__i386__) || defined(__x86_64__) +#if defined(__i386__) +#include +#elif defined(__x86_64__) #include #endif #endif