diff options
author | Marcin Slusarz <[email protected]> | 2011-10-13 21:45:45 +0200 |
---|---|---|
committer | Marcin Slusarz <[email protected]> | 2011-10-17 22:57:27 +0200 |
commit | 757390491cfa3b861fab76940a8c6e508d1f1a25 (patch) | |
tree | a69fb54b0b227d8131cd057f653dbc61d1113ae2 /src/gallium/targets/xa-vmwgfx | |
parent | c0573fb29df6defe58f4898f0b8a42e8b9214d36 (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/xa-vmwgfx')
-rw-r--r-- | src/gallium/targets/xa-vmwgfx/Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/targets/xa-vmwgfx/Makefile b/src/gallium/targets/xa-vmwgfx/Makefile index fecdba695c7..5eebc50df2b 100644 --- a/src/gallium/targets/xa-vmwgfx/Makefile +++ b/src/gallium/targets/xa-vmwgfx/Makefile @@ -33,8 +33,13 @@ OBJECTS = $(SOURCES:.c=.o) ifeq ($(MESA_LLVM),1) LDFLAGS += $(LLVM_LDFLAGS) GALLIUM_AUXILIARIES += $(LLVM_LIBS) +LD=$(CXX) else -LDFLAGS += -lstdc++ + ifeq ($(LINK_WITH_CXX),1) + LD=$(CXX) + else + LD=$(CC) + endif endif ##### RULES ##### @@ -50,7 +55,7 @@ default: $(TOP)/$(LIB_DIR)/gallium/$(XA_LIB_NAME) # Make the library $(TOP)/$(LIB_DIR)/gallium/$(XA_LIB_NAME): depend $(OBJECTS) $(XA_LIB_DEPS) - $(MKLIB) -o $(XA_LIB) -linker $(CC) -ldflags '$(LDFLAGS)' \ + $(MKLIB) -o $(XA_LIB) -linker $(LD) -ldflags '$(LDFLAGS)' \ -major $(XA_MAJOR) -minor $(XA_MINOR) -patch $(XA_TINY) \ $(MKLIB_OPTIONS) \ -exports $(TOP)/src/gallium/state_trackers/xa/xa_symbols\ |