Topic
  • No replies
SteveGoetze
SteveGoetze
6 Posts

Pinned topic Strange z/OS xlc behavior with -qxplink

‏2010-04-15T12:53:50Z |
I'm running a gnu configure script on z/OS and encountering a problem with one of the platform capability tests. This particular test compiles two source files, then tries to link them. The test fails if -qxplink is specified, but succeeds otherwise.

Consider the two source files f1.c and f2.c:

===== f1.c ====
extern int zero (void);
int main () { return zero(); }

===== f2.c ====
int zero (void) { return 0; }

The following compile / link sequence succeeds:
xlc -c -qxplink f1.c
xlc -c -qxplink f2.c
xlc -o f -qxplink f1.o f2.o

However, because of the way gnu configure tests are composed, the following sequence is used (more or less), and it fails with a link error:

cp f1.c f.c
xlc -c qxplink f.c
cp f.o f1.o
cp f2.c f.c
xlc -c qxplink f.c
cp f.o f2.o
xlc -o f -qxplink f1.o f2.o
IEW2456E 9207 SYMBOL zero UNRESOLVED. MEMBER COULD NOT BE INCLUDED FROM THE
DESIGNATED CALL LIBRARY.

This test only fails when xplink is specified. Is this behavior working as designed, or is there an issue with the compiler?
Updated on 2010-04-16T15:35:55Z at 2010-04-16T15:35:55Z by SteveGoetze
  • SteveGoetze
    SteveGoetze
    6 Posts

    Re: Strange z/OS xlc behavior with -qxplink

    ‏2010-04-16T15:35:55Z  
    Thanks for your reply. I'm not sure that running with NOCSECT is the right long term solution. I unfortunately can't supply a unique prefix for the compilations, given the nature of the test. However, I've alerted the GNU autotools community about this issue, and they seem interested in providing a platform / compiler independent solution.