summaryrefslogtreecommitdiffstats
path: root/scons
Commit message (Collapse)AuthorAgeFilesLines
* gallivm: Use the LLVM's C disassembly interface.Jose Fonseca2015-05-291-1/+3
| | | | | | | | | | | It doesn't do everything we want. In particular it doesn't allow to detect jumps or return opcodes. Currently we detect the x86's RET opcode. Even though it's worse for LLVM 3.3, it's an improvement for LLVM 3.7, which was totally busted. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* scons: Support LLVM 3.5 and 3.6 on windows.Olivier Pena2015-04-271-7/+26
| | | | | | | | llvm/Config/llvm-config.h is parsed instead of llvm/Config/config.h for detecting LLVM version (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/073707.html). Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* scons: Disable MSVC warnings about inconsistent function annotation.Jose Fonseca2015-03-251-0/+1
| | | | | | | | | Somehow, merely including any of the *intrin.h headers causes dozens of this warnings (when compiling pretty much every source file). MSVC does not always complain the same -- so it's possible we're doing something weird --, but silence these warnings in the meanwhile. Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Silence conversion from 'size_t' to 'type', possible loss of data on ↵Jose Fonseca2015-03-221-0/+1
| | | | | | | | | | MSVC. Most cases seem harmless, though that might not always be the case. Maybe one day we can get gcc to complain about these and fix them throughout the code, but until then let's silence them. Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Ensure inttypes.h is always pre-included on MSVC.Jose Fonseca2015-03-221-0/+7
| | | | | | | | | | | | It's a bit hackish couldn't find another solution. See code comment for details. The warning is useful, so universally disabling doesn't sound a good idea. Fixes warning C4005: 'xxx' : macro redefinition Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Silence MSVC C4351 warning.Jose Fonseca2015-03-221-0/+1
| | | | | | | | It warns about change in MSVC behavior -- array initialisation used to be non-standard, but is standard now, assuming I understand correctly http://en.cppreference.com/w/cpp/language/zero_initialization . Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Match some of LLVM warning options.Jose Fonseca2015-03-221-0/+5
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Prefer winflexbison, and use --wincompat when available.Jose Fonseca2015-03-221-7/+33
| | | | | | | | | | | | This avoids MSVC the warning warning C4013: 'isatty' undefined; assuming extern returning int with certain versions of flex. Reviewed-by: Brian Paul <brianp@vmware.com> v2: Add win flex-bison link to docs/install.html.
* scons: Define YY_USE_CONST on MSVC.Jose Fonseca2015-03-221-0/+8
| | | | | | | | | | This prevents the MSVC from warning C4090: 'function' : different 'const' qualifiers when compiling flex generated lexers. Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Tell MSVC STL library to not use exceptions.Jose Fonseca2015-03-221-0/+1
| | | | | | | | | | | | MSVC defaults to no exceptions unless /EH option is passed (which we don't), while MSVC's STL defaults to use exceptions unless _HAS_EXCEPTIONS=0 is defined, which we didn't. This fixes warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Silence MSVC warnings about overflows in constant arithmetic.Jose Fonseca2015-03-181-0/+2
| | | | | | | These get triggered even when using the standard C99 INFINITY/NAN constants. Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Disable MSVC signed/unsigned mismatch warnings.José Fonseca2015-03-181-0/+1
| | | | | | | | | | | | | By default gcc ignores the issue, and as result code that mixes signed/unsigned is so widespread through the code base that it ends up being little more than noise, potentially obscuring more pertinent warnings. Maybe one day we enable the corresponding gcc warnings and cleanup, but until then, this change disables them. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* Add macro for unused function attribute.Vinson Lee2015-03-091-0/+1
| | | | | | Suggested-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* scons: Update for the fact that we require GCC 4.2Jose Fonseca2015-03-041-15/+10
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Use -Werror MSVC compatibility flags per-directory.Jose Fonseca2015-03-041-7/+20
| | | | | | Matching what we already do with autotools builds. Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Define _DEFAULT_SOURCE.Vinson Lee2015-03-031-0/+1
| | | | | | | | | | | Fix GCC cpp warnings with glibc >= 2.19. /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
* scons: Fix HAVE___* definition.Jose Fonseca2015-03-021-24/+23
| | | | | | These definitions must be moved before `cppdefines` is used to have effect. Trivial.
* scons: Fix Windows builds with LLVM 3.5.Jose Fonseca2015-02-031-2/+14
| | | | LLVMBitReader dependency was introduced, as pointed out by Rob Conde.
* scons: Add X11 include path if X11 is available.Vinson Lee2015-01-221-0/+3
| | | | | | | | | | | | | | Mac OS X XQuartz places X11 headers at /opt/X11/include. This patch fixes this Mac OS X SCons build error. Compiling src/gallium/state_trackers/glx/xlib/glx_api.c ... In file included from src/gallium/state_trackers/glx/xlib/glx_api.c:34: include/GL/glx.h:30:10: fatal error: 'X11/Xlib.h' file not found ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* scons: Generate SSE2 floating-point arithmetic.José Fonseca2014-11-261-2/+2
| | | | | | | | | | | | | | | - SSE2 is available on all x86 processors we care about. - It's recommended by Intel: https://software.intel.com/en-us/blogs/2012/09/26/gcc-x86-performance-hints - And has been the default since MSVC 2012: http://msdn.microsoft.com/en-us/library/7t5yh4fd(v=vs.110).aspx Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* scons: Remove dead code/comments.José Fonseca2014-11-261-4/+1
| | | | | | | | | | | | | - Remove no-op if-clause. - -mstackrealign has been enabled again on MinGW for quite some time and appears to work alright nowadays. - Drop -mmmx option as it is implied my -msse, and we don't use MMX intrinsics anyway. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* scons: Require glproto >= 1.4.13 for X11.Vinson Lee2014-11-161-1/+1
| | | | | | | | | | | GLXBadProfileARB and X_GLXCreateContextAtrribsARB require glproto >= 1.4.13. These symbols were added in commit d5d41112cbccd9301500e8e023be77eb9cb622cd "st/xlib: Generate errors as specified." Signed-off-by: Vinson Lee <vlee@freedesktop.org> Cc: "10.4" <mesa-stable@lists.freedesktop.org> Reviewed-by: José Fonseca <jfonseca@vmware.com>
* configure: check for xlocale.h and strtofChia-I Wu2014-10-301-0/+4
| | | | | | | | With the assumptions that xlocale.h implies newlocale and strtof_l. SCons is updated to define HAVE_XLOCALE_H on linux and darwin. Signed-off-by: Chia-I Wu <olv@lunarg.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* gallivm,llvmpipe,clover: Bump required LLVM version to 3.3.José Fonseca2014-10-231-14/+2
| | | | | | | | | | | | | | We'll need to update gallivm for the interface changes in LLVM 3.6, and the fewer the number of older LLVM versions we support the less hairy that will be. As consequence HAVE_AVX define can disappear. (Note HAVE_AVX meant whether LLVM version supports AVX or not. Runtime support for AVX is always checked and enforced independently.) Verified llvmpipe builds and runs with with LLVM 3.3, 3.4, and 3.5. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* mesa: Replace a priori knowledge of gcc attributes with configure tests.Matt Turner2014-09-251-0/+6
| | | | | | | | Note that I had to add support for testing the packed attribute to m4/ax_gcc_func_attribute.m4. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> [C bits] Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Replace a priori knowledge of gcc builtins with configure tests.Matt Turner2014-09-251-0/+18
| | | | | | | | | | | | | | Presumbly this will let clang and other compilers use the built-ins as well. Notice two changes specifically: - in _mesa_next_pow_two_64(), always use __builtin_clzll and add a static assertion that this is safe. - in macros.h, remove the clang-specific definition since it should be able to detect __builtin_unreachable in configure. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> [C bits] Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* scons: add /dynamicbase and /nxcompat to MinGW linkflagsJosé Fonseca2014-09-111-2/+6
| | | | Just like b26503b196d51dc46c815e241343e42ab30e8d66 for MSVC.
* scons: add /dynamicbase and /nxcompat to MSVC linkflagsBrian Paul2014-09-111-0/+2
| | | | | | | This builds the opengl DLLs with address layout space randomization (ASLR) and data execution prevention (DEP) for better security. Reviewed-by: Kurt Daverman <krd@vmware.com>
* scons: do not include headers from the sources listsJose Fonseca2014-08-141-0/+3
| | | | | | | | | | The SCons documentation is not explicit on the topic yet building mesa with SCons and MSVC is known to have problems when headers are listed. So be safe just drop them for now. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82534 Tested-by: Vinson Lee <vlee@freedesktop.org> Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
* scons: Link libGL.so against xcb-dri2.José Fonseca2014-06-161-1/+1
| | | | | | Fixing undefined xcb_dri2_* symbols. Trivial.
* scons: remove dri-i915 build targetEmil Velikov2014-06-091-1/+0
| | | | | | | | Unmaintained and broken. Cc: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Jakob Bornecrantz <jakob@vmware.com>
* scons: Search only for mingw-w64 cross-compilers.José Fonseca2014-06-061-15/+2
| | | | | Some distros still ship the non-mingw-w64 cross-compilers, but they are can't build Mesa properly, as Jakob pointed out.
* gallivm: Support MCJIT on Windows.José Fonseca2014-05-231-5/+3
| | | | | | | It works fine, though it requires using ELF objects. With this change there is nothing preventing us to switch exclusively to MCJIT, everywhere. It's still off though.
* scons: Require LLVM 3.1José Fonseca2014-05-141-44/+13
| | | | | | Support for prior versions will be removed in the following change. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* scons: Don't use bundled C99 headers for VS 2013.José Fonseca2014-05-021-0/+6
| | | | | | | | | | | Use the ones provided by the compiler instead. NOTE: External trees should be updated to not include '#include/c99' directory directly, but rather rely on scons/gallium.py to do the right thing. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* scons: Adjust the warnings for VS.José Fonseca2014-05-021-1/+3
| | | | | | | | | | | | Silence insignificant warnings so significant warnings have a chance to stand out. The only abundant warning that's not silenced here is "C4018: signed/unsigned mismatch", as it could hide security issues, so it's better to actually fix the code. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* scons: Enable building through Clang Static Analyzer.José Fonseca2014-04-171-3/+35
| | | | | | | | | Same intent as commit a45a50a4828e1357e9555474bc127c5585b3a420, but this the C compiler is detected via C-preprocessor macros, similar to how autotools do it, as that seems to be the most reliable method. Reviewed-by: Brian Paul <brianp@vmware.com>
* Revert "scons: Enable building through Clang Static Analyzer."José Fonseca2014-04-161-23/+8
| | | | | | | | | | | | | This reverts commit a45a50a4828e1357e9555474bc127c5585b3a420. Unfortunately gcc dumps argv[0] as the first word of --version, so it is unreliable for detecting gcc. In particular `cc --version` and `i686-w64-mingw32-gcc --version` give wrong results. A better solution needs to be found -- most likely using C-preprocessing like autotools does. Revert for now.
* scons: Add an analyze option.José Fonseca2014-04-161-0/+12
| | | | | | | | | | | | | | For Clang static code analyzer, the scan-build script will produce more comprehensive output. Nevertheless you can invoke it as CC=clang CXX=clang++ scons analyze=1 For MSVC this is the best way to use its static code analysis. Simply invoke as scons analyze=1 Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Enable building through Clang Static Analyzer.José Fonseca2014-04-161-8/+23
| | | | | | | | | | | | | By accurately detecting gcc/clang through --version option instead of executable name. Clang Static Analyzer reports many issues, most false positives, but it found at least one real and subtle use-after-free issue in st_texture_get_sampler_view(): http://people.freedesktop.org/~jrfonseca/scan-build-2014-04-14-1/report-869047.html#EndPath Reviewed-by: Brian Paul <brianp@vmware.com>
* haiku: Fix build through scons corrections and viewport fixesAlexander von Gluck IV2014-03-241-0/+5
| | | | | | | | | | * Add HAVE_PTHREAD, we do have pthread support wrappers now for non-native Haiku threaded applications. * Viewport changed behavior recently breaking the build. We fix this by looking at the gl_context ViewportArray (Thanks Brian for the idea) Acked-by: Brian Paul <brianp@vmware.com>
* scons: Build with C++11 with LLVM >= 3.5.Vinson Lee2014-03-041-0/+1
| | | | | | | | | | | | | | | | | Starting with llvm-3.5svn r202574, LLVM expects C+11 mode. commit f8bc17fadc8f170c1126328d203f0dab78960137 Author: Chandler Carruth <chandlerc@gmail.com> Date: Sat Mar 1 06:31:00 2014 +0000 [C++11] Turn off compiler-based detection of R-value references, relying on the fact that we now build in C++11 mode with modern compilers. This should flush out any issues. If the build bots are happy with this, I'll GC all the code for coping without R-value references. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202574 91177308-0d34-0410-b5e6-96231b3b80d8 Signed-off-by: Vinson Lee <vlee@freedesktop.org>
* scons: sync package requirementsEmil Velikov2014-02-181-5/+3
| | | | | | | | xorg-server and libkms is no longer required since the removal of the xorg state-tracker. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-172-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/alanh@tungstengraphics.com/alanh@vmware.com/ s/jens@tungstengraphics.com/jowen@vmware.com/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g s/keithw\?@tungstengraphics.com/keithw@vmware.com/g s/michel@tungstengraphics.com/daenzer@vmware.com/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/zack@tungstengraphics.com/zackr@vmware.com/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Add system library linker flags on LLVM 3.5.Vinson Lee2013-12-231-0/+2
| | | | | | | llvn-3.5svn r197664 split out the linker flags from ldflags to system-libs. Signed-off-by: Vinson Lee <vlee@freedesktop.org>
* mesa: Remove last BEOS checksAlexander von Gluck IV2013-11-051-2/+0
| | | | | | | | | * Goodbye BeOS, we hardly knew thee * As BeOS was gcc2 only, there was little chance of this being useful. * Doesn't effect Haiku in any meaningful way Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Fix Haiku missing libraryAlexander von Gluck IV2013-10-201-1/+1
| | | | | | | * The softpipe add-on needs libtranslation due to the use of BTranslatorRoster Reviewed-by: Brian Paul <brianp@vmware.com>
* scons: Simplified fix of llvm cxxflags for rttiAlexander von Gluck IV2013-10-171-0/+5
| | | | | | | * Based on ideas of Jose Fonseca * A rework of ce8eadb6e8 Tested-by: Vinson Lee <vlee@freedesktop.org>
* Revert "scons: Fix build when rtti is disabled"José Fonseca2013-10-161-3/+0
| | | | | | | | | | This reverts commit 94d05bf87a21bd364e84f699a0064e5fba58a6f9 as it has a few problems: - it breaks windows builds becuase env[LLVM_CXXFLAGS] is never set there - it is merging not only rtti, but the whole cxxflags (defines etc) which has proven to be a source of troubles (breaks debugging etc.)
* scons: Fix build when rtti is disabledAlexander von Gluck IV2013-10-151-0/+3
| | | | | | | | | | | | * The rtti fix actually dug up a bug in the scons build scripts. * Autotools took the LLVM cpp and cxx flags, while scons only took the cpp flags. * This grabs the cxx flags and applies them where needed. We may want to make the same change for the llvm cpp flags in scons. * The only linux platform I can find with LLVM no-rtti is Ubuntu. * Fixes bug #70471 Tested-by: Vinson Lee <vlee@freedesktop.org>