summaryrefslogtreecommitdiff
path: root/scons
AgeCommit message (Collapse)AuthorFilesLines
2019-11-29scons: Bump C standard to gnu11 on macOS 10.15.Vinson Lee1-1/+4
Fix build error on macOS 10.15 Catalina. src/util/u_queue.c:179:7: error: implicit declaration of function 'timespec_get' is invalid in C99 [-Werror,-Wimplicit-function-declaration] timespec_get(&ts, TIME_UTC); ^ timespec_get needs C11 starting with macOS 10.15. /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/time.h 193 #if (__DARWIN_C_LEVEL >= __DARWIN_C_FULL) && \ 194 ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ 195 (defined(__cplusplus) && __cplusplus >= 201703L)) 196 /* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */ 197 #define TIME_UTC 1 /* time elapsed since epoch */ 198 __API_AVAILABLE(macosx(10.15), ios(13.0), tvos(13.0), watchos(6.0)) 199 int timespec_get(struct timespec *ts, int base); 200 #endif Signed-off-by: Vinson Lee <vlee@freedesktop.org> Acked-by: Eric Engestrom <eric@engestrom.ch>
2019-11-05mesa/imports: let the build system detect strtok_r()Eric Engestrom1-0/+3
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2013 Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-04scons/windows: Fix build with LLVM>=8Prodea Alexandru-Liviu1-5/+6
Fixes eebe091d292609de8aaf5b5c537d867b23908947 ("scons/windows: Enable compute shaders when possible.") Signed-off-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-09-30scons/windows: Enable compute shaders when possible.pal10001-1/+26
Tests done with llvm-config indicate that there are only 2 libraries in irreader and not in engine, LLVMAsmParser and LLVMIRReader and both of them are part of coroutines so I replaced irreader with coroutines and added libraries unique to coroutines. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-09-29scons: Fix MSYS2 Mingw-w64 build.pal10002-0/+10
Reviewed-by: Jose Fonseca <jfonseca@vmware.com> This patch is based on https://github.com/msys2/MINGW-packages/blob/28e3f85e09b6947ea80036c49f6c38f1394f93ca/mingw-w64-mesa/link-ole32.patch but with tweaks to avoid MSVC build break when applied. v2: Create Mingw platform alias pointing to windows host platform define to avoid spurious crosscompilation; v3: Fix obviously wrong compiler flags for swr driver; v4: Update original patch URL because it has been relocated; v5: Don't bother patching autools stuff as it's not used by MSYS2 Mingw-w64 build and it's days are numbered anyway; v6: After Mingw posix flag fix in 295851eb things are far simpler as we don't need more linking of uuid, ole32, version and shell32 than what is already in place.
2019-09-29scons/windows: Support build with LLVM 9.pal10001-6/+30
As X86AsmPrinter component is gone, LLVMX86AsmPrinter got replaced with LLVMRemarks, LLVMBitstreamReader and LLVMDebugInfoDWARF. Tests done with llvm-config on both LLVM 8 and 9 indicate that mcjit, bitwriter and x86asmprinter fully fit inside engine component. On other platforms and with meson build mcdisassembler was used to replace X86AsmPrinter but mcdisassembler also fully fits inside engine component for LLVM>=8 according to same tests. v2: Avoid duplicating code related to Mingw pthreads. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Cc: 19.1 19.2 <mesa-stable@lists.freedesktop.org> On 19.1 this patch does not apply cleanly without 88eb2a1f
2019-09-28scons: add py3 supportMichel Zou3-5/+9
SCons 3.1 has moved to python 3, requiring this fix to continue supporting scons builds. Closes: #944 Cc: mesa-stable@lists.freedesktop.org Acked-by: Eric Engestrom <eric@engestrom.ch> Tested-by: Eric Engestrom <eric@engestrom.ch>
2019-09-11gallium: Require LLVM >= 3.9Adam Jackson1-14/+2
To go any further than this would be to break the current version of Android. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-09-11gallium: Require LLVM >= 3.8Adam Jackson1-1/+1
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-09-11gallium: Require LLVM >= 3.7Adam Jackson1-14/+2
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-09-11gallium: Require LLVM >= 3.6Adam Jackson1-15/+2
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-09-11gallium: Require LLVM >= 3.5Adam Jackson1-17/+4
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> [ Michel Dänzer: Dropped jessie line from debian-install.sh again ]
2019-09-11gallium: Require LLVM >= 3.4Adam Jackson1-1/+1
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-09-06meson/scons/android: drop now-unused HAVE_LLVMEric Engestrom1-5/+1
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Acked-by: Michel Dänzer <mdaenzer@redhat.com>
2019-09-06meson/scons/android: add LLVM_AVAILABLE binary flagEric Engestrom1-0/+1
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Acked-by: Michel Dänzer <mdaenzer@redhat.com>
2019-09-04scons: Add coroutines component to build.Vinson Lee1-0/+3
Fixes: d32690b43c91 ("gallivm: add coroutine pass manager support") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Dave Airlie <airlied@redhat.com>
2019-08-28scons: Make GCC builds stricter.Jose Fonseca1-1/+4
Uses some of the same -Werror options used by Meson, as suggested by Michel Dänzer. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Acked-by: Eric Engestrom <eric@engestrom.ch>
2019-08-27scons: add support for MAJOR_IN_{MKDEV,SYSMACROS}Eric Engestrom1-0/+8
src/gallium/winsys/svga/drm/vmw_screen.c: In function ‘vmw_dev_compare’: src/gallium/winsys/svga/drm/vmw_screen.c:48:12: warning: implicit declaration of function ‘major’ [-Wimplicit-function-declaration] 48 | return (major(*(dev_t *)key1) == major(*(dev_t *)key2) && | ^~~~~ src/gallium/winsys/svga/drm/vmw_screen.c:49:12: warning: implicit declaration of function ‘minor’ [-Wimplicit-function-declaration] 49 | minor(*(dev_t *)key1) == minor(*(dev_t *)key2)) ? 0 : 1; | ^~~~~ That file (and many others) already has the proper #include with their respective guards, but scons wasn't defining them, resulting in implicit functions being used instead (and an always-true check that's probably breaking something down the line). Note that I'm cheating a bit here because Scons doesn't seem to have a clean way to detect the existence of major() et al. as functions or macros, so I'm taking the shortcut of just detecting the presence of the header and assuming its contents is what we expect. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-By: Jose Fonseca <jfonseca@vmware.com>
2019-08-22scons: define MESA_LLVM_VERSION_STRING like the other build systems doEric Engestrom1-0/+1
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2019-08-20build: Bump C++ standard requirement to C++14 to fix FTBFS with LLVM 10Kai Wasserbäch1-1/+1
When building Mesa against a recent LLVM 10 with C++11, the build fails if the AMD common code is built as well due to "std::index_sequence" being undeclared. LLVM requires a minimum of C++14. Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org> Acked-by: Eric Engestrom <eric@engestrom.ch>
2019-08-02gallium/utils: drop PIPE_SUBSYSTEM_WINDOWS_USEREric Engestrom1-2/+0
This is basically just an alias for PIPE_OS_WINDOWS. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2019-08-02scons: rename PIPE_SUBSYSTEM_EMBEDDED to EMBEDDED_DEVICEEric Engestrom1-1/+1
It has nothing to do with the PIPE_SUBSYSTEM_* stuff from gallium. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2019-07-31scons: Fix random_r check.Vinson Lee1-1/+1
Fixes: 597bddad47e8 ("scons: Test for random_r()") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Matt Turner <mattst88@gmail.com>
2019-07-30scons+meson: suppress spammy build warning on MacOSEric Engestrom1-0/+1
Originally introduced in c7f36574506838274460 ("darwin: Suppress type conversion warnings for GLhandleARB") to fix Bugzilla #66346 [1], this workaround was never ported to Scons or Meson. [1] https://bugs.freedesktop.org/66346 Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-07-30scons: Test for random_r()Matt Turner1-0/+3
Suggested-by: Eric Engestrom <eric.engestrom@intel.com>
2019-07-04scons: s/HAVE_NO_AUTOCONF/HAVE_SCONS/Eric Engestrom1-1/+1
Back when autotools and scons were the two build systems, it kinda made sense to call scons "not autoconf", but autoconf's been gone for a while now and other build systems have been added (android.mk and meson), so the name really doesn't make any sense anymore. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2019-06-21drisw: move build logic to build systemsEric Engestrom1-0/+3
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2019-05-24scons: fix build with llvm 9.Roland Scheidegger1-1/+4
The x86asmprinter component is gone, and things seem to work by just removing it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110707 Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-05-24scons: For MinGW use -posix flag.Michel Zou1-1/+1
Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
2019-03-12scons: Compatibility with Scons development version stringpal10002-2/+14
This ensures Mesa3D build doesn't fail in this case as encountered when bisecting Scons source code while regression testing https://bugs.freedesktop.org/show_bug.cgi?id=109443 and when testing 3.0.5.a.2 Technical details: Scons version string has consistently been in this format: MajorVersion.MinorVersion.Patch[.alpha/beta.yyyymmdd] so these formulas should strip alpha/beta flags and return Scons version: - as string - `'.'.join(SCons.__version__.split('.')[:3])` - as tuple of integers - `tuple(map(int, SCons.__version__.split('.')[:3]))` - v2: Fixed Scons version retrieval formulas as string and tuple of integers. - v3: Fixed Scons version string format description. Cc: "19.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-02-28scons: Workaround failures with MSVC when using SCons 3.0.[2-4].Jose Fonseca1-1/+7
This change applies the workaround suggested by Bill Deegan on the affected SCons versions. It also adds a comment with the URL explaining why we were using customizing the decider and max_drift in the first place, as I had forgotten all about it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109443 Tested-by: liviuprodea@yahoo.com Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2018-10-30scons: drop unused HAVE_STDINT_H macroEric Engestrom1-3/+0
This was required back when MSVC didn't support C99 and was missing this header, but since MSVC 2013 (or maybe earlier?) this isn't it does and this code isn't doing anything anymore. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-10-26scons/svga: remove opt from the list of valid build typesBrian Paul1-5/+3
This reverts commit a5fd54f8bf6713312fa5efd7ef5cd125557a0ffe. The whole point was to add a way to pass -DVMX86_STATS to the build, but we can do that with a command line argument when we invoke scons. Reviewed-by: José Fonseca <jfonseca@vmware.com>
2018-08-16scons: Check for mako 0.8.0Dylan Baker1-0/+13
v2: - Use distutils to do the version checking Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107565 Acked-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2018-08-16scons: Require python 2.7Dylan Baker1-4/+0
less than 2.7 is not supported. v2: - Remove check for python >= 2.0, since we've already enforced 2.7 Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2018-06-18mesa: Unconditionally enable floating-point texturesTimothy Arceri1-4/+0
ARB_texture_float references US Patent #6,650,327 [1] which has a filing date of June 16 1998. According to [2], patents filed after 1995 expire 20 years from the filing date, giving an expiration of June 17 2018. [1] https://www.google.com/patents/US6650327 [2] https://en.wikipedia.org/wiki/Term_of_patent_in_the_United_States Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2018-06-02scons: Fix MinGW cross compilation with LLVM 5.0.Jose Fonseca1-1/+8
LLVM 5.0 requires additional Win32 libraries, and MinGW with pthreads. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2018-03-23meson/configure: detect endian.h instead of trying to guess when it's availableEric Engestrom1-0/+3
Cc: Maxin B. John <maxin.john@gmail.com> Cc: Khem Raj <raj.khem@gmail.com> Cc: Rob Herring <robh@kernel.org> Suggested-by: Jon Turney <jon.turney@dronecode.org.uk> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Cc: <mesa-stable@lists.freedesktop.org>
2018-03-19scons: need to split CC or things might failJose Fonseca1-1/+3
We've seen this fail internally. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2017-11-16threads,configure.ac,meson.build: define and use HAVE_TIMESPEC_GETNicolai Hähnle1-0/+3
Tested with Travis and Appveyor. v2: add HAVE_TIMESPEC_GET for non-Windows Scons builds v3: use check_functions in Scons (Eric) Cc: Rob Herring <robh@kernel.org> Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103674 Fixes: f1a364878431 ("threads: update for late C11 changes") Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk> (v2)
2017-09-25scons: use python3-compatible exceptionsEric Engestrom3-4/+4
These changes were generated using python's `2to3` tool. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-09-25scons: use python3-compatible listsEric Engestrom1-4/+4
These changes were generated using python's `2to3` tool. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-09-25scons: use python3-compatible list-key checkEric Engestrom1-5/+5
These changes were generated using python's `2to3` tool. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-09-25scons: use python3-compatible print()Eric Engestrom2-19/+19
These changes were generated using python's `2to3` tool. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102852 Reported-by: Alex Granni <liviuprodea@yahoo.com> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-09-19Scons: Add LLVM 5.0 supportAlexandru-Liviu Prodea1-1/+20
1 new required library - LLVMBinaryFormat Cc: "17.2" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org=/show_bug.cgi?id=3D102318 Signed-off-by: Alexandru-Liviu Prodea <liviuprodea@yahoo.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-09-03util: improve compiler guardEric Engestrom1-0/+16
Glibc 2.26 has dropped xlocale.h, but the functions needed (strtod_l() and strdof_l()) can be found in stdlib.h. Improve the detection method to allow newer builds to still make use of the locale-setting. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102454 Cc: Laurent Carlier <lordheavym@gmail.com> Cc: Emil Velikov <emil.l.velikov@gmail.com> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Laurent Carlier <lordheavym@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-07-14scons: split out check_header() helperEric Engestrom1-3/+12
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-07-06scons: Check for xlocale.h before defining HAVE_XLOCALE_H.Vinson Lee1-1/+3
Don't assume the header is present on some platforms - use the more robust CheckHeader() instead. glibc 2.26 removed xlocale.h. https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27 Fix this build error with glibc 2.26. Compiling src/util/strtod.c ... src/util/strtod.c:32:10: fatal error: xlocale.h: No such file or directory #include <xlocale.h> ^~~~~~~~~~~ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101657 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Tested-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-06-30scons: allow .inl file extensionTim Rowley1-1/+1
Intended for header files which are not meant to be included directly. Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
2017-05-04scons: update for LLVM 4.0Ben Boeckel1-2/+20
LLVMDemangle, LLVMGlobalISel, and LLVMDebugInfoMSF are new. Also update the comment to add irreader to the list of components. CC: <mesa-stable@lists.freedesktop.org> Reviewed-by: Chuck Atkins <chuck.atkins@kitware.com> Signed-off-by: Ben Boeckel <ben.boeckel@kitware.com> Acked-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>