From 0cc887023b9a994cdff0b343c55af8b623535311 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Fri, 16 Oct 2015 05:54:41 +0000 Subject: [PATCH] Avoid warning race with creating 'ldscripts' directory during build. In r204548 the 'rm -f ldscripts' was added likely due to reading the conditional as 'else it is a file'. That seems unlikely though and the more likely case is just that the directory hasn't been created yet. Because this races with ,ssother scripts, use 'mkdir -p' which is a minimal modification vs upstream to avoid the warning of 'File exists' if another script creates it first. This could replace the 'test -d' as well but then it's more unneeded change to the upstream script. Sponsored by: EMC / Isilon Storage Division --- gnu/usr.bin/binutils/ld/genscripts.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/usr.bin/binutils/ld/genscripts.sh b/gnu/usr.bin/binutils/ld/genscripts.sh index 5090cd3f877..238263eb75a 100755 --- a/gnu/usr.bin/binutils/ld/genscripts.sh +++ b/gnu/usr.bin/binutils/ld/genscripts.sh @@ -50,8 +50,7 @@ fi if test -d ldscripts; then true else - rm -f ldscripts - mkdir ldscripts + mkdir -p ldscripts fi # Set some flags for the emultempl scripts. USE_LIBPATH will