Hi,
I've found why this happens, here is the story
in case of Sun C++ compiler archives should be created using CC -xar
not standard ar because CC-xar ensures that all necessary information,
including template instances, is included in the library.
The ast probe tool is clever enough to know that and sets for C++ compiler
CC.ARFLAGS=-xar ,but IMHO there is a bug in Makerules.mk around line: 4073
if CC.ARFLAGS are not null default rule for building shared library is
overwritten by:
.SHARED.o : .CLEAR .USE (LDSHARED)
$(LDSHARED) $(CC.SHARED) -o $(<) $(*$(**):N!=*$(CC.SUFFIX.ARCHIVE))
note that no additional flags are passed but if one have non trivial flags
during compilation the same set must be passed during linking here is excerpt
from C++ manual:
"If you are creating a shared object by specifying -G along with other compiler
options that must be specified at both compile time and link time, make sure
that those same options are also specified at both compile time and link time
when you link with the resulting shared object."
So as a minimum we should pass LDFLAGS or CCFLAGS stripped form compilation
flags. Also somehaw pass libraries that user wish to link against.
Any thoughts.
Krzysztof
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users