[llvm-commits] [llvm-gcc-4.0] r44011 - /llvm-gcc-4.0/trunk/gcc/Makefile.in

Bill Wendling isanbard at gmail.com
Sun Nov 11 22:59:55 PST 2007


Author: void
Date: Mon Nov 12 00:59:54 2007
New Revision: 44011

URL: http://llvm.org/viewvc/llvm-project?rev=44011&view=rev
Log:
Small hack to get llvm-config to work when it's moded to a different directory

Modified:
    llvm-gcc-4.0/trunk/gcc/Makefile.in

Modified: llvm-gcc-4.0/trunk/gcc/Makefile.in
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/Makefile.in?rev=44011&r1=44010&r2=44011&view=diff

==============================================================================
--- llvm-gcc-4.0/trunk/gcc/Makefile.in (original)
+++ llvm-gcc-4.0/trunk/gcc/Makefile.in Mon Nov 12 00:59:54 2007
@@ -234,7 +234,18 @@
 
 # Use llvm-config to get the srcdir that LLVM was configured with, to support
 # srcdir != objdir builds.
-LLVMSRCDIR := $(shell $(LLVMBINPATH)/llvm-config --src-root)
+### FIXME: Relying upon llvm-config doesn't work if we built LLVM in one placed,
+### moved it to another place, and then built LLVM-GCC. If the directory doesn't
+### exist, then use LLVMOBJDIR.
+#LLVMSRCDIR := $(shell $(LLVMBINPATH)/llvm-config --src-root)
+LLVMSRCDIR := $(shell \
+  P=`$(LLVMBINPATH)/llvm-config --src-root`; \
+  if [ `pwd` == $$P ]; then \
+    echo "$(LLVMOBJDIR)"; \
+  else \
+    echo "$$P"; \
+  fi);
+LLVMSRCDIR := $(shell echo "$(LLVMSRCDIR)" | sed -e 's,;,,')
 endif
 
 ifdef LLVM_VERSION_INFO
@@ -1129,7 +1140,7 @@
 libllvmgcc$(LLVM_STAGE).dylib: llvm-linker-hack.cpp $(LLVMLIBFILES)
 	echo $(LLVMLIBFILES)
 	$(CXX) $(DYLIB_COMPILE_FLAGS) $(INCLUDES) -o $@ \
-           $< $(LLVMLIBFILES)  -dynamiclib -single_module \
+           $< $(LLVMLIBFILES) -L/usr/lib/gcc/$(build)/4.0.1/ -dynamiclib -single_module \
            -install_name @executable_path/$@
 
 LLVMBACKENDFILES := libllvmgcc$(LLVM_STAGE).dylib
@@ -1394,7 +1405,7 @@
 cc1-exported-symbol-list.txt:
 	echo "_main" > $@
 LIBDEPS += cc1-exported-symbol-list.txt
-LINKCC += -dead_strip -exported_symbols_list cc1-exported-symbol-list.txt
+LINKCC += -dead_strip -exported_symbols_list cc1-exported-symbol-list.txt -L/usr/lib/gcc/$(build)/4.0.1/
 endif
 else
 LINKCC := $(CC)
@@ -1825,7 +1836,6 @@
 	$(SHELL) $(srcdir)/../move-if-change tmp-optionlist optionlist
 	$(STAMP) s-options
 
-
 options.c: optionlist $(srcdir)/opt-functions.awk $(srcdir)/optc-gen.awk
 	$(AWK) -f $(srcdir)/opt-functions.awk -f $(srcdir)/optc-gen.awk \
 	       -v header_name="options.h" < $< > $@ 
@@ -3206,7 +3216,7 @@
 # working directory in object files (-g absent, or -fno-working-dir
 # present), and build and host are the same, fixincl for the host will
 # build after fixincl for the build machine, getting a cache hit,
-# thereby updating the timestamp of fixincl.o in the the host tree.
+# thereby updating the timestamp of fixincl.o in the host tree.
 # Because of CCACHE_HARDLINK, this will also update the timestamp in
 # the build tree, and so fixincl in the build tree will appear to be
 # out of date.  Yuck.





More information about the llvm-commits mailing list