Pavel Pavlov | 6 May 05:49 2012
Picon

WinPhone8 and gcc, any info?

Hello all, it seems that cegcc is quite dead, or people who use it are happy with it (just like me).

 

I'm building my code for WinPhone7 and everything worked out of the box. I mainly use cegcc for code with att-style asm, or I use gnu assembler. I compile static libs with it and link it with regular tools from MS.

 

Now, with WinPhone8 it rejects the libs as invalid. Upcoming VisualStudio and Windows 8 have ARM support out of the box. armasm (which looks too similar to armasm that comes with arm's dev tools) lists three types of machine targets: arm, thumb, armce. Any idea what's different? Do they use different object format (quite unlikely), or they simply added different CPU id for otherwise identical objects?

 

Since Windows 8 ads native arm support, perhaps gcc/mingw will add full support for windows/arm as well. Any info on that?

 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@...
https://lists.sourceforge.net/lists/listinfo/cegcc-devel
Max Kellermann | 6 May 07:54 2012

Re: WinPhone8 and gcc, any info?

On 2012/05/06 05:49, Pavel Pavlov <pavel@...> wrote:
> Hello all, it seems that cegcc is quite dead, or people who use it
> are happy with it (just like me).

Did you know that I published cegcc with gcc 4.6.3 and other updates?

I started the 4.7 update, but ran into so many merge conflicts that I
postponed it.

> Now, with WinPhone8 it rejects the libs as invalid. Upcoming
> VisualStudio and Windows 8 have ARM support out of the box. armasm
> (which looks too similar to armasm that comes with arm's dev tools)
> lists three types of machine targets: arm, thumb, armce. Any idea
> what's different? Do they use different object format (quite
> unlikely), or they simply added different CPU id for otherwise
> identical objects?

Reportedly, WinPhone8 is based on the Windows 8 (desktop) kernel, not
on the WinCE kernel.  That may make a difference, even if only for the
OS declaration.  Try objdump on WinPhone7 and 8 (native) binaries and
look for differences.

Since there is only official support for CIL code on WinPhone, there
was no need for native code compatibility.

Max

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Vincent Torri | 6 May 09:09 2012
Picon

Re: WinPhone8 and gcc, any info?

On Sun, May 6, 2012 at 7:54 AM, Max Kellermann <max@...> wrote:
> On 2012/05/06 05:49, Pavel Pavlov <pavel@...> wrote:
>> Hello all, it seems that cegcc is quite dead, or people who use it
>> are happy with it (just like me).
>
> Did you know that I published cegcc with gcc 4.6.3 and other updates?
>
> I started the 4.7 update, but ran into so many merge conflicts that I
> postponed it.
>
>> Now, with WinPhone8 it rejects the libs as invalid. Upcoming
>> VisualStudio and Windows 8 have ARM support out of the box. armasm
>> (which looks too similar to armasm that comes with arm's dev tools)
>> lists three types of machine targets: arm, thumb, armce. Any idea
>> what's different? Do they use different object format (quite
>> unlikely), or they simply added different CPU id for otherwise
>> identical objects?
>
> Reportedly, WinPhone8 is based on the Windows 8 (desktop) kernel, not
> on the WinCE kernel.  That may make a difference, even if only for the
> OS declaration.  Try objdump on WinPhone7 and 8 (native) binaries and
> look for differences.
>
> Since there is only official support for CIL code on WinPhone, there
> was no need for native code compatibility.

i don't know if i have already suggested this to you, but you should
try to contact mingw-w64 developpers to see if you can integrate your
work in mingw-w64

regards

Vincent Torri

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
André Hentschel | 6 May 17:54 2012
Picon

Re: cegcc/mingw32ce with gcc 4.6.3

Am 13.03.2012 23:13, schrieb Max Kellermann:
> Hi,
> 
> I have updated my cegcc fork to gcc 4.6.3, here's my release
> 2012-03-13:
> 
>  http://max.kellermann.name/projects/cegcc/
>  http://max.kellermann.name/download/xcsoar/devel/cegcc/

It would be great to generate a mingw-arm that can compile for WoA (Win8 on ARM) and maybe also for CE.
mostly you need to change the machine type and provide the libs and includes (partly already there for the
x86 stuff).
WoA makes use of Thumb2, but there's no need to have compiler support for it.
I'd guess it's not that hard when you're familiar with the code.
We could make use of that in Wine for example.
E.g. crosscompiling Wine dlls missing in WoA to add additional functions, or simply crosscompile the testsuite.
I already was able to run WoA PEs (compiled with VS11beta) in Wine...
Thoughts?

--

-- 

Best Regards, André Hentschel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Pavel Pavlov | 7 May 03:19 2012
Picon

Re: WinPhone8 and gcc, any info?

> > Hello all, it seems that cegcc is quite dead, or people who use it
> > are happy with it (just like me).
>
> Did you know that I published cegcc with gcc 4.6.3 and other updates?
>
> I started the 4.7 update, but ran into so many merge conflicts that I
> postponed it.

Yes, I saw that. I also tried to port changes at some point to newer gcc, but eventually I had problems with
some dll's so I kept using older builds.

> > Now, with WinPhone8 it rejects the libs as invalid. Upcoming
> > VisualStudio and Windows 8 have ARM support out of the box. armasm
> > (which looks too similar to armasm that comes with arm's dev tools)
> > lists three types of machine targets: arm, thumb, armce. Any idea
> > what's different? Do they use different object format (quite
> > unlikely), or they simply added different CPU id for otherwise
> > identical objects?
>
> Reportedly, WinPhone8 is based on the Windows 8 (desktop) kernel, not
> on the WinCE kernel.  That may make a difference, even if only for the
> OS declaration.  Try objdump on WinPhone7 and 8 (native) binaries and
> look for differences.
>
> Since there is only official support for CIL code on WinPhone, there
> was no need for native code compatibility.

Yes, it seems that WinPhone8 sdk uses almost identical build of cl for arm as Windows8 (only a couple of
revisions different and some CRT quirks as usual). I tried to see why exiting pure arm libs from WinCE
aren't acceptable by tools from WinPhone8 and it seems that the issue is only in that Machine type header:
now it needs to be IMAGE_FILE_MACHINE_ARMNT (for Thumb-2, value is 0x01c4, not sure if it's already
published) instead of IMAGE_FILE_MACHINE_ARM or IMAGE_FILE_MACHINE_THUMB. Otherwise, it's pretty
much the same. So, cegcc tools could be patched to use different value for machine type and possibly it
could be accepted by tools from WP8.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

Gmane