Mailing List Archive

Build fix for using gcc with AIX
The build procedure of modperl under AIX is historically geared towards
using the IBM native C compiler (this is also what I use exclusively as
it produces better code). I have recently debugged the apaci build
variant with the help of some folks who attempted to compile modperl
with gcc, this did not work due to command line differences for linker
options. The patch below adds the -Xlinker command line option needed if
gcc is in use.

Index: apaci/mod_perl.config.sh
===================================================================
RCS file: /home/cvspublic/modperl/apaci/mod_perl.config.sh,v
retrieving revision 1.19
diff -u -d -r1.19 mod_perl.config.sh
--- apaci/mod_perl.config.sh 2000/09/26 20:15:06 1.19
+++ apaci/mod_perl.config.sh 2000/12/06 16:40:17
@@ -118,7 +118,14 @@
perl_lddlflags="`$perl_interp $config_pm -e 'print $Config{lddlflags}'`"

case "$os_version" in
- aix*) perl_lddlflags="$perl_lddlflags -bI:\$(APACHELIBEXEC)/httpd.exp" ;;
+ aix*)
+ case "$perl_cc" in
+ *gcc*)
+ XLINKER="-Xlinker "
+ ;;
+ esac
+ perl_lddlflags="$perl_lddlflags $XLINKER-bI:\$(APACHELIBEXEC)/httpd.exp"
+ ;;
* ) ;;
esac

@@ -150,7 +157,7 @@
if test $build_type = OBJ
then
case "$os_version" in
- aix*) perl_libs="$perl_libs -bE:\$(SRCDIR)/modules/perl/mod_perl.exp" ;;
+ aix*) perl_libs="$perl_libs $XLINKER-bE:\$(SRCDIR)/modules/perl/mod_perl.exp" ;;
* ) ;;
esac
fi

--
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone: +49 5131 709320
FAX: +49 5131 709325
Internet: jum@helios.de
Re: Build fix for using gcc with AIX [ In reply to ]
On Sun, 10 Dec 2000, Jens-Uwe Mager wrote:

> The build procedure of modperl under AIX is historically geared towards
> using the IBM native C compiler (this is also what I use exclusively as
> it produces better code). I have recently debugged the apaci build
> variant with the help of some folks who attempted to compile modperl
> with gcc, this did not work due to command line differences for linker
> options. The patch below adds the -Xlinker command line option needed if
> gcc is in use.

applied, thanks jens.

p.s.
last time i used aix was in 97, not sure if it was aix or the hardware,
but i've never felt a stronger urge to hit a computer with a sledgehammer.
wonder if it does the same to you ever?
Re: Build fix for using gcc with AIX [ In reply to ]
On Tue, Dec 19, 2000 at 11:00:27PM -0800, Doug MacEachern wrote:

> last time i used aix was in 97, not sure if it was aix or the hardware,
> but i've never felt a stronger urge to hit a computer with a sledgehammer.
> wonder if it does the same to you ever?

Well, that is probably due to the fact that AIX designers did a lot of
things their way instead of the old known Unix way of doing things. For
example they did consolidate a lot of the smallish text config files in
/etc with an SQL like binary data base. Folks who insist that system
administration is done via vi and kill -HUP will run against a wall.
I have never felt the urge to do all by vi and I actually use the menus
of the AIX admin tool (SMIT) so I am not affected.

Although there is one OS I really would like to treat with a
sledgehammer recently, and that is Mac OS X. I have no problem that they
changed all the traditional directory layout nor that they pretty much
force you to do system administration using their GUI tools from the
console of the system. But what I really don't like is that they removed
"unix" (or "__unix") from their pre-processor and their weird object
file format named MACH-O that makes dynamic linking a pain.

--
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone: +49 5131 709320
FAX: +49 5131 709325
Internet: jum@helios.de