Previous: Solaris Threads Issues, Up: Solaris-Specific Considerations


A.4.2 Building and Debugging 64-bit Applications

In a 64-bit application, all the sources involved must be compiled with the -m64 command-line option, and a specific GNAT library (compiled with this option) is required. The easiest way to build a 64bit application is to add -m64 --RTS=m64 to the gnatmake flags.

To debug these applications, a special version of gdb called gdb64 needs to be used.

To summarize, building and debugging a “Hello World” program in 64-bit mode amounts to:

          $ gnatmake -m64 -g --RTS=m64 hello.adb
          $ gdb64 hello

In addition, the following capabilities are not supported when using the -m64 option:

-fstack-check does not work together with -m64.
Any application combining these options crashes at startup time.
Call-chain backtrace computation does not work with -m64.
Thus the gnatbind switch -E is not supported.