hc
2024-08-19 eb6b9ee90f50f13c5abb885ce483802d6262f2b5
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
From ddb06335935ef1458fe98f99cdc5d5fe6757fd02 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Wed, 3 Oct 2018 19:06:40 +0200
Subject: [PATCH] Fix linking error on mips64el
 
Patch that was fixing build on mips64el was reverted:
https://github.com/brltty/brltty/commit/9e7d62c869d3c1cbe12dda8b0291a4692c193416
 
So fix the issue again, this time by checking if $(GCC) is available as
suggested by Arnout during review of buildroot patch:
https://patchwork.ozlabs.org/patch/972614
 
Fixes:
 - http://autobuild.buildroot.org/results/31f682838b3d3b2c7103b5c51f2aba0b89d4f630
 
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/brltty/brltty/pull/149]
---
 configure.ac | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
 
diff --git a/configure.ac b/configure.ac
index 1e2774abf..a488d3d52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -481,7 +481,12 @@ AC_CACHE_CHECK([for make relocatable object command], [brltty_cv_prog_make_objec
 case "${host_os}"
 in
    *)
-      brltty_cv_prog_make_object_relocatable="\$(LD) -r -o"
+      if test "${GCC}" = "yes"
+      then
+         brltty_cv_prog_make_object_relocatable="\$(CC) -shared -o"
+      else
+         brltty_cv_prog_make_object_relocatable="\$(LD) -r -o"
+      fi
       ;;
 esac])
 MKREL="${brltty_cv_prog_make_object_relocatable}"
-- 
2.17.1