[Patch] Help find "atomicity.h" for target "mingw32"
Ranjit Mathew
rmathew@hotmail.com
Mon Dec 23 04:27:00 GMT 2002
Benjamin Kosnik wrote:
>> While trying to bootstrap the latest GCC 3.3 snapshot
>>for target "mingw32", I ran into compilation errors about
>>"Undefined macro __GTHREAD_MUTEX_INIT". It turns out
>>that "atomicity.h" was being picked up from "cpu/generic"
>>rather than "cpu/i486" ("mingw32" is an alias for
>>"i386-pc-mingw32", so target_cpu is set to "i386").
>
> Your patch will work for all cases where mingw32 is actually i486 and
> above, but I think a better approach might be to fix up the aliases so
> that target_cpu is accurate. This would mean
>
> for i386 and below
> "i386-pc-mingw32" -> target_cpu == i386
>
> for i486 and above
> "i386-pc-mingw32" -> target_cpu == i[456]86
I'm sorry, but I didn't understand this properly. :-(
(Especially when you say "...where mingw32 is actually i486
and above".)
But here's what I do think I understand:
The gcc toplevel config.sub script expands the target
alias "mingw32" to "i386-pc-mingw32".
i386 is the lowest CPU that MinGW programs can hope
to run on, using one of the 32-bit Windows OSs (Win9x/NT4/2K/XP).
From a message (http://article.gmane.org/gmane.comp.gnu.mingw.devel/287)
Danny posted to the mingw-devel list:
"Yes, The old contents of i386 dir were the same as current i486 (and
used asm instructions that only worked on i486 and higher - that was the
bug that finally got caught after many years and motivated the generic
atomicity.h)."
And also from the same message:
"Currently the cpu default for mingw is i586, but I think it should be
i686 since the latter gets better testing on Linux targets"
So the patch I submitted wouldn't terribly upset the state
of affairs, would it?
Awfully sorry if I'm totally off-track here. :-(
Sincerely Yours,
Ranjit.
--
Ranjit Mathew Email: rmathew AT hotmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/
More information about the Libstdc++
mailing list