X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=scons%2Fgallium.py;h=72d8604169e13eef20028b13c3f1f03d0f5f2c22;hb=dcc64fcfed6904f6be41ee4b742c818e76b85712;hp=c2713992b36956d5ad67d90bcd1775c1a825ce51;hpb=6a9dd62882b9e2b57394a192cc66e886128df026;p=mesa.git diff --git a/scons/gallium.py b/scons/gallium.py index c2713992b36..72d8604169e 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -330,7 +330,7 @@ def generate(env): '__STDC_CONSTANT_MACROS', '__STDC_FORMAT_MACROS', '__STDC_LIMIT_MACROS', - 'HAVE_NO_AUTOCONF', + 'HAVE_SCONS', ] if env['build'] in ('debug', 'checked'): cppdefines += ['DEBUG'] @@ -352,6 +352,7 @@ def generate(env): '_DARWIN_C_SOURCE', 'GLX_USE_APPLEGL', 'GLX_DIRECT_RENDERING', + 'BUILDING_MESA', ] else: cppdefines += [ @@ -368,12 +369,23 @@ def generate(env): if check_functions(env, ['strtod_l', 'strtof_l']): cppdefines += ['HAVE_STRTOD_L'] + if check_functions(env, ['random_r']): + cppdefines += ['HAVE_RANDOM_R'] + if check_functions(env, ['timespec_get']): cppdefines += ['HAVE_TIMESPEC_GET'] if check_header(env, 'sys/shm.h'): cppdefines += ['HAVE_SYS_SHM_H'] + #FIXME: we should really be checking for the major()/minor() + # functions/macros in these headers, but check_functions()'s + # SConf.CheckFunc() doesn't seem to support macros. + if check_header(env, 'sys/mkdev.h'): + cppdefines += ['MAJOR_IN_MKDEV'] + if check_header(env, 'sys/sysmacros.h'): + cppdefines += ['MAJOR_IN_SYSMACROS'] + if platform == 'windows': cppdefines += [ 'WIN32', @@ -399,10 +411,8 @@ def generate(env): ] if env['build'] in ('debug', 'checked'): cppdefines += ['_DEBUG'] - if platform == 'windows': - cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_USER'] if env['embedded']: - cppdefines += ['PIPE_SUBSYSTEM_EMBEDDED'] + cppdefines += ['EMBEDDED_DEVICE'] env.Append(CPPDEFINES = cppdefines) # C compiler options @@ -471,7 +481,10 @@ def generate(env): '-fmessage-length=0', # be nice to Eclipse ] cflags += [ - '-Wmissing-prototypes', + '-Werror=implicit-function-declaration', + '-Werror=missing-prototypes', + '-Werror=return-type', + '-Werror=incompatible-pointer-types', '-std=gnu99', ] if icc: