aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/bridge-utils/bridge-utils/0003-libbridge-Modifying-the-AR-to-cross-toolchain.patch
blob: 586ebfec682d4de3d2c1dadff41bd2ec50ef2874 (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
From 99264c688ff98d8f0f237cba6c7098eb4d5a12a7 Mon Sep 17 00:00:00 2001
From: Joe MacDonald <joe_macdonald@mentor.com>
Date: Mon, 30 Oct 2017 13:48:33 -0400
Subject: [PATCH] libbridge: Modifying the AR to cross toolchain
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The Makefile uses the host “ar” tool when it should be using the ar from
the target toolchain.

Upstream-Status: Pending

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
---
 configure.ac          | 4 ++++
 libbridge/Makefile.in | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 66817bb..bcc6946 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,6 +12,10 @@ dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_RANLIB
+AN_MAKEVAR([AR], [AC_PROG_AR])
+AN_PROGRAM([ar], [AC_PROG_AR])
+AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
+AC_PROG_AR
 
 dnl Checks for header files.
 AC_HEADER_STDC
diff --git a/libbridge/Makefile.in b/libbridge/Makefile.in
index 7932bfe..bd55e9b 100644
--- a/libbridge/Makefile.in
+++ b/libbridge/Makefile.in
@@ -1,7 +1,7 @@
 
 KERNEL_HEADERS=-I@KERNEL_HEADERS@
 
-AR=ar
+AR=@AR@
 RANLIB=@RANLIB@
 
 CC=@CC@
-- 
2.17.1