From 0dcfb63cb9793311b4b7ae3a395e0a273ec824b2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 30 Jan 2020 10:06:11 -0500 Subject: AIX: Revise ExportImportList to build output more incrementally This will allow more steps to be added. --- Modules/Platform/AIX/ExportImportList | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Modules/Platform/AIX/ExportImportList b/Modules/Platform/AIX/ExportImportList index 4f67ef5..c7f60b5 100755 --- a/Modules/Platform/AIX/ExportImportList +++ b/Modules/Platform/AIX/ExportImportList @@ -26,9 +26,12 @@ while test "$#" != 0; do done test -n "$out" || die "$usage" -# Collect symbols exported from all object files. +# Build a temporary file that atomically replaces the output later. out_tmp="$out.tmp$$" trap 'rm -f "$out_tmp"' EXIT INT TERM +> "$out_tmp" + +# Collect symbols exported from all object files. for f in "$@"; do dump -tov -X 32_64 "$f" | awk ' @@ -42,7 +45,7 @@ for f in "$@"; do } } ' -done > "$out_tmp" +done >> "$out_tmp" # Generate the export/import file. { -- cgit v0.12