libdrm_macros.h:79:4: error: size of unnamed array is negative
https://bugs.freedesktop.org/show_bug.cgi?id=104819
Bug ID: 104819
Summary: [libdrm build failure on 32 bit Ubuntu 16.04]
libdrm_macros.h:79:4: error: size of unnamed array is negative
Product: Mesa
Version: git
Hardware: x86 (IA32)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected], [email protected]
One of latest libdrm commits make libdrm fails to build on 32 bit Ubuntu 16.06. Builds fine on 64 bit and newer Ubuntus. Error:
make[4]: Entering directory '/<<BUILDDIR>>/libdrm-2.4.89+git1801270630.6f0f6c~oibaf~x/build/tests/amdgpu' ../../../tests/amdgpu/basic_tests.c: In function ‘amdgpu_userptr_test’:../../../tests/amdgpu/basic_tests.c:1397:2: warning: ignoring return value of ‘posix_memalign’, declared with attribute warn_unused_result [-Wunused-result]
posix_memalign(&ptr, sysconf(_SC_PAGE_SIZE), BUFFER_SIZE);
^
In file included from ../../../amdgpu/amdgpu_internal.h:35:0,
from ../../../tests/amdgpu/vm_tests.c:28:
../../../libdrm_macros.h: In function ‘drm_munmap’:
../../../libdrm_macros.h:79:4: error: size of unnamed array is negative
STATIC_ASSERT(LARGE_OFF_T % 2147483629 == 721 &&
^Makefile:616: recipe for target 'amdgpu_test-vm_tests.o' failed make[4]: *** [amdgpu_test-vm_tests.o] Error 1
make[4]: Leaving directory '/<<BUILDDIR>>/libdrm-2.4.89+git1801270630.6f0f6c~oibaf~x/build/tests/amdgpu'
Full build log including configure flags:
https://launchpadlibrarian.net/354844704/buildlog_ubuntu-xenial-i386.libdrm_2.4.89+git1801270630.6f0f6c~oibaf~x_BUILDING.txt.gz
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104819
--- Comment #1 from Robert Wahlstedt <[email protected]> --- Hi, There are two different drivers, a 64 bit driver and a 32 bit driver. Please make sure you have the 32 bit one. This sounds like the 64 bit driver has been downloaded. There are different bis consumed by a 32 bit int and a 64 int and this messes with thread safety which in turn messages with signals given by the operating system.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104819
--- Comment #2 from Fabio Pedretti <[email protected]> --- Note I am compiling the drm source from git. The same source builds fine on newer Ubuntu. Maybe it's something broken/old in the ubuntu 16.04 toolchain?
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104819
--- Comment #3 from Eric Engestrom <[email protected]> ---
I think you might be hitting a bug combining C++ compilers trying to compile C and autotools not being smart enough.
What happens if you try to build using Meson?
(If you've never used Meson before, Mesa has a good page describing how to use
it: https://mesa3d.org/meson.html)
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104819
--- Comment #4 from Emil Velikov <[email protected]> --- (In reply to Eric Engestrom from comment #3)
Quoted 6 lines
I think you might be hitting a bug combining C++ compilers trying to compile C and autotools not being smart enough.
What happens if you try to build using Meson?(If you've never used Meson before, Mesa has a good page describing how to use it: https://mesa3d.org/meson.html)
That's a lot of bull**** and you know it ;-) This is pre-processor stuff, where autotools or any build system doesn't care.
Issue is a missing config.h include in the C file. I'll send a patch in a moment.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=104819
Emil Velikov <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED--- Comment #5 from Emil Velikov <[email protected]> --- The following commit should resolve it. Although we might want to consider using gcc/clang -include config.h and drop the explicit includes from the code.
commit 10e85a8b7f28e80f5184919b2448ade18c19ca21
Author: Emil Velikov <[email protected]> Date: Mon Jan 29 14:51:31 2018 +0000
tests/amdgpu: add missing config.h include
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/1 meson,configure: include config.h automatically
This will prevent any more missing #include "config.h" bug, at the cost of having to recompile some files that didn't need to be when changing build options.
--- amdgpu/amdgpu_asic_id.c | 4 ---- amdgpu/amdgpu_bo.c | 4 ---- amdgpu/amdgpu_cs.c | 4 ---- amdgpu/amdgpu_device.c | 4 ---- amdgpu/amdgpu_gpu_info.c | 4 ---- amdgpu/amdgpu_internal.h | 4 ---- amdgpu/amdgpu_vamgr.c | 4 ---- amdgpu/amdgpu_vm.c | 4 ---- amdgpu/util_hash.c | 4 ---- amdgpu/util_hash.h | 4 ---- amdgpu/util_hash_table.c | 4 ---- amdgpu/util_hash_table.h | 4 ---- configure.ac | 1 + etnaviv/etnaviv_bo.c | 4 ---- etnaviv/etnaviv_bo_cache.c | 4 ---- etnaviv/etnaviv_cmd_stream.c | 4 ---- etnaviv/etnaviv_device.c | 4 ---- etnaviv/etnaviv_gpu.c | 4 ---- etnaviv/etnaviv_perfmon.c | 4 ---- etnaviv/etnaviv_pipe.c | 4 ---- exynos/exynos_drm.c | 4 ---- exynos/exynos_fimg2d.c | 4 ---- freedreno/freedreno_bo.c | 4 ---- freedreno/freedreno_bo_cache.c | 4 ---- freedreno/freedreno_device.c | 4 ---- freedreno/freedreno_pipe.c | 4 ---- freedreno/freedreno_priv.h | 4 ---- freedreno/freedreno_ringbuffer.c | 4 ---- freedreno/kgsl/kgsl_bo.c | 4 ---- freedreno/kgsl/kgsl_device.c | 4 ---- freedreno/kgsl/kgsl_pipe.c | 4 ---- freedreno/kgsl/kgsl_ringbuffer.c | 4 ---- freedreno/msm/msm_bo.c | 4 ---- freedreno/msm/msm_device.c | 4 ---- freedreno/msm/msm_pipe.c | 4 ---- freedreno/msm/msm_ringbuffer.c | 4 ---- intel/intel_bufmgr.c | 4 ---- intel/intel_bufmgr_fake.c | 4 ---- intel/intel_bufmgr_gem.c | 4 ---- intel/intel_decode.c | 4 ---- intel/mm.c | 4 ---- intel/mm.h | 4 ---- intel/test_decode.c | 4 ---- libkms/api.c | 4 ---- libkms/dumb.c | 4 ---- libkms/exynos.c | 4 ---- libkms/intel.c | 4 ---- libkms/internal.h | 4 ---- libkms/linux.c | 4 ---- libkms/nouveau.c | 4 ---- libkms/radeon.c | 4 ---- libkms/vmwgfx.c | 4 ---- meson.build | 2 +- nouveau/abi16.c | 4 ---- nouveau/bufctx.c | 4 ---- nouveau/nouveau.c | 4 ---- nouveau/pushbuf.c | 4 ---- omap/omap_drm.c | 4 ---- radeon/radeon_bo.c | 3 --- radeon/radeon_bo_gem.c | 3 --- radeon/radeon_cs.c | 3 --- radeon/radeon_cs_gem.c | 3 --- radeon/radeon_cs_space.c | 3 --- radeon/radeon_surface.c | 3 --- tegra/tegra.c | 4 ---- tests/amdgpu/amdgpu_test.c | 4 ---- tests/amdgpu/basic_tests.c | 4 ---- tests/amdgpu/bo_tests.c | 4 ---- tests/amdgpu/cs_tests.c | 4 ---- tests/amdgpu/deadlock_tests.c | 4 ---- tests/amdgpu/uvd_enc_tests.c | 4 ---- tests/amdgpu/vce_tests.c | 4 ---- tests/amdgpu/vcn_tests.c | 4 ---- tests/etnaviv/etnaviv_2d_test.c | 4 ---- tests/etnaviv/etnaviv_bo_cache_test.c | 4 ---- tests/exynos/exynos_fimg2d_test.c | 4 ---- tests/kms/kms-steal-crtc.c | 4 ---- tests/kms/kms-universal-planes.c | 4 ---- tests/kms/libkms-test-crtc.c | 4 ---- tests/kms/libkms-test-device.c | 4 ---- tests/kms/libkms-test-framebuffer.c | 4 ---- tests/kms/libkms-test-plane.c | 4 ---- tests/kms/libkms-test-screen.c | 4 ---- tests/modetest/buffers.c | 4 ---- tests/modetest/cursor.c | 4 ---- tests/modetest/modetest.c | 4 ---- tests/nouveau/threaded.c | 4 ---- tests/tegra/openclose.c | 4 ---- tests/util/format.c | 4 ---- tests/util/kms.c | 4 ---- tests/util/pattern.c | 4 ---- tests/vbltest/vbltest.c | 4 ---- xf86atomic.h | 4 ---- xf86drm.c | 3 --- xf86drmMode.c | 4 ---- 95 files changed, 2 insertions(+), 366 deletions(-)
amdgpu/amdgpu_asic_id.c +0 -4
@@ -22,10 +22,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <ctype.h> #include <stdio.h> #include <stdlib.h>
amdgpu/amdgpu_bo.c +0 -4
@@ -22,10 +22,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <stdio.h> #include <stdint.h>
amdgpu/amdgpu_cs.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <stdio.h> #include <string.h>
amdgpu/amdgpu_device.c +0 -4
@@ -28,10 +28,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <sys/stat.h> #include <errno.h> #include <string.h>
amdgpu/amdgpu_gpu_info.c +0 -4
@@ -22,10 +22,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <string.h>
amdgpu/amdgpu_internal.h +0 -4
@@ -25,10 +25,6 @@#ifndef _AMDGPU_INTERNAL_H_#define _AMDGPU_INTERNAL_H_ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <assert.h> #include <pthread.h>
amdgpu/amdgpu_vamgr.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <string.h> #include <errno.h>
amdgpu/amdgpu_vm.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "amdgpu.h" #include "amdgpu_drm.h" #include "xf86drm.h"
amdgpu/util_hash.c +0 -4
@@ -30,10 +30,6 @@* Zack Rusin <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "util_hash.h" #include <stdlib.h>
amdgpu/util_hash.h +0 -4
@@ -44,10 +44,6 @@#ifndef UTIL_HASH_H #define UTIL_HASH_H -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdbool.h> #include "libdrm_macros.h"
amdgpu/util_hash_table.c +0 -4
@@ -38,10 +38,6 @@*/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "util_hash_table.h" #include "util_hash.h"
amdgpu/util_hash_table.h +0 -4
@@ -34,10 +34,6 @@#ifndef U_HASH_TABLE_H_ #define U_HASH_TABLE_H_ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "libdrm_macros.h" /**
configure.ac +1 -0
@@ -25,6 +25,7 @@ AC_INIT([libdrm], [libdrm]) AC_CONFIG_HEADERS([config.h]) +CFLAGS+='-include config.h' AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux])
etnaviv/etnaviv_bo.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "etnaviv_priv.h" #include "etnaviv_drmif.h"
etnaviv/etnaviv_bo_cache.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "etnaviv_priv.h" #include "etnaviv_drmif.h"
etnaviv/etnaviv_cmd_stream.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <assert.h> #include "etnaviv_drmif.h"
etnaviv/etnaviv_device.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <linux/stddef.h> #include <linux/types.h>
etnaviv/etnaviv_gpu.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "etnaviv_priv.h" #include "etnaviv_drmif.h"
etnaviv/etnaviv_perfmon.c +0 -4
@@ -25,10 +25,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "etnaviv_priv.h" static int etna_perfmon_query_signals (struct etna_perfmon *pm,struct etna_perfmon_domain *dom)
etnaviv/etnaviv_pipe.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "etnaviv_priv.h" int etna_pipe_wait (struct etna_pipe *pipe,uint32_t timestamp,uint32_t ms)
exynos/exynos_drm.c +0 -4
@@ -24,10 +24,6 @@* Inki Dae <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <stdio.h> #include <string.h>
exynos/exynos_fimg2d.c +0 -4
@@ -23,10 +23,6 @@* OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <stdio.h> #include <string.h>
freedreno/freedreno_bo.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "freedreno_drmif.h" #include "freedreno_priv.h"
freedreno/freedreno_bo_cache.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "freedreno_drmif.h" #include "freedreno_priv.h"
freedreno/freedreno_device.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <sys/types.h> #include <sys/stat.h> #include <unistd.h>
freedreno/freedreno_pipe.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "freedreno_drmif.h" #include "freedreno_priv.h"
freedreno/freedreno_priv.h +0 -4
@@ -29,10 +29,6 @@#ifndef FREEDRENO_PRIV_H_ #define FREEDRENO_PRIV_H_ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <errno.h> #include <string.h>
freedreno/freedreno_ringbuffer.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <assert.h> #include "freedreno_drmif.h"
freedreno/kgsl/kgsl_bo.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "kgsl_priv.h" #include <linux/fb.h>
freedreno/kgsl/kgsl_device.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <sys/types.h> #include <sys/stat.h> #include <unistd.h>
freedreno/kgsl/kgsl_pipe.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "kgsl_priv.h"
freedreno/kgsl/kgsl_ringbuffer.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <assert.h> #include "freedreno_ringbuffer.h"
freedreno/msm/msm_bo.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "msm_priv.h" static int bo_allocate (struct msm_bo *msm_bo)
freedreno/msm/msm_device.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <sys/types.h> #include <sys/stat.h> #include <unistd.h>
freedreno/msm/msm_pipe.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "msm_priv.h" static int query_param(struct fd_pipe *pipe, uint32_t param,
freedreno/msm/msm_ringbuffer.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <assert.h> #include <inttypes.h>
intel/intel_bufmgr.c +0 -4
@@ -25,10 +25,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <string.h> #include <stdlib.h> #include <stdint.h>
intel/intel_bufmgr_fake.c +0 -4
@@ -34,10 +34,6 @@* the bugs in the old texture manager. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <string.h> #include <assert.h>
intel/intel_bufmgr_gem.c +0 -4
@@ -34,10 +34,6 @@* Dave Airlie <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <xf86drm.h> #include <xf86atomic.h> #include <fcntl.h>
intel/intel_decode.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <assert.h> #include <stdint.h> #include <stdlib.h>
intel/mm.c +0 -4
@@ -22,10 +22,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <assert.h>
intel/mm.h +0 -4
@@ -29,10 +29,6 @@#ifndef MM_H #define MM_H -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "libdrm_macros.h" struct mem_block {
intel/test_decode.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <string.h> #include <stdlib.h> #include <stdio.h>
libkms/api.c +0 -4
@@ -26,10 +26,6 @@**************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdlib.h> #include <string.h>
libkms/dumb.c +0 -4
@@ -26,10 +26,6 @@**************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdio.h> #include <stdlib.h>
libkms/exynos.c +0 -4
@@ -25,10 +25,6 @@* SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdio.h> #include <stdlib.h>
libkms/intel.c +0 -4
@@ -26,10 +26,6 @@**************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdio.h> #include <stdlib.h>
libkms/internal.h +0 -4
@@ -29,10 +29,6 @@#ifndef INTERNAL_H_ #define INTERNAL_H_ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "libdrm_macros.h" #include "libkms.h"
libkms/linux.c +0 -4
@@ -29,10 +29,6 @@* going from fd to pci id via fstat and udev. */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif #include <errno.h> #include <stdio.h> #include <stdlib.h>
libkms/nouveau.c +0 -4
@@ -26,10 +26,6 @@**************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdio.h> #include <stdlib.h>
libkms/radeon.c +0 -4
@@ -26,10 +26,6 @@**************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdio.h> #include <stdlib.h>
libkms/vmwgfx.c +0 -4
@@ -26,10 +26,6 @@**************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdlib.h> #include <string.h>
meson.build +1 -1
@@ -270,7 +270,7 @@ config_file = configure_file( configuration : config, output : 'config.h', ) -add_project_arguments('-DHAVE_CONFIG_H', language : 'c') +add_project_arguments('-include', 'config.h', language : 'c') inc_root = include_directories('.') inc_drm = include_directories('include/drm')
nouveau/abi16.c +0 -4
@@ -22,10 +22,6 @@* Authors: Ben Skeggs */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <stdlib.h> #include <stdint.h> #include <stddef.h>
nouveau/bufctx.c +0 -4
@@ -22,10 +22,6 @@* Authors: Ben Skeggs */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> #include <stdlib.h> #include <stdint.h>
nouveau/nouveau.c +0 -4
@@ -22,10 +22,6 @@* Authors: Ben Skeggs */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> #include <stdlib.h> #include <stdint.h>
nouveau/pushbuf.c +0 -4
@@ -22,10 +22,6 @@* Authors: Ben Skeggs */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> #include <stdlib.h> #include <stdint.h>
omap/omap_drm.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <linux/stddef.h> #include <linux/types.h>
radeon/radeon_bo.c +0 -3
@@ -29,9 +29,6 @@* Dave Airlie * Jérôme Glisse <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif #include <libdrm_macros.h> #include <radeon_bo.h> #include <radeon_bo_int.h>
radeon/radeon_bo_gem.c +0 -3
@@ -29,9 +29,6 @@* Dave Airlie * Jérôme Glisse <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif #include <stdio.h> #include <stdint.h> #include <stdlib.h>
radeon/radeon_cs.c +0 -3
@@ -1,6 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif #include "libdrm_macros.h" #include <stdio.h> #include "radeon_cs.h"
radeon/radeon_cs_gem.c +0 -3
@@ -29,9 +29,6 @@* Nicolai Haehnle <[email protected]> * Jérôme Glisse <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif #include <assert.h> #include <errno.h> #include <stdlib.h>
radeon/radeon_cs_space.c +0 -3
@@ -25,9 +25,6 @@*/ /* */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif #include <assert.h> #include <errno.h> #include <stdlib.h>
radeon/radeon_surface.c +0 -3
@@ -26,9 +26,6 @@* Authors: * Jérôme Glisse <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif #include <stdbool.h> #include <assert.h> #include <errno.h>
tegra/tegra.c +0 -4
@@ -22,10 +22,6 @@* OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include <errno.h> #include <fcntl.h> #include <string.h>
tests/amdgpu/amdgpu_test.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <string.h> #include <stdio.h> #include <stdlib.h>
tests/amdgpu/basic_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include <stdlib.h> #include <unistd.h>
tests/amdgpu/bo_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include "CUnit/Basic.h"
tests/amdgpu/cs_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include "CUnit/Basic.h"
tests/amdgpu/deadlock_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include <stdlib.h> #include <unistd.h>
tests/amdgpu/uvd_enc_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include <inttypes.h>
tests/amdgpu/vce_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include <inttypes.h>
tests/amdgpu/vcn_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include <inttypes.h>
tests/etnaviv/etnaviv_2d_test.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include <fcntl.h> #include <stdio.h> #include <string.h>
tests/etnaviv/etnaviv_bo_cache_test.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#undef NDEBUG#include <assert.h>
tests/exynos/exynos_fimg2d_test.c +0 -4
@@ -23,10 +23,6 @@* OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <stdio.h> #include <string.h>
tests/kms/kms-steal-crtc.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <fcntl.h> #include <signal.h>
tests/kms/kms-universal-planes.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <fcntl.h> #include <getopt.h> #include <stdbool.h>
tests/kms/libkms-test-crtc.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "libkms-test.h" struct kms_crtc *kms_crtc_create (struct kms_device *device,uint32_t id)
tests/kms/libkms-test-device.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include <string.h> #include <unistd.h>
tests/kms/libkms-test-framebuffer.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <string.h>
tests/kms/libkms-test-plane.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <string.h>
tests/kms/libkms-test-screen.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <string.h>
tests/modetest/buffers.c +0 -4
@@ -24,10 +24,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <assert.h> #include <errno.h> #include <stdio.h>
tests/modetest/cursor.c +0 -4
@@ -22,10 +22,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <assert.h> #include <errno.h> #include <stdio.h>
tests/modetest/modetest.c +0 -4
@@ -38,10 +38,6 @@* the mode has been programmed, along with possible test patterns. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <assert.h> #include <ctype.h> #include <stdbool.h>
tests/nouveau/threaded.c +0 -4
@@ -20,10 +20,6 @@* OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include <sys/ioctl.h> #include <dlfcn.h> #include <fcntl.h>
tests/tegra/openclose.c +0 -4
@@ -20,10 +20,6 @@* OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include <fcntl.h> #include <stdio.h> #include <unistd.h>
tests/util/format.c +0 -4
@@ -23,10 +23,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdint.h> #include <stdlib.h> #include <string.h>
tests/util/kms.c +0 -4
@@ -37,10 +37,6 @@* the mode has been programmed, along with possible test patterns. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdint.h> #include <stdio.h>
tests/util/pattern.c +0 -4
@@ -23,10 +23,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdint.h> #include <stdio.h> #include <stdlib.h>
tests/vbltest/vbltest.c +0 -4
@@ -24,10 +24,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <assert.h> #include <stdio.h> #include <stdlib.h>
xf86atomic.h +0 -4
@@ -34,10 +34,6 @@#ifndef LIBDRM_ATOMICS_H #define LIBDRM_ATOMICS_H -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#if HAVE_LIBDRM_ATOMIC_PRIMITIVES #define HAS_ATOMIC_OPS 1
xf86drm.c +0 -3
@@ -31,9 +31,6 @@* DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif #include <stdio.h> #include <stdlib.h> #include <stdbool.h>
xf86drmMode.c +0 -4
@@ -38,10 +38,6 @@* platforms find which headers to include to get uint32_t */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <limits.h> #include <stdint.h> #include <stdlib.h>
Signature · 7 lines
Cheers, Eric _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 1/1 meson,configure: include config.h automatically
This will prevent any more missing #include "config.h" bug, at the cost of having to recompile some files that didn't need to be when changing build options.
---
v2: forgot to make clean when testing autotools...
needed to move the CFLAGS line after all compile tests in configure.ac, and += doesn't work, so using CFLAGS="$CFLAGS foo" instead. (nothing besides configure.ac changed)
--- amdgpu/amdgpu_asic_id.c | 4 ---- amdgpu/amdgpu_bo.c | 4 ---- amdgpu/amdgpu_cs.c | 4 ---- amdgpu/amdgpu_device.c | 4 ---- amdgpu/amdgpu_gpu_info.c | 4 ---- amdgpu/amdgpu_internal.h | 4 ---- amdgpu/amdgpu_vamgr.c | 4 ---- amdgpu/amdgpu_vm.c | 4 ---- amdgpu/util_hash.c | 4 ---- amdgpu/util_hash.h | 4 ---- amdgpu/util_hash_table.c | 4 ---- amdgpu/util_hash_table.h | 4 ---- configure.ac | 2 ++ etnaviv/etnaviv_bo.c | 4 ---- etnaviv/etnaviv_bo_cache.c | 4 ---- etnaviv/etnaviv_cmd_stream.c | 4 ---- etnaviv/etnaviv_device.c | 4 ---- etnaviv/etnaviv_gpu.c | 4 ---- etnaviv/etnaviv_perfmon.c | 4 ---- etnaviv/etnaviv_pipe.c | 4 ---- exynos/exynos_drm.c | 4 ---- exynos/exynos_fimg2d.c | 4 ---- freedreno/freedreno_bo.c | 4 ---- freedreno/freedreno_bo_cache.c | 4 ---- freedreno/freedreno_device.c | 4 ---- freedreno/freedreno_pipe.c | 4 ---- freedreno/freedreno_priv.h | 4 ---- freedreno/freedreno_ringbuffer.c | 4 ---- freedreno/kgsl/kgsl_bo.c | 4 ---- freedreno/kgsl/kgsl_device.c | 4 ---- freedreno/kgsl/kgsl_pipe.c | 4 ---- freedreno/kgsl/kgsl_ringbuffer.c | 4 ---- freedreno/msm/msm_bo.c | 4 ---- freedreno/msm/msm_device.c | 4 ---- freedreno/msm/msm_pipe.c | 4 ---- freedreno/msm/msm_ringbuffer.c | 4 ---- intel/intel_bufmgr.c | 4 ---- intel/intel_bufmgr_fake.c | 4 ---- intel/intel_bufmgr_gem.c | 4 ---- intel/intel_decode.c | 4 ---- intel/mm.c | 4 ---- intel/mm.h | 4 ---- intel/test_decode.c | 4 ---- libkms/api.c | 4 ---- libkms/dumb.c | 4 ---- libkms/exynos.c | 4 ---- libkms/intel.c | 4 ---- libkms/internal.h | 4 ---- libkms/linux.c | 4 ---- libkms/nouveau.c | 4 ---- libkms/radeon.c | 4 ---- libkms/vmwgfx.c | 4 ---- meson.build | 2 +- nouveau/abi16.c | 4 ---- nouveau/bufctx.c | 4 ---- nouveau/nouveau.c | 4 ---- nouveau/pushbuf.c | 4 ---- omap/omap_drm.c | 4 ---- radeon/radeon_bo.c | 3 --- radeon/radeon_bo_gem.c | 3 --- radeon/radeon_cs.c | 3 --- radeon/radeon_cs_gem.c | 3 --- radeon/radeon_cs_space.c | 3 --- radeon/radeon_surface.c | 3 --- tegra/tegra.c | 4 ---- tests/amdgpu/amdgpu_test.c | 4 ---- tests/amdgpu/basic_tests.c | 4 ---- tests/amdgpu/bo_tests.c | 4 ---- tests/amdgpu/cs_tests.c | 4 ---- tests/amdgpu/deadlock_tests.c | 4 ---- tests/amdgpu/uvd_enc_tests.c | 4 ---- tests/amdgpu/vce_tests.c | 4 ---- tests/amdgpu/vcn_tests.c | 4 ---- tests/etnaviv/etnaviv_2d_test.c | 4 ---- tests/etnaviv/etnaviv_bo_cache_test.c | 4 ---- tests/exynos/exynos_fimg2d_test.c | 4 ---- tests/kms/kms-steal-crtc.c | 4 ---- tests/kms/kms-universal-planes.c | 4 ---- tests/kms/libkms-test-crtc.c | 4 ---- tests/kms/libkms-test-device.c | 4 ---- tests/kms/libkms-test-framebuffer.c | 4 ---- tests/kms/libkms-test-plane.c | 4 ---- tests/kms/libkms-test-screen.c | 4 ---- tests/modetest/buffers.c | 4 ---- tests/modetest/cursor.c | 4 ---- tests/modetest/modetest.c | 4 ---- tests/nouveau/threaded.c | 4 ---- tests/tegra/openclose.c | 4 ---- tests/util/format.c | 4 ---- tests/util/kms.c | 4 ---- tests/util/pattern.c | 4 ---- tests/vbltest/vbltest.c | 4 ---- xf86atomic.h | 4 ---- xf86drm.c | 3 --- xf86drmMode.c | 4 ---- 95 files changed, 3 insertions(+), 366 deletions(-)
amdgpu/amdgpu_asic_id.c +0 -4
@@ -22,10 +22,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <ctype.h> #include <stdio.h> #include <stdlib.h>
amdgpu/amdgpu_bo.c +0 -4
@@ -22,10 +22,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <stdio.h> #include <stdint.h>
amdgpu/amdgpu_cs.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <stdio.h> #include <string.h>
amdgpu/amdgpu_device.c +0 -4
@@ -28,10 +28,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <sys/stat.h> #include <errno.h> #include <string.h>
amdgpu/amdgpu_gpu_info.c +0 -4
@@ -22,10 +22,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <string.h>
amdgpu/amdgpu_internal.h +0 -4
@@ -25,10 +25,6 @@#ifndef _AMDGPU_INTERNAL_H_#define _AMDGPU_INTERNAL_H_ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <assert.h> #include <pthread.h>
amdgpu/amdgpu_vamgr.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <string.h> #include <errno.h>
amdgpu/amdgpu_vm.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "amdgpu.h" #include "amdgpu_drm.h" #include "xf86drm.h"
amdgpu/util_hash.c +0 -4
@@ -30,10 +30,6 @@* Zack Rusin <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "util_hash.h" #include <stdlib.h>
amdgpu/util_hash.h +0 -4
@@ -44,10 +44,6 @@#ifndef UTIL_HASH_H #define UTIL_HASH_H -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdbool.h> #include "libdrm_macros.h"
amdgpu/util_hash_table.c +0 -4
@@ -38,10 +38,6 @@*/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "util_hash_table.h" #include "util_hash.h"
amdgpu/util_hash_table.h +0 -4
@@ -34,10 +34,6 @@#ifndef U_HASH_TABLE_H_ #define U_HASH_TABLE_H_ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "libdrm_macros.h" /**
configure.ac +2 -0
@@ -539,6 +539,8 @@ if test "x$HAVE_ATTRIBUTE_VISIBILITY" = xyes; then AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler supports __attribute__(("hidden"))]) fi +CFLAGS="$CFLAGS -include config.h" + AC_SUBST(WARN_CFLAGS) AC_CONFIG_FILES([ Makefile
etnaviv/etnaviv_bo.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "etnaviv_priv.h" #include "etnaviv_drmif.h"
etnaviv/etnaviv_bo_cache.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "etnaviv_priv.h" #include "etnaviv_drmif.h"
etnaviv/etnaviv_cmd_stream.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <assert.h> #include "etnaviv_drmif.h"
etnaviv/etnaviv_device.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <linux/stddef.h> #include <linux/types.h>
etnaviv/etnaviv_gpu.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "etnaviv_priv.h" #include "etnaviv_drmif.h"
etnaviv/etnaviv_perfmon.c +0 -4
@@ -25,10 +25,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "etnaviv_priv.h" static int etna_perfmon_query_signals (struct etna_perfmon *pm,struct etna_perfmon_domain *dom)
etnaviv/etnaviv_pipe.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "etnaviv_priv.h" int etna_pipe_wait (struct etna_pipe *pipe,uint32_t timestamp,uint32_t ms)
exynos/exynos_drm.c +0 -4
@@ -24,10 +24,6 @@* Inki Dae <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <stdio.h> #include <string.h>
exynos/exynos_fimg2d.c +0 -4
@@ -23,10 +23,6 @@* OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <stdio.h> #include <string.h>
freedreno/freedreno_bo.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "freedreno_drmif.h" #include "freedreno_priv.h"
freedreno/freedreno_bo_cache.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "freedreno_drmif.h" #include "freedreno_priv.h"
freedreno/freedreno_device.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <sys/types.h> #include <sys/stat.h> #include <unistd.h>
freedreno/freedreno_pipe.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "freedreno_drmif.h" #include "freedreno_priv.h"
freedreno/freedreno_priv.h +0 -4
@@ -29,10 +29,6 @@#ifndef FREEDRENO_PRIV_H_ #define FREEDRENO_PRIV_H_ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <errno.h> #include <string.h>
freedreno/freedreno_ringbuffer.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <assert.h> #include "freedreno_drmif.h"
freedreno/kgsl/kgsl_bo.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "kgsl_priv.h" #include <linux/fb.h>
freedreno/kgsl/kgsl_device.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <sys/types.h> #include <sys/stat.h> #include <unistd.h>
freedreno/kgsl/kgsl_pipe.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "kgsl_priv.h"
freedreno/kgsl/kgsl_ringbuffer.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <assert.h> #include "freedreno_ringbuffer.h"
freedreno/msm/msm_bo.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "msm_priv.h" static int bo_allocate (struct msm_bo *msm_bo)
freedreno/msm/msm_device.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <sys/types.h> #include <sys/stat.h> #include <unistd.h>
freedreno/msm/msm_pipe.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include "msm_priv.h" static int query_param(struct fd_pipe *pipe, uint32_t param,
freedreno/msm/msm_ringbuffer.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <assert.h> #include <inttypes.h>
intel/intel_bufmgr.c +0 -4
@@ -25,10 +25,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <string.h> #include <stdlib.h> #include <stdint.h>
intel/intel_bufmgr_fake.c +0 -4
@@ -34,10 +34,6 @@* the bugs in the old texture manager. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <string.h> #include <assert.h>
intel/intel_bufmgr_gem.c +0 -4
@@ -34,10 +34,6 @@* Dave Airlie <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <xf86drm.h> #include <xf86atomic.h> #include <fcntl.h>
intel/intel_decode.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <assert.h> #include <stdint.h> #include <stdlib.h>
intel/mm.c +0 -4
@@ -22,10 +22,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <assert.h>
intel/mm.h +0 -4
@@ -29,10 +29,6 @@#ifndef MM_H #define MM_H -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "libdrm_macros.h" struct mem_block {
intel/test_decode.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <string.h> #include <stdlib.h> #include <stdio.h>
libkms/api.c +0 -4
@@ -26,10 +26,6 @@**************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdlib.h> #include <string.h>
libkms/dumb.c +0 -4
@@ -26,10 +26,6 @@**************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdio.h> #include <stdlib.h>
libkms/exynos.c +0 -4
@@ -25,10 +25,6 @@* SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdio.h> #include <stdlib.h>
libkms/intel.c +0 -4
@@ -26,10 +26,6 @@**************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdio.h> #include <stdlib.h>
libkms/internal.h +0 -4
@@ -29,10 +29,6 @@#ifndef INTERNAL_H_ #define INTERNAL_H_ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "libdrm_macros.h" #include "libkms.h"
libkms/linux.c +0 -4
@@ -29,10 +29,6 @@* going from fd to pci id via fstat and udev. */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif #include <errno.h> #include <stdio.h> #include <stdlib.h>
libkms/nouveau.c +0 -4
@@ -26,10 +26,6 @@**************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdio.h> #include <stdlib.h>
libkms/radeon.c +0 -4
@@ -26,10 +26,6 @@**************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdio.h> #include <stdlib.h>
libkms/vmwgfx.c +0 -4
@@ -26,10 +26,6 @@**************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdlib.h> #include <string.h>
meson.build +1 -1
@@ -270,7 +270,7 @@ config_file = configure_file( configuration : config, output : 'config.h', ) -add_project_arguments('-DHAVE_CONFIG_H', language : 'c') +add_project_arguments('-include', 'config.h', language : 'c') inc_root = include_directories('.') inc_drm = include_directories('include/drm')
nouveau/abi16.c +0 -4
@@ -22,10 +22,6 @@* Authors: Ben Skeggs */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif -#include <stdlib.h> #include <stdint.h> #include <stddef.h>
nouveau/bufctx.c +0 -4
@@ -22,10 +22,6 @@* Authors: Ben Skeggs */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> #include <stdlib.h> #include <stdint.h>
nouveau/nouveau.c +0 -4
@@ -22,10 +22,6 @@* Authors: Ben Skeggs */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> #include <stdlib.h> #include <stdint.h>
nouveau/pushbuf.c +0 -4
@@ -22,10 +22,6 @@* Authors: Ben Skeggs */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdio.h> #include <stdlib.h> #include <stdint.h>
omap/omap_drm.c +0 -4
@@ -26,10 +26,6 @@* Rob Clark <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <linux/stddef.h> #include <linux/types.h>
radeon/radeon_bo.c +0 -3
@@ -29,9 +29,6 @@* Dave Airlie * Jérôme Glisse <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif #include <libdrm_macros.h> #include <radeon_bo.h> #include <radeon_bo_int.h>
radeon/radeon_bo_gem.c +0 -3
@@ -29,9 +29,6 @@* Dave Airlie * Jérôme Glisse <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif #include <stdio.h> #include <stdint.h> #include <stdlib.h>
radeon/radeon_cs.c +0 -3
@@ -1,6 +1,3 @@ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif #include "libdrm_macros.h" #include <stdio.h> #include "radeon_cs.h"
radeon/radeon_cs_gem.c +0 -3
@@ -29,9 +29,6 @@* Nicolai Haehnle <[email protected]> * Jérôme Glisse <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif #include <assert.h> #include <errno.h> #include <stdlib.h>
radeon/radeon_cs_space.c +0 -3
@@ -25,9 +25,6 @@*/ /* */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif #include <assert.h> #include <errno.h> #include <stdlib.h>
radeon/radeon_surface.c +0 -3
@@ -26,9 +26,6 @@* Authors: * Jérôme Glisse <[email protected]> */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif #include <stdbool.h> #include <assert.h> #include <errno.h>
tegra/tegra.c +0 -4
@@ -22,10 +22,6 @@* OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include <errno.h> #include <fcntl.h> #include <string.h>
tests/amdgpu/amdgpu_test.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <string.h> #include <stdio.h> #include <stdlib.h>
tests/amdgpu/basic_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include <stdlib.h> #include <unistd.h>
tests/amdgpu/bo_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include "CUnit/Basic.h"
tests/amdgpu/cs_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include "CUnit/Basic.h"
tests/amdgpu/deadlock_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include <stdlib.h> #include <unistd.h>
tests/amdgpu/uvd_enc_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include <inttypes.h>
tests/amdgpu/vce_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include <inttypes.h>
tests/amdgpu/vcn_tests.c +0 -4
@@ -21,10 +21,6 @@* */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include <inttypes.h>
tests/etnaviv/etnaviv_2d_test.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include <fcntl.h> #include <stdio.h> #include <string.h>
tests/etnaviv/etnaviv_bo_cache_test.c +0 -4
@@ -24,10 +24,6 @@* Christian Gmeiner <[email protected]> */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#undef NDEBUG#include <assert.h>
tests/exynos/exynos_fimg2d_test.c +0 -4
@@ -23,10 +23,6 @@* OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdlib.h> #include <stdio.h> #include <string.h>
tests/kms/kms-steal-crtc.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <fcntl.h> #include <signal.h>
tests/kms/kms-universal-planes.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <fcntl.h> #include <getopt.h> #include <stdbool.h>
tests/kms/libkms-test-crtc.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include "libkms-test.h" struct kms_crtc *kms_crtc_create (struct kms_device *device,uint32_t id)
tests/kms/libkms-test-device.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdio.h> #include <string.h> #include <unistd.h>
tests/kms/libkms-test-framebuffer.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <string.h>
tests/kms/libkms-test-plane.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <string.h>
tests/kms/libkms-test-screen.c +0 -4
@@ -21,10 +21,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <string.h>
tests/modetest/buffers.c +0 -4
@@ -24,10 +24,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <assert.h> #include <errno.h> #include <stdio.h>
tests/modetest/cursor.c +0 -4
@@ -22,10 +22,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <assert.h> #include <errno.h> #include <stdio.h>
tests/modetest/modetest.c +0 -4
@@ -38,10 +38,6 @@* the mode has been programmed, along with possible test patterns. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <assert.h> #include <ctype.h> #include <stdbool.h>
tests/nouveau/threaded.c +0 -4
@@ -20,10 +20,6 @@* OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include <sys/ioctl.h> #include <dlfcn.h> #include <fcntl.h>
tests/tegra/openclose.c +0 -4
@@ -20,10 +20,6 @@* OTHER DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include <fcntl.h> #include <stdio.h> #include <unistd.h>
tests/util/format.c +0 -4
@@ -23,10 +23,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdint.h> #include <stdlib.h> #include <string.h>
tests/util/kms.c +0 -4
@@ -37,10 +37,6 @@* the mode has been programmed, along with possible test patterns. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <errno.h> #include <stdint.h> #include <stdio.h>
tests/util/pattern.c +0 -4
@@ -23,10 +23,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <stdint.h> #include <stdio.h> #include <stdlib.h>
tests/vbltest/vbltest.c +0 -4
@@ -24,10 +24,6 @@* IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <assert.h> #include <stdio.h> #include <stdlib.h>
xf86atomic.h +0 -4
@@ -34,10 +34,6 @@#ifndef LIBDRM_ATOMICS_H #define LIBDRM_ATOMICS_H -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#if HAVE_LIBDRM_ATOMIC_PRIMITIVES #define HAS_ATOMIC_OPS 1
xf86drm.c +0 -3
@@ -31,9 +31,6 @@* DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif #include <stdio.h> #include <stdlib.h> #include <stdbool.h>
xf86drmMode.c +0 -4
@@ -38,10 +38,6 @@* platforms find which headers to include to get uint32_t */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include <limits.h> #include <stdint.h> #include <stdlib.h>
Signature · 7 lines
Cheers, Eric _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH libdrm v2] meson, configure: include config.h automatically
Quoted 10 lines · Eric Engestrom
This will prevent any more missing
#include "config.h"bug, at the cost of having to recompile some files that didn't need to be when changing build options.Signed-off-by Eric Engestrom <[email protected]>---
v2: forgot tomake cleanwhen testing autotools...
needed to move the CFLAGS line after all compile tests in configure.ac, and+=doesn't work, so usingCFLAGS="$CFLAGS foo"instead. (nothing besides configure.ac changed)
I'm not sure how well this will work with non gcc/clang, yet anyone using those compilers is welcome to send us a patch ;-)
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel