[igt-dev] [PATCH i-g-t 1/4] lib/igt_core: Make igt_subtest_jmpbuf/igt_dynamic_jmpbuf extern
Chris Wilson
chris at chris-wilson.co.uk
Mon Mar 16 23:11:36 UTC 2020
Quoting Lyude (2020-03-16 16:11:29)
> From: Lyude Paul <lyude at redhat.com>
>
> 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.
>
> Signed-off-by: Lyude Paul <lyude at redhat.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
One might be tempted to start marking up library private symbols.
-Chris
More information about the igt-dev
mailing list