Well, trivial answer is that Win32 uses some C/C++ runtime provided by Microsoft, usually something like MSVCR90.DLL (v9.0) etc. Solaris uses libC.so, for example. As far as I know, only systems where the GNU C/C++ compiler is main system compiler (and generally therefore the GNU C++ runtime) uses anything named "libstdc++". So I'd expect Free/Net/OpenBSD + Linux use that naming and probably not much else. On other commercial UNIXes, if it does exist, it is just for compatibility with C++ programs compiled using g++.<div>
<br></div><div>Patrick<br><br><div class="gmail_quote">2011/10/13 Marcin Slusarz <span dir="ltr"><<a href="mailto:marcin.slusarz@gmail.com">marcin.slusarz@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Thu, Oct 13, 2011 at 07:54:32PM +0200, Michel Dänzer wrote:<br>
> On Don, 2011-10-13 at 10:03 -0700, Marcin XXlusarz wrote:<br>
> > Module: Mesa<br>
> > Branch: master<br>
> > Commit: 349e4db99e938f8ee8826b0d27e490c66a1e8356<br>
> > URL: <a href="http://cgit.freedesktop.org/mesa/mesa/commit/?id=349e4db99e938f8ee8826b0d27e490c66a1e8356" target="_blank">http://cgit.freedesktop.org/mesa/mesa/commit/?id=349e4db99e938f8ee8826b0d27e490c66a1e8356</a><br>
> ><br>
> > Author: Marcin Slusarz <<a href="mailto:marcin.slusarz@gmail.com">marcin.slusarz@gmail.com</a>><br>
> > Date: Thu Oct 13 18:44:40 2011 +0200<br>
> ><br>
> > st/xorg: fix build without LLVM<br>
> ><br>
> > ---<br>
> ><br>
> > src/gallium/targets/Makefile.xorg | 2 ++<br>
> > 1 files changed, 2 insertions(+), 0 deletions(-)<br>
> ><br>
> > diff --git a/src/gallium/targets/Makefile.xorg b/src/gallium/targets/Makefile.xorg<br>
> > index 9269375..c96eded 100644<br>
> > --- a/src/gallium/targets/Makefile.xorg<br>
> > +++ b/src/gallium/targets/Makefile.xorg<br>
> > @@ -33,6 +33,8 @@ LD = $(CXX)<br>
> > LDFLAGS += $(LLVM_LDFLAGS)<br>
> > USE_CXX=1<br>
> > DRIVER_LINKS += $(LLVM_LIBS) -lm -ldl<br>
> > +else<br>
> > +LDFLAGS += -lstdc++<br>
> > endif<br>
><br>
> This is wrong. Use g++ for linking libstdc++, gcc [...] -lstdc++ doesn't<br>
> work everywhere.<br>
<br>
</div></div>It wasn't my invention - I mimicked other targets (with partial exception of dri).<br>
Why gcc -lstdc++ doesn't work everywhere?<br>
<br>
---<br>
From: Marcin Slusarz <<a href="mailto:marcin.slusarz@gmail.com">marcin.slusarz@gmail.com</a>><br>
Subject: [PATCH] gallium/targets: use g++ for linking<br>
<br>
As pointed by Michel Dänzer, gcc -lstdc++ "doesn't work everywhere", because ...<br>
Use g++ for linking and remove redundant LDFLAGS += -lstdc++.<br>
---<br>
src/gallium/targets/Makefile.dri | 2 --<br>
src/gallium/targets/Makefile.va | 4 +---<br>
src/gallium/targets/Makefile.vdpau | 4 +---<br>
src/gallium/targets/Makefile.xorg | 5 +----<br>
src/gallium/targets/Makefile.xvmc | 4 +---<br>
5 files changed, 4 insertions(+), 15 deletions(-)<br>
<br>
diff --git a/src/gallium/targets/Makefile.dri b/src/gallium/targets/Makefile.dri<br>
index 857ebfe..a26b3ee 100644<br>
--- a/src/gallium/targets/Makefile.dri<br>
+++ b/src/gallium/targets/Makefile.dri<br>
@@ -4,8 +4,6 @@<br>
ifeq ($(MESA_LLVM),1)<br>
LDFLAGS += $(LLVM_LDFLAGS)<br>
DRIVER_EXTRAS = $(LLVM_LIBS)<br>
-else<br>
-LDFLAGS += -lstdc++<br>
endif<br>
<br>
MESA_MODULES = \<br>
diff --git a/src/gallium/targets/Makefile.va b/src/gallium/targets/Makefile.va<br>
index 7ced430..b6ee595 100644<br>
--- a/src/gallium/targets/Makefile.va<br>
+++ b/src/gallium/targets/Makefile.va<br>
@@ -17,8 +17,6 @@ STATE_TRACKER_LIB = $(TOP)/src/gallium/state_trackers/va/libvatracker.a<br>
ifeq ($(MESA_LLVM),1)<br>
LDFLAGS += $(LLVM_LDFLAGS)<br>
DRIVER_EXTRAS = $(LLVM_LIBS)<br>
-else<br>
-LDFLAGS += -lstdc++<br>
endif<br>
<br>
# XXX: Hack, VA public funcs aren't exported<br>
@@ -39,7 +37,7 @@ OBJECTS = $(C_SOURCES:.c=.o) \<br>
default: depend symlinks $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME)<br>
<br>
$(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER_LIB) $(TOP)/$(LIB_DIR)/gallium Makefile<br>
- $(MKLIB) -o $(LIBBASENAME) -linker '$(CC)' -ldflags '$(LDFLAGS)' \<br>
+ $(MKLIB) -o $(LIBBASENAME) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \<br>
-major $(VA_MAJOR) -minor $(VA_MINOR) $(MKLIB_OPTIONS) \<br>
-install $(TOP)/$(LIB_DIR)/gallium \<br>
$(OBJECTS) $(STATE_TRACKER_LIB) $(PIPE_DRIVERS) $(LIBS) $(DRIVER_EXTRAS)<br>
diff --git a/src/gallium/targets/Makefile.vdpau b/src/gallium/targets/Makefile.vdpau<br>
index c634915..f6b89ad 100644<br>
--- a/src/gallium/targets/Makefile.vdpau<br>
+++ b/src/gallium/targets/Makefile.vdpau<br>
@@ -17,8 +17,6 @@ STATE_TRACKER_LIB = $(TOP)/src/gallium/state_trackers/vdpau/libvdpautracker.a<br>
ifeq ($(MESA_LLVM),1)<br>
LDFLAGS += $(LLVM_LDFLAGS)<br>
DRIVER_EXTRAS = $(LLVM_LIBS)<br>
-else<br>
-LDFLAGS += -lstdc++<br>
endif<br>
<br>
# XXX: Hack, VDPAU public funcs aren't exported if we link to libvdpautracker.a :(<br>
@@ -39,7 +37,7 @@ OBJECTS = $(C_SOURCES:.c=.o) \<br>
default: depend symlinks $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME)<br>
<br>
$(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER_LIB) $(TOP)/$(LIB_DIR)/gallium Makefile<br>
- $(MKLIB) -o $(LIBBASENAME) -linker '$(CC)' -ldflags '$(LDFLAGS)' \<br>
+ $(MKLIB) -o $(LIBBASENAME) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \<br>
-major $(VDPAU_MAJOR) -minor $(VDPAU_MINOR) $(MKLIB_OPTIONS) \<br>
-install $(TOP)/$(LIB_DIR)/gallium \<br>
$(OBJECTS) $(STATE_TRACKER_LIB) $(PIPE_DRIVERS) $(LIBS) $(DRIVER_EXTRAS)<br>
diff --git a/src/gallium/targets/Makefile.xorg b/src/gallium/targets/Makefile.xorg<br>
index c96eded..0538b2b 100644<br>
--- a/src/gallium/targets/Makefile.xorg<br>
+++ b/src/gallium/targets/Makefile.xorg<br>
@@ -31,10 +31,7 @@ LIBNAME_STAGING = $(TOP)/$(LIB_DIR)/gallium/$(TARGET)<br>
ifeq ($(MESA_LLVM),1)<br>
<div class="im"> LD = $(CXX)<br>
LDFLAGS += $(LLVM_LDFLAGS)<br>
</div>-USE_CXX=1<br>
<div class="im"> DRIVER_LINKS += $(LLVM_LIBS) -lm -ldl<br>
</div>-else<br>
-LDFLAGS += -lstdc++<br>
endif<br>
<br>
<br>
@@ -43,7 +40,7 @@ endif<br>
default: depend $(TOP)/$(LIB_DIR)/gallium $(LIBNAME) $(LIBNAME_STAGING)<br>
<br>
$(LIBNAME): $(OBJECTS) Makefile ../Makefile.xorg $(LIBS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES)<br>
- $(MKLIB) -linker '$(CC)' -noprefix -o $@ $(LDFLAGS) $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS)<br>
+ $(MKLIB) -linker '$(CXX)' -noprefix -o $@ $(LDFLAGS) $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS)<br>
<br>
depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURCES)<br>
rm -f depend<br>
diff --git a/src/gallium/targets/Makefile.xvmc b/src/gallium/targets/Makefile.xvmc<br>
index 7182356..f0c4779 100644<br>
--- a/src/gallium/targets/Makefile.xvmc<br>
+++ b/src/gallium/targets/Makefile.xvmc<br>
@@ -17,8 +17,6 @@ STATE_TRACKER_LIB = $(TOP)/src/gallium/state_trackers/xorg/xvmc/libxvmctracker.a<br>
ifeq ($(MESA_LLVM),1)<br>
LDFLAGS += $(LLVM_LDFLAGS)<br>
DRIVER_EXTRAS = $(LLVM_LIBS)<br>
-else<br>
-LDFLAGS += -lstdc++<br>
endif<br>
<br>
<br>
@@ -40,7 +38,7 @@ OBJECTS = $(C_SOURCES:.c=.o) \<br>
default: depend symlinks $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME)<br>
<br>
$(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER_LIB) $(TOP)/$(LIB_DIR)/gallium Makefile<br>
- $(MKLIB) -o $(LIBBASENAME) -linker '$(CC)' -ldflags '$(LDFLAGS)' \<br>
+ $(MKLIB) -o $(LIBBASENAME) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \<br>
-major $(XVMC_MAJOR) -minor $(XVMC_MINOR) $(MKLIB_OPTIONS) \<br>
-install $(TOP)/$(LIB_DIR)/gallium \<br>
$(OBJECTS) $(STATE_TRACKER_LIB) $(PIPE_DRIVERS) $(LIBS) $(DRIVER_EXTRAS)<br>
<font color="#888888">--<br>
1.7.7<br>
</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div>