Jeegar Patel
Jeegar Patel

Reputation: 27230

Is there any any way to compile & run program as big-endian on little endian pc?

see i have written one program for big endian now i dont have big endian machine but i want to check whether my program will works correctly or not on big endian so how can i check that on my little endian pc.?

Is there any online virtual big-endian compiler ?

note : i have googled about this but did not get anything.

Upvotes: 6

Views: 2846

Answers (2)

RavuAlHemio
RavuAlHemio

Reputation: 2371

Qemu is useful as an emulator/virtualizer, i.e. for running the program, but you'll need something to compile it in the first place.

Once you have chosen a big-endian architecture supported by qemu, for example PowerPC, you'll need a cross-compiler which runs on your PC but produces binaries for this architecture (e.g. PowerPC).

If you're very lucky, your distribution contains some binaries. However, in most cases, you might be forced to compile binutils, glibc and gcc yourself.

Upvotes: 4

thiton
thiton

Reputation: 36049

qemu can virtualize all sorts of architectures, amongst then big endian ones.

Upvotes: 7

Related Questions