On 07/11/2011 18:39, Rainer Orth wrote: > Christian Joensson <christian.joensson@ writes: > >> xgcc: error: unrecognized command line option ‘-pthread’ > [...] >> Note the --enable-threads=posix. >> >> Backing off to revision 180766 does not yield this problem, while >> 180767 has the problem. > > I erroneously moved the use of i386/t-mingw-pthread to the cygwin case.
As I just discovered! > The following patch should correct this. Could you give it a try? > 2011-11-07 Rainer Orth <ro@ > > libgcc: > * config.host (i[34567]86-*-cygwin*): Move i386/t-mingw-pthread ... > (i[34567]86-*-mingw*): ... here. > (x86_64-*-mingw*): ... here. That's not quite right (although it will probably work): > @@ -605,6 +600,9 @@ i[34567]86-*-mingw*) > win32) > tmake_file="$tmake_file i386/t-gthr-win32" > ;; > + posix) > + tmake_file="i386/t-mingw-pthread $tmake_file" > + ;; > esac > # This has to match the logic for DWARF2_UNWIND_INFO in > gcc/config/i386/cygming.h > if test x$enable_sjlj_exceptions = xyes; then > @@ -626,6 +624,9 @@ x86_64-*-mingw*) > win32) > tmake_file="$tmake_file i386/t-gthr-win32" > ;; > + posix) > + tmake_file="i386/t-mingw-pthread $tmake_file" > + ;; > esac > # This has to match the logic for DWARF2_UNWIND_INFO in > gcc/config/i386/cygming.h > if test x$enable_sjlj_exceptions = xyes; then Notice how in your additions, you prepend the t-mingw-pthread file to the list in $tmake_file rather than append it as the existing code does. Ordering of t-* files in $tmake_file is significant as there may be overrides and files should be listed from most generic to most target/os-specific, so please adjust those two hunks to match the way it's already being done. OK with that change. cheers, DaveK