I support a legacy app that was written back in the 1990s. It originally ran under VxWorks with custom hardware,
variously 68k and PowerPC.
The first port I did was to Solaris. No byte-order issues and I kept the 32 bit ABI. It worked well.
When the Powers That Be decided to ditch Sun hardware and Solaris in favour of x86 and Linux I ported it to Linux.
Parts of the code weren't byte-order clean, but I worked through them. The code is heavily 32 bit dependent and
I never did create a viable 64 bit version (I tried, believe me...), so it runs on our last 32 bit server in the data center.
The service it supports is slowly dying so there's
no business case to spend any more time or money on it. If the business case existed I'd apply what I've learned in the
meantime and rewrite it from scratch anyway.
The Linux port was initially unstable. It would run for a random time, hours to weeks, then two threads would deadlock. After a couple
of years of letting it run and watching it crash I traced the deadlock to an "optimization"
that didn't actually do anything, with an if statement that had about a one in a trillion chance of going
the wrong way. I removed the optimization and the application has been running fine ever since.
...laura