blob: 73635fefa8092798c59a69d31196d1465845dea8 (
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
|
suppress built-in functions to avoid false positives
gcc knows j0 etc. are pure and excludes them from try.c, subverting
linkage test against libm.a and leading to link errors later.
Fetch from: http://github.com/arsv/perl-cross/commit/ce7fa56d3a40767135039e03517a4d9ef2f3aaa1
See discussion: https://github.com/arsv/perl-cross/issues/18
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
--- a/cnf/configure__f.sh
+++ b/cnf/configure__f.sh
@@ -222,7 +222,7 @@ function try_link_libs {
}
function try_link {
- try_link_libs $libs
+ try_link_libs $libs $*
}
function try_readelf {
--- a/cnf/configure_func.sh
+++ b/cnf/configure_func.sh
@@ -22,7 +22,7 @@ function hasfunc {
esac ;;
esac
try_add "int main(void) { $1($2); return 0; }"
- try_link
+ try_link -O0 -fno-builtin
resdef 'found' 'not found' "$_s"
}
|