[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ast-users
Subject:    [ast-users] Bug in Makerules.mk was before: nmake problem creating
From:       <cieniuch () tenbit ! pl>
Date:       2008-05-22 15:52:42
Message-ID: E1JzD5W-0008Pw-00 () ap-04
[Download RAW message or body]



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
ast-users@research.att.com
https://mailman.research.att.com/mailman/listinfo/ast-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic