gcc on superdome
Bob Proulx
bob@proulx.com
Thu Feb 5 16:16:00 GMT 2004
Balou Aggeliki wrote:
> Dear all in the GCC steering committee,
I am not on the steering committee. But I am a user of GCC.
> We would like to have a running version of gcc on our Superdome (running
> HP-UX 11.11). Please, could you inform me which version should I use and
> where can I find the patches for the ld linker (I had tried the 3.3.1
> version (installed from the depot) but had problems with the linker).
> I would be grateful for any suggestions as several of our users need to
> use gcc.
I am using GCC on HP-UX 11.11 quite successfully. I am using the
following versions.
binutils-2.14
gcc-3.3.2
First build and install binutils. Because the names are the same as
existing native programs I use a program prefix. 'as' becomes 'gas'.
Also, I do not want to use the shared libraries so I disable them.
binutils-2.14
./configure \
--prefix=/usr \
--mandir=\${prefix}/share/man \
--infodir=\${prefix}/share/info \
--program-prefix=g \
--disable-shared
After GNU binutils has been installed then build and install gcc. I
want to keep multiple versions of gcc on the system at the same time.
Therefore I use a program suffix of -3.3 in this case and version
specific libraries. I am only needing C and C++ so I specify only
those. I need to use the libstdc++.a files in perl shared libraries
and so I compile with -fPIC.
gcc-3.3.2
LIBCFLAGS="-O2" LIBCXXFLAGS="-O2 -fno-implicit-templates" \
./configure \
--prefix=/usr \
--mandir=\${prefix}/share/man \
--infodir=\${prefix}/share/info \
--program-suffix=-3.3 \
--with-as=/usr/bin/gas \
--with-gnu-as \
--enable-version-specific-runtime-libs \
--enable-languages=c,c++ \
--enable-cxx-flags='-fPIC'
The GCC build on HP-UX uses the native header files. In most cases
that is fine. But in some cases this can create spurious errors. The
header <ctypes.h> is one of those. This is the only patch I need at
this time to compile standard C code.
Change this:
#define isalpha(__c) (__SB_masks ? (int)__SB_masks[__c] & _ISALPHA
To this:
#define isalpha(__c) (__SB_masks ? (int)__SB_masks[(int)__c] & _ISALPHA
sed '/__SB_masks.__c/s/__c]/(int)__c]/' ./gcc/include/ctype.h \
> ./gcc/include/ctype.h.new
mv ./gcc/include/ctype.h.new ./gcc/include/ctype.h
Of course you may need a different set of options. You may want to
install in /usr/local instead of /usr for example. These are just the
options and configuration that I am using. YMMV.
Bob
More information about the Gcc
mailing list