Commit Graph

320 Commits

Author SHA1 Message Date
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 2311e2adf0 scons: User friendly message for code generated files 2010-02-10 22:32:50 +00:00
José Fonseca 7b6fa78d86 scons: Eliminate mixed space/tabs. 2010-02-04 19:37:56 +00:00
José Fonseca 9f151f93e6 scons: Only override scons CC selection in the embedded platform. 2010-02-04 19:37:30 +00:00
José Fonseca 5cf88a4787 scons: Promote EMBEDDED from subsystem to full os. 2010-02-04 14:39:30 +00:00
José Fonseca 5a743d9c51 scons: Have MinGW target MSVCRT 7.0
Necessary for _aligned_malloc/free().
2010-02-04 10:38:35 +00:00
Alan Hourihane 7683271e63 another gcc 4.2.x check for mstackrealign 2010-01-29 10:22:50 +00:00
Alan Hourihane bd60e6cd5c add PIPE_SUBSYSTEM_EMBEDDED when embedded platform used 2010-01-28 15:34:10 +00:00
Vinson Lee 51ab599ddb scons: Do not use linker option '-Bsymbolic' on Mac OS X.
ld on Mac OS X does not recognize the option '-Bsymbolic'.
2010-01-28 01:34:40 -08:00
Alan Hourihane 1ecf505087 Duplicate CCVERSION check code to compensate for different env CC. 2010-01-27 12:46:46 +00:00
Vinson Lee 7d29afb3a2 scons: Use '-Werror=' option on GCC 4.2.x and greater.
The existing code only checked for GCC 4.2.x and 4.3.x.
2010-01-26 22:56:58 -08:00
Alan Hourihane 18bb614acf fix typo 2010-01-26 19:18:32 +00:00
Alan Hourihane 1019f0de11 only use -Werror flags with gcc 4.2.x and 4.3.x.
could use a better test here though.
2010-01-26 19:14:49 +00:00
Brian Paul 9b22427911 Merge branch 'mesa_7_7_branch'
Conflicts:

	src/mesa/drivers/dri/intel/intel_screen.c
	src/mesa/drivers/dri/intel/intel_swapbuffers.c
	src/mesa/drivers/dri/r300/r300_emit.c
	src/mesa/drivers/dri/r300/r300_ioctl.c
	src/mesa/drivers/dri/r300/r300_tex.c
	src/mesa/drivers/dri/r300/r300_texstate.c
2010-01-25 14:46:17 -07:00
Vinson Lee 6b55aacccb scons: Do not use ld options start-group and end-group on Darwin.
Mac OS X ld does not support these options.
2010-01-23 21:43:26 -08:00
José Fonseca a921458c16 scons: LLVM <-> MSVC integration tweaks. 2010-01-10 10:51:42 +00:00
José Fonseca dc6bcc92ee gallium: Provide alternative stdint.h and stdbool.h C99 headers, instead of ad-hoc definitions.
Everybody is using the C99's integer types. Everybody except Microsoft,
which in turns means everybody is including their own definitions of C99
integer types for MSVC, causing duplicate definitions when linking two
projects. This is the case of building Gallium and LLVM with MSVC.

Shipping alternative stdint.h and stdbool.h headers for MSVC allows us
to share a single definition. It also removes clutter from the Gallium
headers.
2010-01-10 10:39:29 +00:00
José Fonseca 321aef7da3 scons: Update the MSVC SA to match latest scons code. 2010-01-02 00:56:01 +00:00
José Fonseca 58d376ac42 scons: Axe generic.py.
Progs are now built together with the rest so no longer needed.
2010-01-02 00:55:29 +00:00
José Fonseca 8a318edd08 scons: Put glut and glew shared libraries into build/xxx/bin or lib.
Use bin subdir for windows dlls, lib for unices.
2010-01-02 00:01:43 +00:00
José Fonseca 2104cbb694 scons: Remove duplicated code. 2010-01-02 00:01:42 +00:00
José Fonseca b2e40643a3 scons: Disable version symlinking for DLLs.
Fixes windows build.
2010-01-02 00:01:42 +00:00
José Fonseca 3d747eded4 scons: Don't globally define WIN32_LEAN_AND_MEAN.
Some of the demo progams legitimately need the functionality
that's disabled by WIN32_LEAN_AND_MEAN.

Instead the solution should be to define WIN32_LEAN_AND_MEAN just before
including windows.h on a case by case basis.
2010-01-01 12:16:19 +00:00
José Fonseca 97e2c5ac0b scons: Expose convienience libraries to the host environment.
This fixes MinGW cross compilation build, recently broken due to the use
of convenience libraries in the GLSL preprocessor.
2010-01-01 11:00:58 +00:00
José Fonseca 8b7552673f scons: Put the configuration info in the build directory too.
It fixes cached configuration results from one platform being erroneously
used in other platforms.
2009-12-26 01:14:08 +00:00
José Fonseca b5a408bae5 llvmpipe: Install unit tests on build/xxx/bin 2009-12-23 16:38:50 +00:00
Brian Paul 09aa984494 Revert "scons: Pass -fno-strict-aliasing to gcc."
This reverts commit a2937a2f4e.

Per Jose's comment, We don't want this on master.
2009-12-11 10:11:45 -07:00
José Fonseca da3bc492d2 scons: Tweak MSVC release options.
Enable whole program optimizations and fast math.
2009-12-11 15:16:22 +00:00
José Fonseca a2937a2f4e scons: Pass -fno-strict-aliasing to gcc.
Strict aliasing tule violations were fixed on master, but
they're still causing problem in this branch, so disable this assumptions.

Do not apply this fix to master (revert when you merge).
2009-12-11 12:28:53 +00:00
José Fonseca 8c981b94dc scons: Make it work with MinGW build of LLVM 2.6.
LLVM 2.5 is no longer supported on windows.
2009-12-11 12:28:53 +00:00
José Fonseca 2348f6d490 scons: Promote pointer arithmetic to error.
All code covered by scons is being built on multiple OSes, so pointer
arithmetic must really be addressed when spotted.
2009-11-27 17:06:12 +00:00
José Fonseca 0b4ea45e8a util: Remove homegrown Windows KM profiler.
It's not sampling based so its results are biased towards functions called
many times.
2009-11-04 12:15:29 +00:00
José Fonseca ad0975f701 scons: Define _USE_MATH_DEFINES on MSVC. 2009-10-26 15:17:26 +00:00
José Fonseca bf48447caf scons: Hack LLVM support on Windows.
Doesn't quite work yet though, as small differences in the compilation flags
used when building LLVM and Mesa cause link failures for STL symbols.
2009-10-22 19:12:14 +01:00
José Fonseca 1acd891ed3 scons: Disable more MSVC pedantic security warnings. 2009-10-22 19:12:12 +01:00
José Fonseca 5ba645f0fb scons: Disable SSE intrinsics on MinGW.
-mstackrealign causes stack corruption on MinGW. And without it the ability
to use SSE instrinsics goes down the drain. Even if we use
__attribute__((force_align_arg_pointer)) for the functions we explicitly
use SSE instrinsics, the SSE code automatically generated by gcc will
cause assertion failures. What a nightmare.

Thankfully LLVM gets this right, so all runtime generated SSE code just
works. rtasm code doesn't assume 16byte alignment. Therefore the bulk of
our performance sensitive code is not affected by this.

Still, intrinsics can be convenient, and it would be nice
to get this working again some day, sp will try to get a reduced test
case.
2009-10-14 17:24:21 +01:00
José Fonseca 9ea277ba7a scons: Don't require -liberty on MinGW.
Not always present.
2009-09-24 13:12:50 +01:00
José Fonseca 1a9eec84bd scons: Drop gprof support for profile builds; tweak optimization flags instead.
gprof is useful for shared libraries, hence our drivers. Nevertheless
profilers like oprofile can benefit from disabling some relatively
minor optimizations for more accurate / complete results.
2009-09-20 18:09:34 +01:00
José Fonseca 459ea0095c llvmpipe: Make the code portable for MinGW. 2009-09-16 11:35:23 +01:00
José Fonseca d3f5a2e5ab scons: Allow to use only the WINDDK headers. 2009-09-14 20:12:02 +01:00
José Fonseca a4a4553a80 scons: Allow to use MS's DXSDK headers with MinGW. 2009-09-14 20:12:01 +01:00
José Fonseca b0b131b023 scons: Pass -mstackrealign option to gcc.
It is impossible to have gcc generate SSE code without it, as thirdparty
applications often call us with an unaligned stack pointer.
2009-09-09 21:48:50 +01:00
Vinson Lee 79f48c9f9e scons: Don't set LLVM_VERSION if one of the llvm-config calls fails.
Ubuntu 8.10 has llvm-config version 2.2, which doesn't have
nativecodegen. This triggers an exception.
2009-09-07 15:16:25 +01:00
José Fonseca 9216b4e7be scons: Used wrong exception class. 2009-09-04 19:38:35 +01:00
José Fonseca b9f56078cd scons: Don't use scons internal functions. 2009-09-04 19:34:11 +01:00
José Fonseca 836a9f0ae6 scons: Tool for LLVM. Gracefully disable llvmpipe if LLVM not found. 2009-09-01 12:26:00 +01:00
José Fonseca 556eecea67 llvmpipe: Allow to build without udis86. 2009-08-29 09:21:34 +01:00
José Fonseca 7b39194e2d scons: Handle Circular dependencies in the libraries. 2009-08-13 16:32:51 +01:00
Brian Paul b96ae1b2c4 Merge branch 'mesa_7_5_branch'
Conflicts:

	Makefile
	progs/glsl/multitex.c
	src/mesa/main/enums.c
	src/mesa/main/state.c
	src/mesa/main/texenvprogram.c
	src/mesa/main/version.h
2009-07-17 22:00:47 -06:00
José Fonseca 7325c1ebc8 scons: Monkey patch os.spawnve on Windows to become thread safe.
See also:
- http://bugs.python.org/issue6476
- http://scons.tigris.org/issues/show_bug.cgi?id=2449
2009-07-14 12:21:25 +01:00
José Fonseca 9a5ee12434 scons: Don't raise an exception when DXSDK is not found.
Unfortunately scons does not check if a tool exists before it invokes
its generate function.
2009-06-29 12:56:47 +01:00
José Fonseca bb8f3090ba scons: Disable optimizations only for gcc-4.2
gcc-4.2's optimizer has a strange bug where it looses code from inner
loops in certain situations. For example, if the appearently innocent
looking code below is compiled with gcc-4.2 -S -O1, the inner loop's
code is missing from the outputed assembly.

   struct Size {
      unsigned width;
   };

   struct Command {
      unsigned length;
      struct Size sizes[32];
   };

   extern void emit_command(void *command, unsigned length);

   void
   create_surface( struct Size size, unsigned faces, unsigned levels)
   {
      struct Command cmd;
      unsigned face;
      unsigned level;

      cmd.length = faces*levels*sizeof(cmd.sizes[0]);

      for(face = 0; face < faces; ++face) {
	 for(level = 0; level < levels; ++level) {
	    cmd.sizes[face*levels + level] = size;
	    // This should generate a shrl statement, but the whole for body
	    // disappears in gcc-4.2 -O1/-O2/-O3!
	    size.width >>= 1;
	 }
      }

      emit(&cmd, sizeof cmd.length + cmd.length);
   }

Note that this is not specific to MinGW's gcc-4.2 crosscompiler (the
version typically found in debian/ubuntu's mingw32 packages). gcc-4.2 on
Linux also displays the same error. gcc-4.3 and above gets this
correctly though.

Updated MinGW debian packages with gcc-4.3 are available from
http://people.freedesktop.org/~jrfonseca/debian/pool/main/m/
2009-06-28 11:12:22 +01:00
José Fonseca 72ad039d19 scons: Use -Bsymbolic linker option.
This prevents the error

  relocation R_X86_64_PC32 against symbol `_gl_DispatchTSD' can not be used when making a shared object; recompile with -fPIC

when building on x86_64 architecture.
2009-06-28 10:54:23 +01:00
José Fonseca 72aed16aee scons: Tool to build with DirectX SDK.
Also works with MinGW, as long as the path to the DirectX SDK top
directory is set in the DXSDK_DIR environment variable.
2009-06-26 19:57:47 +01:00
José Fonseca 25f6c936fe scons: Don't use C specific options with g++ 2009-06-26 19:57:46 +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 c6f71eabd8 Revert "scons: Debug build by default."
Per Brian's request.

This reverts commit 25f0c33bb3.
2009-06-17 15:24:06 +01:00
José Fonseca 25f0c33bb3 scons: Debug build by default.
Match what autotools and other build systems do by default.
2009-06-17 15:23:24 +01:00
Jakob Bornecrantz 2fe65e8f14 Merge branch 'mesa_7_5_branch' 2009-06-14 16:56:34 +02:00
Brian Paul a18e209edb Merge branch 'mesa_7_5_branch'
Conflicts:

	Makefile
	src/gallium/drivers/softpipe/sp_screen.c
	src/mesa/main/version.h
2009-06-26 17:07:07 -06:00
Brian Paul a04af335a4 Merge branch 'mesa_7_5_branch'
Conflicts:

	src/mesa/drivers/dri/i915/i915_tex_layout.c
	src/mesa/drivers/dri/i965/brw_wm_glsl.c
	src/mesa/drivers/dri/intel/intel_buffer_objects.c
	src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
	src/mesa/drivers/dri/intel/intel_pixel_draw.c
	src/mesa/main/enums.c
	src/mesa/main/texstate.c
	src/mesa/vbo/vbo_exec_array.c
2009-06-24 08:54:37 -06:00
Michel Dänzer 550a2fe1b7 scons: Indent abbreviated command line strings, so command messages stand out.
Also add ASPPCOMSTR.
2009-06-11 12:15:50 +02:00
José Fonseca 78dad27564 Revert "scons: Less aggressive optimizations for MSVC 64bit compiler."
This reverts commit fc7f924782.
2009-06-08 11:13:41 +01:00
José Fonseca fc7f924782 scons: Less aggressive optimizations for MSVC 64bit compiler.
MSVC 64bit compiler takes forever on some of the files.

Might want to revisit this again later.
2009-06-02 18:41:12 -07:00
José Fonseca 0f50c4fab8 scons: Output nice summary messages instead of long command lines.
You can still get the old behavior by passing the option quiet=no to scons.
2009-06-02 18:23:12 -07:00
Keith Whitwell 222d7841e9 scons: mingw is broken with -O1 and higher 2009-05-08 14:57:30 +01:00
José Fonseca 56c2cd7ae2 scons: Cleanup. 2009-04-17 09:49:41 +01:00
José Fonseca 71793e0f79 scons: Support winddk 6001.18002. 2009-04-14 21:43:10 +01:00
José Fonseca 5ccbccb3c1 scons: Recent Windows DDK do not include LIB.EXE.
Have to use LINK /LIB instead. The biggest problem is when the command
line is very long and all the options are included in a argument file --
link doesn't like if /LIB is included in the argument file.
2009-04-14 21:43:10 +01:00
José Fonseca a20bae3d17 scons: Get python extensions building correctly on windows. 2009-03-30 14:11:03 +01:00
José Fonseca b3e03ede3e scons: Move MSVC specific away from Mingw builds. 2009-03-25 21:01:49 +00:00
José Fonseca 26e27ba308 scons: Support building with the Windows SDK.
x86_64 is also supported.
2009-03-25 19:24:49 +00:00
José Fonseca 102cb5c9cd scons: Promote declaration-after-statement to error. Detect more warnings. 2009-03-16 12:01:44 +00:00
José Fonseca f22574be95 scons: Use -Wdeclaration-after-statement 2009-03-13 11:48:14 +00:00
José Fonseca 37f21fce3b Merge commit 'origin/gallium-0.1'
Conflicts:
	src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
	src/gallium/auxiliary/util/u_tile.c
2009-02-23 17:21:36 +00:00
José Fonseca 46728037a0 scons: Produce map files for debug builds too. 2009-02-18 15:05:23 +00:00
José Fonseca 6fe421cf46 scons: Unbreak mingw builds. 2009-02-12 12:59:58 +00:00
José Fonseca 73ccabc124 scons: Build DLLs/EXEs with more memory debugger friendlier settings. 2009-02-12 12:06:30 +00:00
José Fonseca 1e8177ee17 scons: Use parallel builds by default. 2009-02-10 18:13:05 +00:00
José Fonseca 9aa73cfae8 progs: Get more samples building on windows. 2009-02-01 12:00:17 +00:00
Keith Whitwell 9a7aeac49c scons: remove pedantic flag 2009-01-27 11:16:32 +00: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 9bf83fb016 scons: Build the progs into seperate dirs as well. 2009-01-24 15:56:28 +00:00
José Fonseca 017892636a scons: Use --enable-stdcall-fixup only when building DLLs. 2009-01-24 14:33:54 +00:00
José Fonseca 9bd39eb3af scons: Don't build the DRI drivers in a seperate dir.
DRI drivers can be build side by side with other non-DRI drivers, therefore
there is no need to build gallium twice.
2009-01-24 10:28:39 +00:00
José Fonseca 18170bb51b scons: Use a cache for built files.
Like ccache, but works on all OSes.
2009-01-23 21:01:16 +00:00
José Fonseca de29f5781a scons: Allow to specify the MSVS version on command line. 2009-01-23 17:09:51 +00:00
José Fonseca 42be0104a2 scons: Don't define UNICODE on windows builds.
It creates problems in many libraries (glut, glew) which are not unicode
aware.
2009-01-22 14:26:30 +00:00
José Fonseca 47ca0234dc scons: Use -std=gnu99
It a scary world out there: people use all sort of non standard C stuff,
and we must enable support for that in here in order to build.

-pedantic still warn us when we use that nonstandard though.
2009-01-16 15:16:55 +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 1781d7fa38 scons: Choose the appropriate MSVC CRT. 2009-01-08 12:05:03 +00:00
José Fonseca 26ba5ce0e8 scons: Choose the appropriate MSVC CRT. 2009-01-06 18:23:16 +00:00
José Fonseca 8ee1df0652 scons: Specify C99 throughout all the tree.
MSVC may not support full C99, but supports more than plain C90. And
-pedantic without -std=c99 generates too many spurious warnings
(specially C++ style comments) to be of any use.

Note that using certain C99 features in the cross-platform parts of Gallium
is still not possible; namely mid-of-scope variable declarations and named
structure initializers will break MSVC builds.
2009-01-05 15:24:56 +00:00
José Fonseca 975e58499a scons: Specify C99 throughout all the tree.
MSVC may not support full C99, but supports more than plain C90. And
-pedantic without -std=c99 generates too many spurious warnings
(specially C++ style comments) to be of any use.

Note that using certain C99 features in the cross-platform parts of Gallium
is still not possible; namely mid-of-scope variable declarations and named
structure initializers will break MSVC builds.
2008-12-30 17:13:38 +00:00
José Fonseca 500b304463 scons: Build progs.
Just demos and trivial dirs for starters.

Conflicts:

	.gitignore
2008-12-12 12:37:21 +09:00
Alan Hourihane ee0735fa2d Merge commit 'origin/gallium-0.1' into gallium-0.2 2008-12-09 16:17:45 +00:00
José Fonseca 129c6ed678 scons: Target Windows XP on userspace. 2008-12-01 11:53:26 -08:00
José Fonseca 72ebf4fd03 scons: Build progs.
Just demos and trivial dirs for starters.
2008-11-21 10:44:30 +09:00
Michal Krol 79bfe372f2 scons: Fix toolchain selection. 2008-11-20 23:01:53 +09:00
José Fonseca 15b92b09e0 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-20 23:01:43 +09:00
Michal Krol 4f3dcf3864 scons: Fix toolchain selection. 2008-11-19 20:31:38 +01: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
José Fonseca 40b3bb0407 gallium: Yet another WinCE portability fix. 2008-11-17 12:35:54 +09:00
Michel Dänzer 6b69e3c717 scons: ppc support. 2008-10-23 10:28:48 +02:00
José Fonseca 7cfc294c70 scons: Install shared libs in the right subdir. 2008-09-08 21:50:50 +09:00
José Fonseca 52c2dd1f73 scons: Install libGL.so and respective symlinks. 2008-09-08 07:54:15 +09:00
José Fonseca a6c7258394 scons: Optimize for speed, not size, with MSVC. 2008-09-02 02:16:58 +09:00
José Fonseca 4ec4ea14a5 scons: Lookup WINDDK and WINCE SDK directories in the registry. 2008-07-24 21:24:58 +09:00
José Fonseca c76787a1dc scons: Set default LIBS env var. 2008-07-18 01:20:44 +09:00
José Fonseca 381e3489c2 scons: Convert tabs to spaces. 2008-07-18 01:20:44 +09:00
Jonathan White e4f3770690 mesa: WinCE fixes 2008-07-16 16:11:38 -06:00
José Fonseca 9a99b19949 python: Don't use python cflags as they conflict with existing flags. 2008-07-15 17:58:48 +09:00
José Fonseca 2c4349aa3a python: Move the python scons code to a separate tool module. 2008-07-15 17:58:47 +09:00
José Fonseca 194cfc7a4e scons: Enable gcc SSE2 intrinsics on x86. 2008-07-04 22:28:57 +09:00
José Fonseca 27d8d6f44f scons: Add a env.CodeGenerate method to simplify code generation via python scripts.
env.CodeGenerate(
	target = 'my_source.c',
	script = 'my_generator.py',
	source = ['input.txt', 'another.txt'],
	command = 'python $SCRIPT $SOURCE > $TARGET'
)

It will take care generating all appropriate dependencies, including any
module imported by the generator script, and the respective .pyc file
side effects.
2008-07-03 15:06:24 +09:00
José Fonseca 846f87d826 scons: Output mapfile on windows ddk profile builds. 2008-07-01 22:04:01 +09:00
José Fonseca 05cfb4c4b8 scons: Get x86-64<->x86 cross build of assembly files right. 2008-06-27 13:41:23 +09:00
José Fonseca f78cc24c4b scons: Update to target WinCE 6.0. 2008-06-23 19:44:37 +09:00
José Fonseca b04aa714af scons: Put the tool logic in a frontend tool.
More logic can be shared between public and private branches this way.
2008-06-06 14:55:51 +09:00
José Fonseca b215d7d10c scons: Play nice with MS Embedded Visual C++. 2008-05-28 01:24:06 +09:00