aboutsummaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-devtools/cst/files/0001-fix-err-msg-linking.patch
blob: a3f5c82883b095039370ebac2e6f6d0c5f8ecee6 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
NXP uses weaken to solve conflict in linking.
On Ubuntu 22.04(LTS) this fails to link cst with libcrypto.

The patch fixes the conflict in the code itself.
It restricts the scope of err_msg to the module.

Upstream-Status: Inappropriate [i.MX specific]
Signed-off-by: Walter Schweizer <walter.schweizer@siemens.com>
----
diff --git a/code/cst/code/build/make/rules.mk b/code/cst/code/build/make/rules.mk
index 1c0842b..9c46cc4 100644
--- a/code/cst/code/build/make/rules.mk
+++ b/code/cst/code/build/make/rules.mk
@@ -25,11 +25,11 @@ LFLAGS  := -t
 %.a:
 	@echo "Create archive $@"
 	$(AR) $(ARFLAGS) $@ $^
-ifneq ($(OSTYPE),mingw32)
-ifneq ($(OSTYPE),osx)
-	$(OBJCOPY) --weaken $@
-endif
-endif
+#ifneq ($(OSTYPE),mingw32)
+#ifneq ($(OSTYPE),osx)
+#	$(OBJCOPY) --weaken $@
+#endif
+#endif
 
 %.exe:
 	@echo "Link $@"
diff --git a/code/cst/code/front_end/src/acst.c b/code/cst/code/front_end/src/acst.c
index fb1e8aa..1e993ee 100644
--- a/code/cst/code/front_end/src/acst.c
+++ b/code/cst/code/front_end/src/acst.c
@@ -65,7 +65,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 /*===========================================================================
                             LOCAL VARIABLES
 =============================================================================*/
-char err_msg[MAX_ERR_MSG_BYTES];
+static char err_msg[MAX_ERR_MSG_BYTES];
 
 /*===========================================================================
                             LOCAL FUNCTION PROTOTYPES
diff --git a/code/cst/code/front_end/src/misc_helper.c b/code/cst/code/front_end/src/misc_helper.c
index 678dc17..9014b2a 100644
--- a/code/cst/code/front_end/src/misc_helper.c
+++ b/code/cst/code/front_end/src/misc_helper.c
@@ -60,7 +60,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 /*===========================================================================
                             LOCAL VARIABLES
 =============================================================================*/
-char err_msg[MAX_ERR_MSG_BYTES];
+static char err_msg[MAX_ERR_MSG_BYTES];
 
 /*===========================================================================
                             LOCAL FUNCTION PROTOTYPES