Re: C++ compilers on Linux supporting 64bit architecture?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 1) Is it possible to cross-compile on Linux 32 bit to produce an
> executable for the 64bit architecture Linux as well as 32 bit?

No, I don't think a 32bit only processor can produce 64bit binaries. The other 
way around is possible, if you run a 64bit version of Linux, you can produce 
32bit binaries. With gcc you simply use the command line flag -m32.

>
> 2) Can we expect an improvement in performance of such a command line
> (no GUI) program in Linux compared to Windows? The program performs
> massive math calculations and has been optimized to use the available
> resources well.

I work on a similar sort of math intensive project, that does support windows 
and linux, and only linux we use both 32 and 64 bit builds. The 64 bit builds 
run ~30% faster than the 32bit builds on the same machine. Note though, a lot 
of this improvement doesn't come from the 32-64 bit change, but likely other 
things the compiler does in 64 bit mode. I.e., the compiler knows that *all* 
64 bit machines have SSE2 instructions, and so by default enables this 
(-mfpmath=sse). Not all 32 bit nodes have SSE instructions so the compiler 
does not enable this there. However, if you know your 32 bit nodes do have 
SSE you can enable this by hand, and get 32 speeds much closer to the 64 bit 
ones.

>
> 3) The program is written in C++, would there be big porting issues
> moving it from Windows to Linux, code-wise?

Depends. My experience is yes, there are lots of little gotchas that can come. 
Depends exactly what external packages (STL, boost, etc.) you use and how 
deeply etc.

Chris

>
> I understand that this is not a Fedora question per se, but since
> Fedora is such a popular distribution I thought that the comparison
> and development questions may fit here anyway. Sorry if you all
> disagree...
>
> Grateful for any comment though.
>
> Bo Berglund


-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux