This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

[Craig Silverstein] PATCH: don't run zlib tests when zlib is not installed


Committed for Craig: don't run the compression tests if we couldn't
find zlib.

Ian


2008-04-07  Craig Silverstein  <csilvers@google.com>

	* configure.ac: Export new conditional variable HAVE_ZLIB.
	* testsuite/Makefile.am (flagstest_o_specialfile): Condition
	on HAVE_ZLIB.
	(flagstest_o_specialfile_and_compress_debug_sections): Likewise.
	* configure, Makefile.in, testsuite/Makefile.in: Rebuild.

--cut here--

Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gold/configure.ac,v
retrieving revision 1.27
diff -u -r1.27 configure.ac
--- configure.ac	7 Apr 2008 22:16:03 -0000	1.27
+++ configure.ac	8 Apr 2008 06:06:20 -0000
@@ -241,6 +241,7 @@
 
 # Link in zlib if we can.  This allows us to write compressed sections.
 AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
+AM_CONDITIONAL(HAVE_ZLIB, test "$ac_cv_search_zlibVersion" != "no")
 
 AC_LANG_PUSH(C++)
 
Index: testsuite/Makefile.am
===================================================================
RCS file: /cvs/src/src/gold/testsuite/Makefile.am,v
retrieving revision 1.56
diff -u -r1.56 Makefile.am
--- testsuite/Makefile.am	7 Apr 2008 22:16:03 -0000	1.56
+++ testsuite/Makefile.am	8 Apr 2008 06:06:20 -0000
@@ -536,13 +536,6 @@
 	fi
 
 
-# Test --compress-debug-sections.  FIXME: check we actually compress.
-check_PROGRAMS += flagstest_compress_debug_sections
-flagstest_compress_debug_sections: flagstest_debug.o gcctestdir/ld
-	$(CXXLINK) -Bgcctestdir/ -o $@ $< -Wl,--compress-debug-sections=zlib
-	test -s $@
-
-
 # Test -o when emitting to a special file (such as something in /dev).
 check_PROGRAMS += flagstest_o_specialfile
 flagstest_o_specialfile: flagstest_debug.o gcctestdir/ld
@@ -550,6 +543,15 @@
 	chmod a+x $@
 	test -s $@
 
+if HAVE_ZLIB
+
+# Test --compress-debug-sections.  FIXME: check we actually compress.
+check_PROGRAMS += flagstest_compress_debug_sections
+flagstest_compress_debug_sections: flagstest_debug.o gcctestdir/ld
+	$(CXXLINK) -Bgcctestdir/ -o $@ $< -Wl,--compress-debug-sections=zlib
+	test -s $@
+
+
 # The specialfile output has a tricky case when we also compress debug
 # sections, because it requires output-file resizing.
 check_PROGRAMS += flagstest_o_specialfile_and_compress_debug_sections
@@ -559,6 +561,8 @@
 	chmod a+x $@
 	test -s $@
 
+endif HAVE_ZLIB
+
 # Test symbol versioning.
 check_PROGRAMS += ver_test
 ver_test_SOURCES = ver_test_main.cc


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