Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)
If you wish to migrate your TNS C or C++ source code to TNS/R native mode, refer to the TNS/R
Native Application Migration Guide for issues related to migrating the code to TNS/R native mode.
To migrate a TNS program to TNS/E native mode, you can first convert it to TNS/R native mode,
then migrate the TNS/R native program to the TNS/E native environment. Refer to the H-Series
Application Migration Guide for information on migrating a TNS/R native program to the TNS/E
native environment (This document also applies to J-series RVUs. See also Chapter 10 (page 170),
which provides considerations for migrating to the TNS/R and TNS/E native environments.
TNS/R Development Tools on TNS/E Systems
In addition to the TNS/E native development tools, TNS/E systems also support the TNS/R native
development tools. You can compile and link TNS/R native programs to create TNS/R executable
object files on a TNS/E system, but you cannot run those files on the TNS/E system; you must move
them to a TNS/R system for execution. This capability enables you to do some of your TNS/R
development work on a TNS/E system while reserving your TNS/R systems for production use.
The following TNS/R tools are available on TNS/E systems running H06.05 and later H-series
RVUs and J-series RVUs:
• C and C++ compilers (c89 -Wtarget=TNS/R)
• non-position independent code linker (nld)
• PIC linker (ld)
• native object file utility (noft)
If your server is running the H06.03 or H06.04 RVU, use the HP Enterprise Toolkit—NonStop
Edition or servers running G-series RVUs for development tasks that require these tools.
System Compatibility
All versions of the TNS/R and TNS/E native C compilers (Guardian version, OSS version, and
the cross compilers on a PC) generate the same object code from the same source. You can develop
code on an NonStop system in the OSS or Guardian environment, or using NSDEE or ETK on a
PC.
File Compatibility
The native processing environments can execute native executable files; TNS/R native object files
execute in the TNS/R native environment, and TNS/E native object files execute in the TNS/E
native environment. The G-series TNS/R native processing environment can also execute TNS
interpreted files and TNS accelerated files in both the Guardian and OSS environments. In the
H-series and J-series TNS/E native processing environments, only the Guardian environment can
execute TNS interpreted and accelerated files; the OSS environment does not support TNS
interpreted and accelerated execution modes.
To reap any performance benefits from executing a TNS executable file on a RISC or Itanium
processor, the file needs to be accelerated. Two accelerator programs are provided, one to
accelerate programs for execution on a TNS/R system and one to accelerate programs for execution
on a TNS/E system. (A TNS/E-accelerated program can execute only in the H-series or J-series
Guardian environment, and not in the H-series or J-series OSS environment.) However, native
executable files running in a native environment still perform significantly faster than TNS-accelerated
files running on the same system.
The TNS/R and TNS/E native environments support position-independent code (PIC) files, which
enable programmers to create and use dynamic-link libraries (DLLs). By default, the TNS/R native
C compiler creates non-PIC object files; a compiler option flag is required to create PIC object files.
The TNS/E native C compiler creates only PIC object files; non-PIC files are not supported in the
TNS/E native environment. Native object files (PIC and non-PIC) cannot be linked together with
TNS interpreted object files or with TNS accelerated object files to create an executable file. PIC
files cannot be linked with non-PIC files.
32 The Development Environment