+ $llvmCore_phase2_objdir $llvmCore_phase2_destdir
+ clean_RPATH $llvmCore_phase2_destdir/usr/local
+
+ ########################################################################
+ # Phase 3: Build llvmCore with newly built clang from phase 2.
+ c_compiler=$llvmCore_phase2_destdir/usr/local/bin/clang
+ cxx_compiler=$llvmCore_phase2_destdir/usr/local/bin/clang++
+ echo "# Phase 3: Building llvmCore"
+ configure_llvmCore 3 $Flavor $llvmCore_phase3_objdir
+ build_llvmCore 3 $Flavor \
+ $llvmCore_phase3_objdir $llvmCore_phase3_destdir
+ clean_RPATH $llvmCore_phase3_destdir/usr/local
+
+ ########################################################################
+ # Testing: Test phase 3
+ echo "# Testing - built with clang"
+ test_llvmCore 3 $Flavor $llvmCore_phase3_objdir
+
+ ########################################################################
+ # Compare .o files between Phase2 and Phase3 and report which ones
+ # differ.
+ if [ "$do_compare" = "yes" ]; then
+ echo
+ echo "# Comparing Phase 2 and Phase 3 files"
+ for p2 in `find $llvmCore_phase2_objdir -name '*.o'` ; do
+ p3=`echo $p2 | sed -e 's,Phase2,Phase3,'`
+ # Substitute 'Phase2' for 'Phase3' in the Phase 2 object file in
+ # case there are build paths in the debug info. On some systems,
+ # sed adds a newline to the output, so pass $p3 through sed too.
+ if ! cmp -s <(sed -e 's,Phase2,Phase3,g' $p2) <(sed -e '' $p3) \
+ 16 16 ; then
+ echo "file `basename $p2` differs between phase 2 and phase 3"
+ fi
+ done
+ fi
+done
+
+if [ $do_openmp = "yes" ]; then
+ build_OpenMP
+fi