[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for XL C/C++ and Fortran on Linux
From: |
Roger Ferrer Ibáñez |
Subject: |
Re: Patch for XL C/C++ and Fortran on Linux |
Date: |
Fri, 07 Jul 2006 17:55:52 +0200 |
User-agent: |
Thunderbird 1.5.0.2 (X11/20060516) |
Hi again,
It doesn't look too bad. It'd be good to see some test results with it,
though. For these, you should download libtool-1.5.22 (or use CVS
branch-1-5), apply your changes to the libtool.m4 file in that tree, run
./bootstrap
and the usual ./configure && make, then follow the instructions in
README to run the test suite and report failures verbosely.
They are gzip-attached into the message.
CC=xlc
CXX=xlC
F77=xlf
====================================
5 of 105 tests failed
(7 tests were not run)
Please report to address@hidden
====================================
Additional environment information:
* powerpc64-unknown-linux-gnu
* gcc version 3.3.3 (SuSE Linux)
* GNU ld version 2.15.90.0.1.1 20040303 (SuSE Linux)
BTW, what is gxlc/gxlc++, and do they cause $GCC=yes (i.e., do they
define __GNUC__ unconditionally, or maybe just when some flag is or
is not given)? This corresponds to:
| checking whether we are using the GNU C compiler... yes
I think it is just a driver that converts gcc-style parameters into xlc
ones. It does not defines __GNUC__ unconditionally.
Hmm. One safe way would be to simply disable shared libraries for xlf
on GNU/Linux. Or use $LD. But I strongly assume the latter to open up
another can of worms ... maybe this way is rather reliable in practice.
Ok.
On the other hand, when using CC=gcc CXX=g++ and F77=xlf, "-fPIC" flag
"sticks" on the invocation of xlf (it should be -qpic), what I'm doing
wrong in this case?
Could you show an example exposing this issue?
$ env CC=gcc F77=xlf ../source/configure
...
checking for xlf option to produce PIC... -fPIC
checking if xlf PIC flag -fPIC works... yes
checking if xlf static flag -static works... yes
...
$ make
...
xlf -g -c ../source/autotestfor.f -fPIC -o
.libs/libautotestfor_la-autotest.o
...
xlf -g -c ../source/autotestfor.f -o libautotestfor_la-autotestfor.o
>/dev/null 2>&1
/bin/sh ./libtool --mode=link xlf -g -o libautotestfor.la -rpath
/usr/local/lib libautotestfor_la-autotestfor.lo
gcc -shared .libs/libautotestfor_la-autotestfor.o -Wl,-soname
-Wl,libautotestfor.so.0 -o .libs/libautotestfor.so.0.0.0
/readonly/usr/bin/../lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/bin/ld:
Error: The symbol `_xlfBeginIO' has a R_PPC_REL24 relocation, that means
'.libs/libautotestfor_la-autotestfor.o' was compiled without -fPIC.
however when using CC=xlc and F77=xlf
$ env CC=xlc F77=xlf ../source/configure
...
checking for xlf option to produce PIC... -qpic
checking if xlf PIC flag -qpic works... yes
checking if xlf static flag works... yes
checking if xlf supports -c -o file.o... yes
And everything links flawlessly.
$ make
...
xlf -g -c ../source/autotestfor.f -qpic -o
.libs/libautoprovafor_la-autotestfor.o
...
/bin/sh ./libtool --mode=link xlf -g -o libautoprovafor.la -rpath
/usr/local/lib libautoprovafor_la-autoprovafor.lo
xlc -qmkshrobj .libs/libautoprovafor_la-autoprovafor.o -Wl,-soname
-Wl,libautoprovafor.so.0 -o .libs/libautoprovafor.so.0.0.0
Maybe "xlf*)" is not in the correct place?
Some very minor nits inline.
I'll fix them in a future patch.
Thanks!
--
Roger Ferrer Ibáñez - address@hidden
check_xlc_xlC_xlf.gz
Description: GNU Zip compressed data