X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=libsanitizer%2Fmerge.sh;h=fa340bedbac89871f9bb24e49218d7d8cf9d8da7;hb=95a2ed0325864069bb0368d75bcf85a8b22c4127;hp=aae8eb41f7d07f0403fa4f624f664c2b06d75836;hpb=ef1b3fda32c08e9bd6977b96e1e619aae3e3726a;p=gcc.git diff --git a/libsanitizer/merge.sh b/libsanitizer/merge.sh index aae8eb41f7d..fa340bedbac 100755 --- a/libsanitizer/merge.sh +++ b/libsanitizer/merge.sh @@ -4,6 +4,8 @@ # This script merges libsanitizer sources from upstream. +VCS=${1:-svn} + get_upstream() { rm -rf upstream #cp -rf orig upstream @@ -16,12 +18,13 @@ get_current_rev() { } list_files() { - (cd $1; ls *.{cc,h,inc} 2> /dev/null) + (cd $1; ls *.{cc,h,inc,S} 2> /dev/null) } change_comment_headers() { for f in $(list_files $1); do + sed -n 3p $1/$f | grep -q 'The LLVM Compiler Infrastructure' || continue changed=$(awk 'NR != 2 && NR != 3' < $1/$f) echo "$changed" > $1/$f done @@ -45,10 +48,10 @@ merge() { elif [ -f $upstream_path/$f ]; then echo "FOUND IN UPSTREAM :" $f cp -v $upstream_path/$f $local_path - svn add $local_path/$f + $VCS add $local_path/$f elif [ -f $local_path/$f ]; then echo "FOUND IN LOCAL :" $f - svn remove $local_path/$f + $VCS rm $local_path/$f fi done @@ -72,6 +75,10 @@ merge lib/sanitizer_common sanitizer_common merge lib/interception interception merge lib/ubsan ubsan +# Need to merge lib/builtins/assembly.h file: +mkdir -p builtins +cp -v upstream/lib/builtins/assembly.h builtins/assembly.h + rm -rf upstream # Update the MERGE file.