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]

Skip ld --gc-sections tests for MinGW


This patch disables the ld --gc-sections tests for *-*-mingw*.

The "main" function has a compiler-generated call to "__main" on this
platform, which the testsuite does not handle, leading to the tests
failing with undefined references to __main if a compiler is available
when the testsuite is run.  Depending on the compiler version or
configuration there may also be a testsuite error arising from a
compiler warning "warning: -ffunction-sections may affect debugging on
some targets".

Tested with cross to i686-mingw32.  OK to commit?

2009-02-06  Joseph Myers  <joseph@codesourcery.com>

	* lib/ld-lib.exp (check_gc_sections_available): Return 0 for
	*-*-mingw*.

Index: ld/testsuite/lib/ld-lib.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/lib/ld-lib.exp,v
retrieving revision 1.58
diff -u -r1.58 ld-lib.exp
--- ld/testsuite/lib/ld-lib.exp	29 Jan 2009 09:03:13 -0000	1.58
+++ ld/testsuite/lib/ld-lib.exp	6 Feb 2009 15:06:13 -0000
@@ -1592,7 +1592,8 @@
 	# advertised by ld's options.
 	if { [istarget alpha*-*-*]
 	     || [istarget mep-*-*]
-	     || [istarget ia64-*-*] } {
+	     || [istarget ia64-*-*]
+	     || [istarget *-*-mingw*] } {
 	    set gc_sections_available_saved 0
 	    return 0
 	}

-- 
Joseph S. Myers
joseph@codesourcery.com


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