summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/Makefile.xorg
diff options
context:
space:
mode:
authorMarcin Slusarz <[email protected]>2011-10-13 21:45:45 +0200
committerMarcin Slusarz <[email protected]>2011-10-17 22:57:27 +0200
commit757390491cfa3b861fab76940a8c6e508d1f1a25 (patch)
treea69fb54b0b227d8131cd057f653dbc61d1113ae2 /src/gallium/targets/Makefile.xorg
parentc0573fb29df6defe58f4898f0b8a42e8b9214d36 (diff)
gallium/targets: use c++ compiler for linking
As pointed out by Michel Dänzer, gcc -lstdc++ doesn't work on all systems, because it may require other libraries which are only pulled in implicitly by g++. And libstdc++ is available only with GNU compiler. Use c++ compiler for linking and remove redundant LDFLAGS += -lstdc++ all over the tree.
Diffstat (limited to 'src/gallium/targets/Makefile.xorg')
-rw-r--r--src/gallium/targets/Makefile.xorg11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/targets/Makefile.xorg b/src/gallium/targets/Makefile.xorg
index c96eded501c..d1231cabdc9 100644
--- a/src/gallium/targets/Makefile.xorg
+++ b/src/gallium/targets/Makefile.xorg
@@ -29,12 +29,15 @@ INCLUDES = \
LIBNAME_STAGING = $(TOP)/$(LIB_DIR)/gallium/$(TARGET)
ifeq ($(MESA_LLVM),1)
-LD = $(CXX)
LDFLAGS += $(LLVM_LDFLAGS)
-USE_CXX=1
DRIVER_LINKS += $(LLVM_LIBS) -lm -ldl
+LD=$(CXX)
else
-LDFLAGS += -lstdc++
+ ifeq ($(LINK_WITH_CXX),1)
+ LD=$(CXX)
+ else
+ LD=$(CC)
+ endif
endif
@@ -43,7 +46,7 @@ endif
default: depend $(TOP)/$(LIB_DIR)/gallium $(LIBNAME) $(LIBNAME_STAGING)
$(LIBNAME): $(OBJECTS) Makefile ../Makefile.xorg $(LIBS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES)
- $(MKLIB) -linker '$(CC)' -noprefix -o $@ $(LDFLAGS) $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS)
+ $(MKLIB) -linker '$(LD)' -noprefix -o $@ $(LDFLAGS) $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS)
depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURCES)
rm -f depend