Link Here
|
|
|
1 |
--- aclocal.m4.orig 2018-03-25 21:22:32 UTC |
2 |
+++ aclocal.m4 |
3 |
@@ -648,6 +648,14 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS], |
4 |
$3="$$3 -D_HPUX_SOURCE" |
5 |
$5="$$5 -D_HPUX_SOURCE" |
6 |
;; |
7 |
+ arm*freebsd*) |
8 |
+ # On arm/freebsd, tell gcc to generate Arm |
9 |
+ # instructions (ie not Thumb) and to link using the gold linker. |
10 |
+ # Forcing LD to be ld.gold is done in FIND_LD m4 macro. |
11 |
+ $2="$$2 -marm" |
12 |
+ $3="$$3 -Wl,-z,noexecstack" |
13 |
+ $4="$$4 -z noexecstack" |
14 |
+ ;; |
15 |
arm*linux*) |
16 |
# On arm/linux and arm/android, tell gcc to generate Arm |
17 |
# instructions (ie not Thumb). |
18 |
@@ -656,6 +664,11 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS], |
19 |
$4="$$4 -z noexecstack" |
20 |
;; |
21 |
|
22 |
+ aarch64*freebsd*) |
23 |
+ $3="$$3 -Wl,-z,noexecstack" |
24 |
+ $4="$$4 -z noexecstack" |
25 |
+ ;; |
26 |
+ |
27 |
aarch64*linux*) |
28 |
$3="$$3 -Wl,-z,noexecstack" |
29 |
$4="$$4 -z noexecstack" |
30 |
@@ -1087,7 +1100,7 @@ AC_DEFUN([FP_PROG_AR], |
31 |
fp_prog_ar=$(cygpath -m $fp_prog_ar) |
32 |
fi |
33 |
else |
34 |
- AC_CHECK_TARGET_TOOL([fp_prog_ar], [ar]) |
35 |
+ AC_CHECK_TOOL([fp_prog_ar], [ar]) |
36 |
fi |
37 |
fi |
38 |
if test -z "$fp_prog_ar"; then |
39 |
@@ -1917,6 +1930,10 @@ case "$1" in |
40 |
# converts the canonicalized target into someting llvm can understand |
41 |
AC_DEFUN([GHC_LLVM_TARGET], [ |
42 |
case "$2-$3" in |
43 |
+ *-freebsd*-gnueabihf) |
44 |
+ llvm_target_vendor="unknown" |
45 |
+ llvm_target_os="freebsd-gnueabihf" |
46 |
+ ;; |
47 |
hardfloat-*eabi) |
48 |
llvm_target_vendor="unknown" |
49 |
llvm_target_os="$3""hf" |
50 |
@@ -2071,7 +2088,7 @@ AC_DEFUN([XCODE_VERSION],[ |
51 |
# |
52 |
AC_DEFUN([FIND_LLVM_PROG],[ |
53 |
# Test for program with and without version name. |
54 |
- AC_CHECK_TOOLS([$1], [$2-$3 $2], [:]) |
55 |
+ AC_CHECK_TOOLS([$1], [$2], [:]) |
56 |
if test "$$1" != ":"; then |
57 |
AC_MSG_CHECKING([$$1 is version $3]) |
58 |
if test `$$1 --version | grep -c "version $3"` -gt 0 ; then |
59 |
@@ -2361,19 +2378,12 @@ AC_DEFUN([FIND_LD],[ |
60 |
[enable_ld_override=yes]) |
61 |
|
62 |
find_ld() { |
63 |
- # Make sure the user didn't specify LD manually. |
64 |
- if test "z$LD" != "z"; then |
65 |
- AC_CHECK_TARGET_TOOL([LD], [ld]) |
66 |
- LD_NO_GOLD=$LD |
67 |
- return |
68 |
- fi |
69 |
- |
70 |
# Manually iterate over possible names since we want to ensure that, e.g., |
71 |
# if ld.lld is installed but gcc doesn't support -fuse-ld=lld, that we |
72 |
# then still try ld.gold and -fuse-ld=gold. |
73 |
for possible_ld in ld.lld ld.gold ld; do |
74 |
TmpLd="" # In case the user set LD |
75 |
- AC_CHECK_TARGET_TOOL([TmpLd], [$possible_ld]) |
76 |
+ AC_CHECK_TOOL([TmpLd], [$possible_ld]) |
77 |
if test "x$TmpLd" = "x"; then continue; fi |
78 |
|
79 |
out=`$TmpLd --version` |
80 |
@@ -2383,7 +2393,7 @@ AC_DEFUN([FIND_LD],[ |
81 |
FP_CC_LINKER_FLAG_TRY(bfd, $2) ;; |
82 |
"GNU gold"*) |
83 |
FP_CC_LINKER_FLAG_TRY(gold, $2) |
84 |
- LD_NO_GOLD=ld |
85 |
+ LD_NO_GOLD=LOCALBASE/bin/ld |
86 |
;; |
87 |
"LLD"*) |
88 |
FP_CC_LINKER_FLAG_TRY(lld, $2) ;; |