Commit Graph

20 Commits

Author SHA1 Message Date
Michel Zou 3f92d17894 scons: add py3 support
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-28 16:53:08 +00:00
Eric Engestrom bb66af95a7 scons: use python3-compatible exceptions
These changes were generated using python's `2to3` tool.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-09-25 12:05:47 +01:00
José Fonseca b6956aef74 scons: Search only for mingw-w64 cross-compilers.
Some distros still ship the non-mingw-w64 cross-compilers, but they are
can't build Mesa properly, as Jakob pointed out.
2014-06-06 13:15:37 +01:00
José Fonseca 8cabc7be1d scons: Don't force stabs debug format for Mingw.
- recent gdb handles DWARF fine (tested both with version
  7.1.90.20100730 from mingw-w64 project, and 7.5-1 from mingw project)

- http://people.freedesktop.org/~jrfonseca/bfdhelp/ was updated to
  handle DWARF

- stabs requires ugly hacks to prevent compilation failures

- mixing stabs/dwarf prevents proper backtraces (which is inevitable,
  given that the MinGW C runtime is pre-built with DWARF)

For example, without this change I get:

  (gdb) bt
  #0  _wassert (_Message=0xf925060 L"Num < NumOperands && \"Invalid child # of SDNode!\"",
      _File=0xf60b488 L"llvm/include/llvm/CodeGen/SelectionDAGNodes.h", _Line=534)
      at ../../../../mingw-w64-crt/misc/wassert.c:51
  #1  0x0368996b in _assert (_Message=0x39d7ee4 "Num < NumOperands && \"Invalid child # of SDNode!\"",
      _File=0x39d7e94 "llvm/include/llvm/CodeGen/SelectionDAGNodes.h", _Line=534)
      at ../../../../mingw-w64-crt/misc/wassert.c:44
  #2  0x00000004 in ?? ()
  #3  0x00000004 in ?? ()
  #4  0x0f60b488 in ?? ()
  #5  0x00000000 in ?? ()

While with this change I get:

  (gdb) bt
  #0  _wassert (_Message=0xfb982e8 L"Num < NumOperands && \"Invalid child # of SDNode!\"",
      _File=0xefbcb40 L"llvm/include/llvm/CodeGen/SelectionDAGNodes.h", _Line=534)
      at ../../../../mingw-w64-crt/misc/wassert.c:51
  #1  0x039c996b in _assert (_Message=0x3d17f24 "Num < NumOperands && \"Invalid child # of SDNode!\"",
      _File=0x3d17ed4 "llvm/include/llvm/CodeGen/SelectionDAGNodes.h", _Line=534)
      at ../../../../mingw-w64-crt/misc/wassert.c:44
  #2  0x033111cc in getOperand (Num=4, this=<optimized out>)
      at llvm/include/llvm/CodeGen/SelectionDAGNodes.h:534
  #3  getOperand (i=4, this=<optimized out>)
      at llvm/include/llvm/CodeGen/SelectionDAGNodes.h:779
  #4  llvm::SelectionDAG::getNode (this=0xf00cb08, Opcode=79, DL=..., VT=..., N1=..., N2=...)
      at llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2859
  #5  0x03377b20 in llvm::SelectionDAGBuilder::visitExtractElement (this=0xfb45028, I=...)
      at llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:2803
  [...]

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-05-21 12:34:19 +01:00
José Fonseca fb5995cf53 scons: Don't use gstabs on mingw-64. 2011-09-12 17:23:47 +01:00
José Fonseca 0646246cae scons: Move MinGW flags from crossmingw.py to gallium.py
So that they are used by native MinGW compilers too.
2011-09-06 13:18:58 +01:00
José Fonseca 191428ccb8 scons: Prefer x86_64-w64-mingw32- prefix.
This allows to use mingw-w64 binaries on debian systems which already
include a (typically incomplete) 64 cross compiler.
2011-08-30 09:42:01 +01:00
Brian Paul cdb7396390 scons: don't compile some files with -gstabs if using mingw32
Compiling some (large) files with i686-pc-mingw32-gcc 4.2.2 (at least)
and the -gstabs option triggers a compiler error.  Use this work-around
to simply compile the effected files without -gstabs.
2011-08-26 08:05:36 -06:00
José Fonseca 82e79e93ac scons: Eliminate libgcc_s_sjlj-1.dll dependency
Certain mingw32 cross compilers (e.g. RedHat's) defaults to use DLL gcc
runtime.

Given the main deliverable from this project are self-contained drivers,
which are loaded by any application, this dependency can cause havoc.
2011-02-03 09:16:49 +00:00
Vinson Lee a6e642be5c scons: Add MinGW-w64 prefixes for MinGW build. 2010-09-27 13:13:25 -07:00
José Fonseca f816937d77 scons: Add support for Mingw64. 2010-05-05 00:46:12 +01:00
José Fonseca 1f014a36f7 scons: Set -gstabs for C++ too. 2010-04-09 16:32:47 +01:00
Brian Paul eaf3ae58a9 scons: add another prefix for mingw32 on Fedora
(cherry picked from commit f1afb352daf0e74751c99254592eef863c64392a)
2010-02-10 16:34:24 -07:00
José Fonseca 5a743d9c51 scons: Have MinGW target MSVCRT 7.0
Necessary for _aligned_malloc/free().
2010-02-04 10:38:35 +00:00
José Fonseca 9ea277ba7a scons: Don't require -liberty on MinGW.
Not always present.
2009-09-24 13:12:50 +01:00
José Fonseca 3cf92e936a scons: Output the friendly "Linking ..." message when creating DLLs with MinGW. 2009-06-19 16:08:38 +01:00
José Fonseca 3d607ef37f scons: Request the stabs debug info format for Mingw.
Mingw gdb apparently chokes on dwarf debug info.
2009-01-26 20:28:04 +00:00
José Fonseca 017892636a scons: Use --enable-stdcall-fixup only when building DLLs. 2009-01-24 14:33:54 +00:00
José Fonseca 83155aa11f scons: Use .a suffix for MinGW.
This allows to build MinGW and MSVC within the same dir.
2009-01-14 11:40:31 +00:00
José Fonseca 6cf59e1293 scons: Support MinGW32 cross compiler.
To build an alternative opengl32.dll with Gallium's software-rasterizer from a
debian-based distribution run:

  sudo apt-get install mingw32
  scons platform=windows toolchain=crossmingw machine=x86 winsys=gdi dri=no
2008-11-18 19:13:32 +09:00