Euphoria
Ticket #329:
Generate eu.a and eudbg.a from MinGW 4.5.0 (latest stable) for Windows distribution
-
Reported by
jimcbrown
Nov 07, 2010
It is not necessary to create a MinGW package with MinGW-built eui, euc, etc. The only element necessary is to provide eu.a and eudbg.a - the run-time libraries. The translator will automatically use these when translating for MinGW, but if these are not distributed then the build will fail.
Details
1. Comment by SDPringle
Nov 07, 2010
We should use the align4 configure flag here for compatibility with old computers.
2. Comment by jimcbrown
Nov 07, 2010
I guess that is up to whoever builds it.
At one point we had a concensus that the Windows releases would be built with MANAGED_MEM (which back then implied ALIGN4 as well) so we'd have only one version for Windows, but it'd run on all versions.
I'm not sure where things now stand on this, but we should be consistent. Jeremy, since you're doing the Watcom build, can you comment?
3. Comment by jeremy
Nov 07, 2010
I don't think I have enough information to make a good decision. I understand ALIGN4 is a performance hit. How much of a performance hit? For example, if a process takes 2 seconds with ALIGN4 on Windows XP but without ALIGN4 it takes 250ms, there would be no way I'd make those > Win98 suffer that performance hit! However, 2 seconds w/ALIGN4 to 1.98 seconds w/o, who cares?
4. Comment by jimcbrown
Nov 07, 2010
For each allocated block of memory that is freed, this check is hit:
if (align4 && *(int *)(p-4) == MAGIC_FILLER)
if the OS does not require ALIGN4, then align4 is always false.
For every allocate, we have the following three checks:
alignment = ((unsigned long)p) & 7;
if (alignment == 0)
if (align4 && *(int *)(p-4) == MAGIC_FILLER)
I do not really have hard numbers, but isolating those statements and running them in a C program on Linux/GNU and timing it with time gives me this:
real 0m0.004s
user 0m0.000s
sys 0m0.000s
What I used:
gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.1)
Linux taoist 2.6.31-15-generic #50-Ubuntu SMP Tue Nov 10 14:53:52 UTC 2009 i386 AMD Turion(tm) X2 Dual-Core Mobile RM-70 AuthenticAMD GNU/Linux
cpu MHz : 2000.000 bogomips : 4000.11
And my C program
#define MAGIC_FILLER 0x1
int main(int argc, char ** argv)
{
int alignment, align4;
int * p = &align4;
align4 = 0;
alignment = ((unsigned long)p) & 7;
if (alignment == 0);
if (align4 && *(int *)(p-4) == MAGIC_FILLER);
return 0;
}
5. Comment by jeremy
Nov 07, 2010
I think we should probably have realtime discussions in IRC before the big release tomorrow. I don't want to make this decision on my own.
6. Comment by jimcbrown
Nov 08, 2010
Jeremy is using 4.4.0 instead of 4.5.0 for RC1, hopefully this won't cause any problems.
He'll build the MinGW libraries for distribution.