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

[ace-bugs] Compilation options on HP-UX with aCC compiler

4 views
Skip to first unread message

Ville Lehtiniemi

unread,
Jan 26, 2003, 11:48:24 AM1/26/03
to
ACE VERSION: 5.3

HOST MACHINE and OPERATING SYSTEM:
HP-UX 11i (32-bit)

COMPILER NAME AND VERSION (AND PATCHLEVEL):
aCC: HP ANSI C++ B3910B A.03.37

CONTENTS OF $ACE_ROOT/ace/config.h:
---cut---
#ifndef ACE_CONFIG_H

// Custom configurations

// Build with reactor notification queue
#define ACE_HAS_REACTOR_NOTIFICATION_QUEUE 1

// Include the default configurations for HP-UX 11
#include "ace/config-hpux-11.00.h"

#endif /* ACE_CONFIG_H */
---cut---

CONTENTS OF $ACE_ROOT/include/makeinclude/platform_macros.GNU (unless
this isn't used in this case, e.g., with Microsoft Visual C++):
---cut---
# Compilation options for ACE
debug=0
optimize=1
inline=1
buildbits=32

# For compilation of ACE_SSL: openSSL header and library locations
# To disable ACE_SSL compilation, set ssl=0
ssl=1
PLATFORM_SSL_CPPFLAGS = -I/usr/local/include
PLATFORM_SSL_LDFLAGS = -L/usr/local/lib
PLATFORM_SSL_LIBS = -lssl -lcrypto

# Include the default HP-UX+aCC definitions
include $(ACE_ROOT)/include/makeinclude/platform_hpux_aCC.GNU
---cut---

AREA/CLASS/EXAMPLE AFFECTED:
All

DOES THE PROBLEM AFFECT:
COMPILATION? Yes

SYNOPSIS:
The buildbits parameter on HP-UX 11 doesn't give you the
option to generate PA-RISC 2.0 code using the +DA2.0 and
+DS2.0 compiler options.

DESCRIPTION:
If I don't set the buildbits parameter when compiling the
ACE, then the used compiler option will be +DAportable, which
will generate PA-RICS 1.1 compatible code.

If I set the parameter buildbits=32, then the compilation
uses the parameters +DA1.1 and +DS1.1, which will also
generate PA-RICS 1.1 compatible code.

If I set the parameter buildbits=64, then the compilation
uses the parameters +DA2.0W and +DS2.0W, which generates
64bit PA-RISC code and can't be executed on 32 bit HP-UX.

However, none of the default options with the buildbits parameter
gives you the possibility to generate 32bit PA-RISC 2.0 code
using the compiler options +DA2.0 and +DS2.0.

I've fixed this by modifying the compiler options to generate
PA-RISC 2.0 compatible code when buildbits=32 parameter is set.
Now I have the following options where to chooce from:

no builtbits parameter
=> CCFLAGS += +DAportable
=> Produces 32bit PA-RICS 1.1 code
builtbits=32
=> CCFLAGS += +DA2.0 +DS2.0
=> Produces 32bit PA-RICS 2.0 code
builtbits=64
=> CCFLAGS += +DA2.0W +DS2.0W
=> Produces 64bit PA-RICS 2.0 code

Major benefit for using the PA-RISC 2.0 architechture is
performance, I got a 20-30% performance increase for my
application when it was compiled for PA-RICS 2.0 architecture
instead of 1.1 architecture. However, this depends on the
application and there's no way of telling until you test it.

More information about these compilation options can be
read from here:
http://h21007.www2.hp.com/dspp/tech/tech_TechSingleTipDetailPage_IDX/1,2366,415,00.html


SAMPLE FIX/WORKAROUND:
Modify the file $(ACE_ROOT)/include/makeinclude/platform_hpux_aCC.GNU
as following:

/tmp>diff platform_hpux_aCC.GNU.ORIG platform_hpux_aCC.GNU
146c146,147
< CCFLAGS += +DA1.1 +DS1.1
---
> CCFLAGS += +DA2.0 +DS2.0
> LDFLAGS += -Wl,+vnocompatwarnings
/tmp>

Steve Huston

unread,
Jan 27, 2003, 11:48:05 AM1/27/03
to
Hi Ville,

Thanks for the PRF!

I'll look at a way to implement this when I have a chance. Thanks for
the thorough explanation!

-Steve

"Ville Lehtiniemi" <gude...@ees2.oulu.fi> wrote in message
news:<200301261647...@stekt32.oulu.fi>...

0 new messages