[igt-dev] [PATCH i-g-t 2/4] lib/rendercopy_gen*: Make cc/viewport static
Lyude
lyude at redhat.com
Mon Mar 16 16:11:30 UTC 2020
From: Lyude Paul <lyude at redhat.com>
Since both rendercopy_gen8.c and rendercopy_gen9.c declare cc/viewport
variables without marking them as static, -fcommon also causes these to
make our builds fail:
/usr/bin/ld:
lib/libigt-rendercopy_gen9_c.a(rendercopy_gen9.c.o):lib/rendercopy_gen9.c:46:
multiple definition of `cc';
lib/libigt-rendercopy_gen8_c.a(rendercopy_gen8.c.o):lib/rendercopy_gen8.c:45:
first defined here
/usr/bin/ld:
lib/libigt-rendercopy_gen9_c.a(rendercopy_gen9.c.o):lib/rendercopy_gen9.c:51:
multiple definition of `viewport';
lib/libigt-rendercopy_gen8_c.a(rendercopy_gen8.c.o):lib/rendercopy_gen8.c:50:
first defined here
So, fix this by marking them as static.
Signed-off-by: Lyude Paul <lyude at redhat.com>
---
lib/rendercopy_gen8.c | 4 ++--
lib/rendercopy_gen9.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/rendercopy_gen8.c b/lib/rendercopy_gen8.c
index 8e02d846..bace64a7 100644
--- a/lib/rendercopy_gen8.c
+++ b/lib/rendercopy_gen8.c
@@ -39,12 +39,12 @@ static void dump_batch(struct intel_batchbuffer *batch) {
#define dump_batch(x) do { } while(0)
#endif
-struct {
+static struct {
uint32_t cc_state;
uint32_t blend_state;
} cc;
-struct {
+static struct {
uint32_t cc_state;
uint32_t sf_clip_state;
} viewport;
diff --git a/lib/rendercopy_gen9.c b/lib/rendercopy_gen9.c
index 835c8d80..f364c2b9 100644
--- a/lib/rendercopy_gen9.c
+++ b/lib/rendercopy_gen9.c
@@ -40,12 +40,12 @@ static void dump_batch(struct intel_batchbuffer *batch) {
#define dump_batch(x) do { } while(0)
#endif
-struct {
+static struct {
uint32_t cc_state;
uint32_t blend_state;
} cc;
-struct {
+static struct {
uint32_t cc_state;
uint32_t sf_clip_state;
} viewport;
--
2.24.1
More information about the igt-dev
mailing list