Fixes are available
XL C/C++ for Linux Fix Pack 9 (August 2013 Update) for 11.1
April 2011 Update for XL C/C++ for Linux, V11.1
July 2011 Update for XL C/C++ for Linux, V11.1
October 2011 Update for XL C/C++ for Linux, V11.1
June 2012 Update for XL C/C++ for Linux, V11.1
October 2012 Update for XL C/C++ for Linux, V11.1
XL C/C++ for Linux Fix Pack 8 (June 2013 Update) for 11.1
APAR status
Closed as program error.
Error description
The compiler option, -qipa does not work as designed when used with -Wl. When used individually, both options work as intended. This problem has been reported with the following sub-options of -Wl: -wrap, -u and -Map. The following test case is for -Wl,-wrap and -qipa. ========== Test case main.c: #include <stdio.h> void func (void) { printf("\nreal func\n"); return; } int main (int argc, char **argv) { func(); return 0; } wrap.c: #include <stdio.h> extern void __real_func(void); void __wrap_func(void) { printf("wrapped function\n"); __real_func(); return; } makefile: all: link ipa ipa-link link: xlc -c -o wrap1.o wrap.c xlc -Wl,-wrap,func -o test-link main.c wrap1.o ipa: xlc -qipa -c -o wrap2.o wrap.c xlc -qipa -o test-ipa main.c wrap2.o ipa-link: xlc -qipa -c -o wrap3.o wrap.c xlc -qipa -Wl,-wrap,func -o test-ipa-link main.c wrap3.o clean: rm -f test test-ipa test-link test-ipa-link *.o ========== Observed Output $ make xlc -c -o wrap1.o wrap.c xlc -Wl,-wrap,func -o test-link main.c wrap1.o xlc -qipa -c -o wrap2.o wrap.c xlc -qipa -o test-ipa main.c wrap2.o xlc -qipa -c -o wrap3.o wrap.c xlc -qipa -Wl,-wrap,func -o test-ipa-link main.c wrap3.o 1586-083 (W) ld option -wrap ignored by IPA 1586-109 (U) Input file "func" cannot be processed. An input file must be either an object file, an import file, or an archive. make: *** [compile-ipa-link] Error 1
Local fix
Use the -noipa compiler option.
Problem summary
PROBLEM DESCRIPTION: Using -Wl,-wrap,func cause option with -qipa cause compiler to fail to link. USERS AFFECTED: Users using -Wl,-wrap,func option and compiling with -qipa on Linux.
Problem conclusion
Tell compiler that -wrap is followed by an extra parameter.
Temporary fix
Comments
APAR Information
APAR number
LI76127
Reported component name
XL C/C++ FOR LI
Reported component ID
5724X1400
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2011-04-27
Closed date
2011-04-27
Last modified date
2011-04-27
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL C/C++ FOR LI
Fixed component ID
5724X1400
Applicable component levels
RB10 PSN LI75720
UP06/09/13
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSXVZZ","label":"XL C\/C++ for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"B10","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
17 October 2021