diff options
author | Lyude Paul <lyude@redhat.com> | 2020-03-13 15:40:02 -0400 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2020-03-17 12:52:29 -0400 |
commit | 61ef576ea536d82776bd90af18cb6a590b22f520 (patch) | |
tree | 9afb6fb5aeae7a0668b68d94b2e4b216511190a3 /lib/igt_core.h | |
parent | 2634ecc516bcc97356721dcba9c3abb2634d58cd (diff) |
lib/igt_core: Make igt_subtest_jmpbuf/igt_dynamic_jmpbuf extern
Since gcc 10, -fno-common has become the default (vs. -fcommon). As a
result, gcc is much stricter about missing extern and static keywords
and causes our build to fail in anything including igt_core.h:
/usr/bin/ld:
lib/libigt-i915_gem_context_c.a(i915_gem_context.c.o):lib/igt_core.h:149:
multiple definition of `igt_dynamic_jmpbuf';
lib/libigt-drmtest_c.a(drmtest.c.o):lib/igt_core.h:149: first defined
here
/usr/bin/ld:
lib/libigt-i915_gem_context_c.a(i915_gem_context.c.o):lib/igt_core.h:148:
multiple definition of `igt_subtest_jmpbuf';
lib/libigt-drmtest_c.a(drmtest.c.o):lib/igt_core.h:148: first defined
here
So, fix this by marking these as extern and declaring them in
lib/igt_core.c.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'lib/igt_core.h')
-rw-r--r-- | lib/igt_core.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/igt_core.h b/lib/igt_core.h index c17a7ba8..fae5f59e 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -145,8 +145,8 @@ void __igt_fixture_end(void) __attribute__((noreturn)); __igt_fixture_complete()) /* subtest infrastructure */ -jmp_buf igt_subtest_jmpbuf; -jmp_buf igt_dynamic_jmpbuf; +extern jmp_buf igt_subtest_jmpbuf; +extern jmp_buf igt_dynamic_jmpbuf; typedef int (*igt_opt_handler_t)(int opt, int opt_index, void *data); #define IGT_OPT_HANDLER_SUCCESS 0 #define IGT_OPT_HANDLER_ERROR -2 |