Ticket #2304: cludgy_build_changes.patch
File cludgy_build_changes.patch, 2.1 KB (added by , 10 years ago) |
---|
-
build/premake/premake4.lua
28 28 newoption { trigger = "datadir", description = "Directory for data files (typically '/usr/share/games/0ad'); default is ../data/ relative to executable" } 29 29 newoption { trigger = "libdir", description = "Directory for libraries (typically '/usr/lib/games/0ad'); default is ./ relative to executable" } 30 30 31 -- ugly hack to use clang 32 premake.gcc.cc = 'clang' 33 premake.gcc.cxx = 'clang++' 34 31 35 -- Root directory of project checkout relative to this .lua file 32 36 rootdir = "../.." 33 37 … … 341 345 buildoptions { 342 346 -- Hide symbols in dynamic shared objects by default, for efficiency and for equivalence with 343 347 -- Windows - they should be exported explicitly with __attribute__ ((visibility ("default"))) 344 "-fvisibility=hidden" 348 "-fvisibility=hidden", 349 "-stdlib=libstdc++" 345 350 } 351 linkoptions { 352 "-stdlib=libstdc++" 353 } 346 354 end 347 355 348 356 if _OPTIONS["bindir"] then -
libraries/osx/build-osx-libs.sh
60 60 # Define compiler as "gcc" (in case anything expects e.g. gcc-4.2) 61 61 # On newer OS X versions, this will be a symbolic link to LLVM GCC 62 62 # TODO: don't rely on that 63 export CC=${CC:="gcc"} CXX=${CXX:="g++"} 63 #export CC=${CC:="gcc"} CXX=${CXX:="g++"} 64 export CC=${CC:="clang"} CXX=${CXX:="clang++"} 64 65 65 66 # The various libs offer inconsistent configure options, some allow 66 67 # setting sysroot and OS X-specific options, others don't. Adding to … … 84 85 CFLAGS="$CFLAGS -arch $ARCH" 85 86 # Avoid linker warnings about compiling translation units with different visibility settings 86 87 CPPFLAGS="$CPPFLAGS $CFLAGS -fvisibility=hidden" 88 CPPFLAGS="$CPPFLAGS -stdlib=libstdc++" #-lstdc++.6" 87 89 LDFLAGS="$LDFLAGS -arch $ARCH" 90 LDFLAGS="$LDFLAGS -stdlib=libstdc++" # -lstdc++.6" 88 91 89 92 JOBS=${JOBS:="-j2"} 90 93