blob: 6b69e7fd5dadbcb4514bab47541a2ebf7fe6f363 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
From e506c4ea7e576e713fa64569b6784bdc22b3205f Mon Sep 17 00:00:00 2001
From: Ting Liu <ting.liu@nxp.com>
Date: Fri, 9 Oct 2020 13:13:13 +0530
Subject: [PATCH] add -fcommon to fix gcc 10 build issue
Fix:
| ...ld: src/aiop_logger.o:(.bss+0x0): multiple definition of `_debug_flag'; src/aiop_tool.o:(.bss+0x0): first defined here
| ...ld: src/aiop_logger.o:(.bss+0x2): multiple definition of `_verbose_flag'; src/aiop_tool.o:(.bss+0x2): first defined here
Reference: https://gcc.gnu.org/gcc-10/porting_to.html
As a workaround, legacy C code where all tentative definitions should be
placed into a common block can be compiled with -fcommon.
Upstream-Status: Pending
Signed-off-by: Ting Liu <ting.liu@nxp.com>
---
Makefile | 2 +-
1 files changed, 1 insertion(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index f10dda2..f568788 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ BINDIR = bin
# FLAGS
-CFLAGS = -Wall
+CFLAGS = -Wall -fcommon
#CFLAGS += -g -O0 # Enable for Debugging
CFLAGS += -I$(top_builddir)/include
CFLAGS += -I$(top_builddir)/src
--
2.17.1
|