summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorTorbjorn Granlund <tg@gmplib.org>2019-07-02 17:56:21 +0200
committerTorbjorn Granlund <tg@gmplib.org>2019-07-02 17:56:21 +0200
commiteadb9b8edc931d3dbf80fd62576c039f49082ba8 (patch)
treefa16048b54283890206e7378ad3cc7355db2ce14 /acinclude.m4
parentda2a1ed1c4c1d9494599582bab15c5c57a9c8d51 (diff)
downloadgmp-eadb9b8edc931d3dbf80fd62576c039f49082ba8.tar.gz
(GMP_C_DOUBLE_FORMAT): Compile conftest.c to executable in order to trigger final compile in case of LTO.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m417
1 files changed, 12 insertions, 5 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 8799c3746..bb3ee01bc 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -3306,9 +3306,16 @@ struct foo foo = {
{ '\001', '\043', '\105', '\147', '\211', '\253', '\315', '\357' },
-123456789.0,
{ '\376', '\334', '\272', '\230', '\166', '\124', '\062', '\020' },
-};]
+};
+int main(){
+ int i;
+ for (i = 0; i < 8; i++) {
+ printf ("%d %d %f\n", foo.before[i] + foo.after[i], foo.x);
+ }
+ return 0;
+}]
EOF
-gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >&AC_FD_CC 2>&1"
+gmp_compile="$CC $CFLAGS $CPPFLAGS conftest.c -o conftest >&AC_FD_CC 2>&1"
if AC_TRY_EVAL(gmp_compile); then
cat >conftest.awk <<\EOF
[
@@ -3461,11 +3468,11 @@ END {
}
]
EOF
- gmp_cv_c_double_format=`od -b conftest.$OBJEXT | $AWK -f conftest.awk`
+ gmp_cv_c_double_format=`od -b conftest | $AWK -f conftest.awk`
case $gmp_cv_c_double_format in
unknown*)
- echo "cannot match anything, conftest.$OBJEXT contains" >&AC_FD_CC
- od -b conftest.$OBJEXT >&AC_FD_CC
+ echo "cannot match anything, conftest contains" >&AC_FD_CC
+ od -b conftest >&AC_FD_CC
;;
esac
else