Bug 606145 part 1 - Properly link host programs written in C++. r=khuey,a=bsmedberg

This commit is contained in:
Mike Hommey 2011-01-24 09:56:40 +01:00
parent b88aad3dcd
commit b5c0c29e10
2 changed files with 10 additions and 4 deletions

View File

@ -556,6 +556,9 @@ TAG_PROGRAM = xargs etags -a
ifneq ($(CPPSRCS)$(CMMSRCS),)
CPP_PROG_LINK = 1
endif
ifneq ($(HOST_CPPSRCS)$(HOST_CMMSRCS),)
HOST_CPP_PROG_LINK = 1
endif
#
# Make sure to wrap static libs inside linker specific flags to turn on & off
@ -1085,11 +1088,11 @@ ifdef MSMANIFEST_TOOL
fi
endif # MSVC with manifest tool
else
ifeq ($(CPP_PROG_LINK),1)
ifeq ($(HOST_CPP_PROG_LINK),1)
$(HOST_CXX) -o $@ $(HOST_CXXFLAGS) $(HOST_LDFLAGS) $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
else
$(HOST_CC) -o $@ $(HOST_CFLAGS) $(HOST_LDFLAGS) $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
endif # CPP_PROG_LINK
endif # HOST_CPP_PROG_LINK
endif
endif

View File

@ -556,6 +556,9 @@ TAG_PROGRAM = xargs etags -a
ifneq ($(CPPSRCS)$(CMMSRCS),)
CPP_PROG_LINK = 1
endif
ifneq ($(HOST_CPPSRCS)$(HOST_CMMSRCS),)
HOST_CPP_PROG_LINK = 1
endif
#
# Make sure to wrap static libs inside linker specific flags to turn on & off
@ -1085,11 +1088,11 @@ ifdef MSMANIFEST_TOOL
fi
endif # MSVC with manifest tool
else
ifeq ($(CPP_PROG_LINK),1)
ifeq ($(HOST_CPP_PROG_LINK),1)
$(HOST_CXX) -o $@ $(HOST_CXXFLAGS) $(HOST_LDFLAGS) $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
else
$(HOST_CC) -o $@ $(HOST_CFLAGS) $(HOST_LDFLAGS) $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
endif # CPP_PROG_LINK
endif # HOST_CPP_PROG_LINK
endif
endif