bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug report: bad check for ELF binary format


From: comex
Subject: Bug report: bad check for ELF binary format
Date: Mon, 30 Nov 2020 00:41:46 -0500

From m4/lib-prefix.m4:

--
  AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf],
    [AC_EGREP_CPP([Extensible Linking Format],
       [#ifdef __ELF__
        Extensible Linking Format
        #endif
       ],
       [gl_cv_elf=yes],
       [gl_cv_elf=no])
     ])
  if test $gl_cv_elf; then
—

I believe this does not work as intended.  'test $gl_cv_elf' is equivalent to 
'test -n $gl_cv_elf', i.e. it tests whether the variable is nonempty.  Both 
‘yes’ and ‘no’ are nonempty, so the ‘if’ will always be taken.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]