Hi,
I am having trouble with compiling a C program which
has a '#pragma weak symbol ...' line on ia64 if the -fPIC
flag is used.
The program looks like this:
robin@pingu: cat conftest.c
#pragma weak RMCFoo=Foo
int Foo(int a) { return a; }
int t() {
return (RMCFoo(1));
}
int main() {
t();
return 0;
}
robin@pingu:
It compiles fine without -fPIC:
robin@fab0: ecc -o conftest conftest.c
conftest.c(6): warning #266: function declared implicitly
return (RMCFoo(1));
^
but fails with -fPIC:
robin@fab0: ecc -o conftest -fPIC conftest.c
conftest.c(6): warning #266: function declared implicitly
return (RMCFoo(1));
^
/tmp/ecc75PCzLs(185) : error A2042: symbol RMCFoo for equate is already defined
/tmp/eccVs4NiH.o - 1 error(s), 0 warning(s)
robin@fab0:
It works fine on an ia32 machine:
robin@pingu: icc -o conftest -fPIC conftest.c
conftest.c(6): warning #266: function declared implicitly
return (RMCFoo(1));
^
robin@pingu:
Can anyone offer any help or a workaround?
Thanks,
Robin
ecc gives an error with '#pragma weak ' if -fPIC flag is used
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione


