hi!
since there were a couple of issues/requests regarding different linker usage and avoiding C++ runtime, i set up the CWS ause019 to get more flexibility in there. each linked target will have the opportunity to specify the linkage (C/C++) it desires. also each platform now may specify if the C++ runtime libraries are explicit linked.
if you are the maintainer of a specific platform (or just interested) please have a look at the bottom of this message.
that's how it's intended to work:
platform makefile (e.g. unxsols4.mk): --------------------------------------------------------- # first of all two linker variables are supported
LINK*=$(CXX) LINKC*=$(CC)
# also different switches may be required
LINKFLAGS=-w -mt -z combreloc -PIC -temp=/tmp $(LINKFLAGSRUNPATH) -norunpath -library=no%Cstd
LINKFLAGSC=-w -mt -z combreloc $(LINKFLAGSRUNPATH) -norunpath
# next a variable is defined that contains the string for explicit linking C++ runtime
STDLIBCPP=-lCrun
# now we can decide where to place the C++ runtime in the order of linked libraries. note that "CPPRUNTIME" is just a placeholder. nothing is determined yet. e.g.
STDSHLGUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc
---------------------------------------------------------
with just setting the makefile variable [APP|SHL]nCODETYP linking can now be switched from C++ to C style...
for binary targets (e.g. tg_app.mk):
# decide how to link .IF "$(APP$(TNR)CODETYPE)"=="C" APP$(TNR)LINKER=$(LINKC) APP$(TNR)STDLIB=$(subst,CPPRUNTIME, $(STDLIB)) APP$(TNR)LINKFLAGS=$(LINKFLAGSC) .ELSE # "$(APP$(TNR)CODETYPE)"=="C" APP$(TNR)LINKER=$(LINK) APP$(TNR)STDLIB=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDLIB)) APP$(TNR)LINKFLAGS=$(LINKFLAGS) .ENDIF # "$(APP$(TNR)CODETYPE)"=="C"
---------------------------------------------------------
that's it.
comments, questions and suggestions welcome.
since i'm not aware of the requirements of all platforms, please have a look at the platform makefile of your favorite platform and attach a patch to the issue (#i42716#) if the changes are not yet done or simply wrong.
tschau...
ause
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
