[libiberty] Make test for variables more robust

2021-05-03 Thread Eric Botcazou
Hi, the test for the presence of variables (really symbols) does not work when you add -Ox -flto to CFLAGS: for v in $vars; do AC_MSG_CHECKING([for $v]) AC_CACHE_VAL(libiberty_cv_var_$v, [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int *p;]],[[extern int $v []; p = $v;]])],

Re: [libiberty] Make test for variables more robust

2021-05-03 Thread Richard Biener via Gcc-patches
On Mon, May 3, 2021 at 9:51 AM Eric Botcazou wrote: > > Hi, > > the test for the presence of variables (really symbols) does not work when you > add -Ox -flto to CFLAGS: > > for v in $vars; do > AC_MSG_CHECKING([for $v]) > AC_CACHE_VAL(libiberty_cv_var_$v, > [AC_LINK_IFELSE([AC_LAN