Revision: 125717 Author: bwendlin Date: 2007-04-04 12:02:41 -0700 (Wed, 04 Apr 2007)
Log Message: ----------- Stop random segfaults. This explicitly sets the DYLD_LIBRARY_PATH to the stage# directories. Modified Paths: -------------- apple-local/branches/llvm/gcc/Makefile.in Modified: apple-local/branches/llvm/gcc/Makefile.in =================================================================== --- apple-local/branches/llvm/gcc/Makefile.in 2007-04-04 08:00:56 UTC (rev 125716) +++ apple-local/branches/llvm/gcc/Makefile.in 2007-04-04 19:02:41 UTC (rev 125717) @@ -1089,6 +1089,13 @@ # libraries change the tools should be relinked. LIBDEPS += $(LLVMLIBFILES) LLVMBACKENDFILES := $(LLVMLIBFILES) + +# APPLE LOCAL begin LLVM - set DYLD path +SET_DYLIB_PATH=0 + +# Set up library path if needed. [EMAIL PROTECTED]@ +# APPLE LOCAL end LLVM - set DYLD path else # Remove scheduler files. @@ -1128,6 +1135,10 @@ # Make sure that 'make install' knows about the dylib. EXTRA_PROGRAMS += libllvmgcc.dylib +# APPLE LOCAL begin LLVM - set DYLD path +SET_DYLIB_PATH=1 +# APPLE LOCAL end LLVM - set DYLD path + endif endif # APPLE LOCAL end LLVM @@ -1217,8 +1228,10 @@ # language hooks, generated by configure @language_hooks@ +# APPLE LOCAL begin LLVM - Don't Set this for DYLIBs # Set up library path if needed. [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ +# APPLE LOCAL end LLVM - Don't Set this for DYLIBs # per-language makefile fragments ifneq ($(LANG_MAKEFRAGS),) @@ -4054,6 +4067,9 @@ # overrideable (for a bootstrap build stage1 also builds gcc.info). # The stage1 compiler is always built with checking enabled. stage1_build: + if test "${SET_DYLIB_PATH}" = "1"; then \ + DYLD_LIBRARY_PATH="`${PWD_COMMAND}`"; \ + fi; \ $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" \ CFLAGS="$(STAGE1_CFLAGS) $(STAGE1_CHECKING)" \ MAKEINFO="$(MAKEINFO)" MAKEINFOFLAGS="$(MAKEINFOFLAGS)" \ @@ -4067,6 +4083,9 @@ echo stage2_build > stage_last stage2_build: stage1_copy + if test "${SET_DYLIB_PATH}" = "1"; then \ + DYLD_LIBRARY_PATH="`${PWD_COMMAND}`/stage1"; \ + fi; \ $(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CC_FOR_BUILD="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \ STAGE_PREFIX=stage1/ \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -4080,6 +4099,9 @@ echo stage3_build > stage_last stageprofile_build: stage1_copy + if test "${SET_DYLIB_PATH}" = "1"; then \ + DYLD_LIBRARY_PATH="`${PWD_COMMAND}`/stage1"; \ + fi; \ $(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CC_FOR_BUILD="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \ STAGE_PREFIX=stage1/ \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -4093,6 +4115,9 @@ echo stagefeedback_build > stage_last stage3_build: stage2_copy + if test "${SET_DYLIB_PATH}" = "1"; then \ + DYLD_LIBRARY_PATH="`${PWD_COMMAND}`/stage2"; \ + fi; \ $(MAKE) CC="$(STAGE_CC_WRAPPER) stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CC_FOR_BUILD="$(STAGE_CC_WRAPPER) stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" \ STAGE_PREFIX=stage2/ \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -4101,6 +4126,9 @@ echo stage3_build > stage_last stagefeedback_build: stageprofile_copy stage1_copy + if test "${SET_DYLIB_PATH}" = "1"; then \ + DYLD_LIBRARY_PATH="`${PWD_COMMAND}`/stage1"; \ + fi; \ $(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CC_FOR_BUILD="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \ STAGE_PREFIX=stage1/ \ $(POSTSTAGE1_FLAGS_TO_PASS) \ @@ -4120,6 +4148,9 @@ echo stage4_build > stage_last stage4_build: stage3_copy + if test "${SET_DYLIB_PATH}" = "1"; then \ + DYLD_LIBRARY_PATH="`${PWD_COMMAND}`/stage3"; \ + fi; \ $(MAKE) CC="$(STAGE_CC_WRAPPER) stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" CC_FOR_BUILD="$(STAGE_CC_WRAPPER) stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" \ STAGE_PREFIX=stage3/ \ $(POSTSTAGE1_FLAGS_TO_PASS) \ _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits