summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-10-16 05:54:41 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-10-16 05:54:41 +0000
commitb9b0c1d2483a1067011b80e1f661bf56a2a887c5 (patch)
tree5d9a31c08cacdf691325083b081e131612372c33 /gnu
parentb6f4b8daca17166c435559fc24c069201b36ec81 (diff)
downloadFreeBSD-src-b9b0c1d2483a1067011b80e1f661bf56a2a887c5.zip
FreeBSD-src-b9b0c1d2483a1067011b80e1f661bf56a2a887c5.tar.gz
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
Diffstat (limited to 'gnu')
-rwxr-xr-xgnu/usr.bin/binutils/ld/genscripts.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils/ld/genscripts.sh b/gnu/usr.bin/binutils/ld/genscripts.sh
index 5090cd3..238263e 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
OpenPOWER on IntegriCloud