Message ID | yddd3d3wzdr.fsf@manam.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
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
Dave Korn <dave.korn.cygwin@gmail.com> writes: > 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. Huh? I've done it exactly the way it had been in gcc/config.gcc before my patch series: case ${enable_threads} in "" | yes | win32) thread_file='win32' tmake_file="${tmake_file} i386/t-gthr-win32" ;; posix) thread_file='posix' tmake_file="i386/t-mingw-pthread ${tmake_file}" ;; esac Why should this suddenly be wrong in libgcc? Rainer
2011/11/7 Rainer Orth: > 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. > The following patch should correct this. Could you give it a try? > > Thanks. > Rainer > > > 2011-11-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> > > libgcc: > * config.host (i[34567]86-*-cygwin*): Move i386/t-mingw-pthread ... > (i[34567]86-*-mingw*): ... here. > (x86_64-*-mingw*): ... here. yup, seems to do the trick, n.b., this is on cygwin, not mingw32/mingw64.
On 08/11/2011 18:12, Rainer Orth wrote: > Dave Korn writes: > >> 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. > > Huh? I've done it exactly the way it had been in gcc/config.gcc before > my patch series: > > case ${enable_threads} in > "" | yes | win32) thread_file='win32' > tmake_file="${tmake_file} i386/t-gthr-win32" > ;; > posix) > thread_file='posix' > tmake_file="i386/t-mingw-pthread ${tmake_file}" > ;; > esac > > Why should this suddenly be wrong in libgcc? Hm. Well, it must have been inconsistent when it was added there in the first place, so I guess since it hasn't been a problem yet there's no need to fix it now. Patch is OK as-is then. cheers, DaveK
diff --git a/libgcc/config.host b/libgcc/config.host --- a/libgcc/config.host +++ b/libgcc/config.host @@ -593,11 +593,6 @@ i[34567]86-*-cygwin*) tmake_dlldir_file="i386/t-dlldir-x" fi tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin i386/t-crtfm i386/t-chkstk t-dfprules" - case ${target_thread_file} in - posix) - tmake_file="i386/t-mingw-pthread $tmake_file" - ;; - esac ;; i[34567]86-*-mingw*) extra_parts="crtbegin.o crtend.o crtfastmath.o" @@ -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