There's a good chance you don't even need to recompile. Oracle guarantees backwards binary compatibility on Solaris:
Oracle Solaris Guarantee Program (valid through 12/31/2021)
Oracle Solaris is designed and tested to protect customer investments
in software.
While new functionality may be introduced in new releases, Oracle
Solaris is designed with continuity of binary interfaces, so
applications developed on earlier releases can continue to run. This
enables customers to purchase new systems or upgrade the OS on older
systems and continue to run their existing applications.
Customers and Partners who have purchased Oracle Premier Support for
Operating Systems can receive assistance in resolving compatibility
issues identified when moving a binary application from an earlier OS
release.
...
A binary application built on Solaris 2.6 or later that makes use of
operating system interfaces as defined in stability.5 run on
subsequent releases of Oracle Solaris, including their initial
releases and all updates, even if the application has not been
recompiled for those latest releases. If an application experiences a
compatibility problem when running on your latest supported Oracle
Solaris Operating System, support is offered as described below:
For Oracle Solaris 10
Use the integrated "appcert" utility (see the man page for appcert)
to check your application. If no errors are reported but problems
running the application remain, a Service Request (SR) should be
opened to obtain support.
For Oracle Solaris 11 and subsequent releases
The Preflight Application Checker tool is used to verify application
compatibility and can be downloaded from:
http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html.
The package includes documentation that describes how to check an
application for compatibility with Oracle Solaris.
...
Note that if you have an Oracle Solaris support contract, and your compiled application passes the above compatibility checks (appcheck for Solaris 10, "Preflight Application Checker tool" for Solaris 11), it's Oracle's problem, not yours. Even if the binary was compiled 20+ years ago on Solaris 2.6.
For another 14 months or so, anyway.
In my experience, your binary compiled on Solaris 10 will work just fine on Solaris 11 without being recompiled.