[llvm-commits] [dragonegg] r126385 - /dragonegg/trunk/Makefile
Duncan Sands
baldrick at free.fr
Thu Feb 24 07:30:59 PST 2011
Author: baldrick
Date: Thu Feb 24 09:30:59 2011
New Revision: 126385
URL: http://llvm.org/viewvc/llvm-project?rev=126385&view=rev
Log:
Since LD_OPTIONS can contain fundamental system libraries like -ldl,
make sure it comes after any libraries that might use these.
Modified:
dragonegg/trunk/Makefile
Modified: dragonegg/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/Makefile?rev=126385&r1=126384&r2=126385&view=diff
==============================================================================
--- dragonegg/trunk/Makefile (original)
+++ dragonegg/trunk/Makefile Thu Feb 24 09:30:59 2011
@@ -54,7 +54,7 @@
-DGCC_MAJOR=$(GCC_MAJOR) -DGCC_MINOR=$(GCC_MINOR) \
-I$(SRC_DIR) -I$(GCC_PLUGIN_DIR)/include
-LD_OPTIONS+=$(LDFLAGS) $(shell $(LLVM_CONFIG) --ldflags)
+LD_OPTIONS+=$(shell $(LLVM_CONFIG) --ldflags) $(LDFLAGS)
# NOTE: The following flags can only be used after TARGET_UTIL has been built.
TARGET_HEADERS+=-DTARGET_NAME=\"$(shell $(TARGET_UTIL) -t)\" \
@@ -71,8 +71,8 @@
$(TARGET_UTIL): $(TARGET_UTIL_OBJECTS)
@echo Linking $@
- $(QUIET)$(CXX) -o $@ $^ $(LD_OPTIONS) \
- $(shell $(LLVM_CONFIG) --libs support)
+ $(QUIET)$(CXX) -o $@ $^ $(shell $(LLVM_CONFIG) --libs support) \
+ $(LD_OPTIONS)
%.o : $(SRC_DIR)/%.c $(TARGET_UTIL)
@echo Compiling $*.c
@@ -90,9 +90,9 @@
$(PLUGIN): $(PLUGIN_OBJECTS) $(TARGET_OBJECT) $(TARGET_UTIL)
@echo Linking $@
$(QUIET)$(CXX) -o $@ $(LOADABLE_MODULE_OPTIONS) $(CXXFLAGS) \
- $(LD_OPTIONS) $(PLUGIN_OBJECTS) $(TARGET_OBJECT) \
- $(shell $(LLVM_CONFIG) --libs analysis core ipo scalaropts target \
- $(shell $(TARGET_UTIL) -p))
+ $(PLUGIN_OBJECTS) $(TARGET_OBJECT) $(shell $(LLVM_CONFIG) --libs \
+ analysis core ipo scalaropts target $(shell $(TARGET_UTIL) -p)) \
+ $(LD_OPTIONS)
clean::
$(QUIET)rm -f *.o *.d $(PLUGIN) $(TARGET_UTIL)
More information about the llvm-commits
mailing list