Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Build Sources Using NonStop Cross-compilers

226 views
Skip to first unread message

PRATYUSH SINGH

unread,
Feb 27, 2018, 5:12:59 AM2/27/18
to
Hi

I am trying to build a project for NonStop. I am using Cygwin64 on Windows 7. I have already built the sources using cygwin's GCC, now I want to use the NS cross-compilers to do the same.

What all changes to makefiles,configure files do I need to make for changing the compiler ?

Thanks

Keith Dick

unread,
Feb 27, 2018, 10:11:11 AM2/27/18
to
When you installed the NonStop cross compiler, there should have been included an HTML document named UsingCommandLineCrossCompilers.htm, or something similar to that. Its first few sections contains the information needed for setting up your environment to use the cross compilers. Most of the rest of it are details needed only when using the Eclipse-based development environment or using embedded SQL in your programs, but the first few sections probably would be helpful for you.

The main things needed to be set up to use the cross compiler from the Windows command line are setting COMP_ROOT and PATH:

set COMP_ROOT=<Install-Dir>\HP NonStop\H06.nn
path %PATH%;%COMP_ROOT%\usr\bin

The H06.nn should be the exact release ID of the version of the cross compiler you installed. The cross compiler name is c89. There might also be a c99 included in more recent releases (I don't know whether they include that in the cross compilers).

You probably will have to modify the flags your make file passes to the c89 compiler if you use any that are not supported by c89. Check the flags you use against the documentation for the NonStop C/C++ compiler to find whether they mean the same as they do with GCC. You can get a list of the compiler flags by using the command c89 -Whelp but that gives only the syntax. If you want an explanation of the meaning of the flags, you can either look at the man page for c89 (or c99) in the OSS environment on your NonStop system, or look in the online manuals for the OSS Shell and Utilities manual (go to www.hpe.com/info/nonstop-docs, choose your NonStop software release, then search for that title).

You might have to include the flag –Wtarget=tns/e if you want to run your program on an Itanium-based NonStop system. If you will be running on a NonStop X system, that might be –Wtarget=tns/x (my copy of the document precedes the NonStop X, so I don't know for sure how it is designated). It might be that the default for target in your version of the cross compiler does match the system type you will be using, and if so, you will not need this flag.

If you want to run your program in the Guardian environment rather than the OSS environment, you will need the flag -Wsystype="guardian"

JShepherd

unread,
Feb 27, 2018, 1:46:21 PM2/27/18
to
In article <d2bb7017-18c7-42d7...@googlegroups.com>,
pratyus...@gmail.com says...
We found it can be a headache to get a makefile under cygwin
to build a project with the cross compilers.

It is especially painful when an open source project compiles executables
AND expects to be able to run them during the make.

The cross compiler pretty much deals with / has a path separator.

Problems arise with fully qualified paths because the windows based
cross compiler has no idea what /cydrive or /home is


#under cygwin using the L15.02 cross compiler
#this path must be in DOS format because the cross compiler is a windows app
export COMP_ROOT='C:\NSDEE\HP\L15.02'

# These must be in cygwin format and match COMP_ROOT above
PATH=/cygdrive/c/NSDEE/HP/L15.02/usr/bin:$PATH
PATH=/cygdrive/c/NSDEE/HP/L15.02/sqlmx:$PATH

In the make file, fully qualified paths in compiler directives
need to be in Windows format. Directives like -L, -l and -I

Most paths that are relative will work.

0 new messages