Hi all,
I used to think the arch flag is only used to say "this function is only available on win32" or
to say the same for win64.
We do that e.g. in msvcp* dlls.
So i am not sure why those stubs like
@ stub -arch=win32 function
differ so heavy from stubs like
@ stub function
The last one silently gets ignored, but the one with the arch flag causes winebuild
to put some extra assembler code into the dll.
So is this intented?
If so, i would add ARM code for that case.(And we also should for other platforms)
André Hentschel nerv@dawncrow.de writes:
The last one silently gets ignored, but the one with the arch flag causes winebuild to put some extra assembler code into the dll.
So is this intented?
No. Try something like this:
diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c index bc483c9..755084e 100644 --- a/tools/winebuild/parser.c +++ b/tools/winebuild/parser.c @@ -385,7 +385,11 @@ static int parse_spec_stub( ORDDEF *odp, DLLSPEC *spec ) { odp->u.func.nb_args = 0; odp->link_name = xstrdup(""); - odp->flags |= FLAG_CPU(CPU_x86) | FLAG_CPU(CPU_x86_64); /* don't bother generating stubs for Winelib */ + /* don't bother generating stubs for Winelib */ + if (odp->flags & FLAG_CPU_MASK) + odp->flags &= FLAG_CPU(CPU_x86) | FLAG_CPU(CPU_x86_64); + else + odp->flags |= FLAG_CPU(CPU_x86) | FLAG_CPU(CPU_x86_64); return 1; }
Am 15.09.2010 19:44, schrieb Alexandre Julliard:
André Hentschel nerv@dawncrow.de writes:
The last one silently gets ignored, but the one with the arch flag causes winebuild to put some extra assembler code into the dll.
So is this intented?
No. Try something like this:
diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c index bc483c9..755084e 100644 --- a/tools/winebuild/parser.c +++ b/tools/winebuild/parser.c @@ -385,7 +385,11 @@ static int parse_spec_stub( ORDDEF *odp, DLLSPEC *spec ) { odp->u.func.nb_args = 0; odp->link_name = xstrdup("");
- odp->flags |= FLAG_CPU(CPU_x86) | FLAG_CPU(CPU_x86_64); /* don't bother generating stubs for Winelib */
- /* don't bother generating stubs for Winelib */
- if (odp->flags & FLAG_CPU_MASK)
odp->flags &= FLAG_CPU(CPU_x86) | FLAG_CPU(CPU_x86_64);
- else
return 1;odp->flags |= FLAG_CPU(CPU_x86) | FLAG_CPU(CPU_x86_64);
}
thx it works on arm. so as it is your code i would be glad if you add it please. but i guess you have to exclude other flag from the override, tell me if you have no time and i'll do it.