This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

configure warning on cygwin


readelf doesn't do auto-exe magic on cygwin, which results in an ugly message 
to stderr in the middle of configure:

checking for .preinit_array/.init_array/.fini_array support... readelf: Error: 
Input file 'conftest' is not readable.
no

My first thought was to use $(EXEEXT) to work around readelf's need for an 
explicit extension.  But since cygwin executables aren't elf in the first 
place, and since EXEEXT is intentionally left undefined while configuring 
newlib because of cross-compiler bootstrap issues, it is easier (and still 
gives the correct result) to just squelch the message.

OK to apply?

2007-05-31  Eric Blake  <ebb9@byu.net>

	* configure.in (libc_cv_initfinit_array): Silence error on
	cygwin.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/newlib/configure.in,v
retrieving revision 1.37
diff -u -p -b -r1.37 configure.in
--- configure.in	24 May 2007 17:33:30 -0000	1.37
+++ configure.in	31 May 2007 21:50:33 -0000
@@ -381,7 +381,7 @@ EOF
 if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
 		   -static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD])
 then
-  if ${READELF} -S conftest | grep -e INIT_ARRAY > /dev/null; then
+  if ${READELF} -S conftest 2>/dev/null | grep -e INIT_ARRAY > /dev/null; then
     libc_cv_initfinit_array=yes
   else
     libc_cv_initfinit_array=no



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]