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/Makefile.va | |
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/Makefile.va')
-rw-r--r-- | src/gallium/targets/Makefile.va | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/targets/Makefile.va b/src/gallium/targets/Makefile.va index 7ced430f690..920f130f9a0 100644 --- a/src/gallium/targets/Makefile.va +++ b/src/gallium/targets/Makefile.va @@ -17,8 +17,13 @@ STATE_TRACKER_LIB = $(TOP)/src/gallium/state_trackers/va/libvatracker.a ifeq ($(MESA_LLVM),1) LDFLAGS += $(LLVM_LDFLAGS) DRIVER_EXTRAS = $(LLVM_LIBS) +LD=$(CXX) else -LDFLAGS += -lstdc++ + ifeq ($(LINK_WITH_CXX),1) + LD=$(CXX) + else + LD=$(CC) + endif endif # XXX: Hack, VA public funcs aren't exported @@ -39,7 +44,7 @@ OBJECTS = $(C_SOURCES:.c=.o) \ default: depend symlinks $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME) $(TOP)/$(LIB_DIR)/gallium/$(LIBNAME): $(OBJECTS) $(PIPE_DRIVERS) $(STATE_TRACKER_LIB) $(TOP)/$(LIB_DIR)/gallium Makefile - $(MKLIB) -o $(LIBBASENAME) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ + $(MKLIB) -o $(LIBBASENAME) -linker '$(LD)' -ldflags '$(LDFLAGS)' \ -major $(VA_MAJOR) -minor $(VA_MINOR) $(MKLIB_OPTIONS) \ -install $(TOP)/$(LIB_DIR)/gallium \ $(OBJECTS) $(STATE_TRACKER_LIB) $(PIPE_DRIVERS) $(LIBS) $(DRIVER_EXTRAS) |