File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,14 @@ LIB_LIST=$@
1919# unit name collisions which affect linking against the final artefact. For more
2020# details, please look at https://github.com/diffblue/cbmc/issues/7586 .
2121
22+ # Create a temporary folder for this script to work in.
23+ rm -rf add_dependencies_tmp
24+ mkdir add_dependencies_tmp
25+ cd add_dependencies_tmp
26+
27+ # The full path of the current "root" directory
28+ WORKING_DIR=$( pwd)
29+
2230# For each library to add:
2331for lib in ${LIB_LIST} ; do
2432 # We will unpack and rename all .o of dependent libraries marking them with
@@ -33,18 +41,18 @@ for lib in ${LIB_LIST}; do
3341 # Unpack the library
3442 ${AR_COMMAND} -x ${lib}
3543
36- # Rename all object file in the library prepending "${LIBNAME}_" to avoid
37- # clashes.
44+ # Rename all object files in the library prepending "${LIBNAME}_" to avoid
45+ # clashes, and move to the "root" folder .
3846 for obj in * .o; do
39- mv ${obj} " ${LIBNAME} _${obj} "
47+ mv ${obj} " ${WORKING_DIR} / ${ LIBNAME} _${obj} "
4048 done
4149
4250 # Move back to the working directory.
43- cd ..
51+ cd " ${WORKING_DIR} "
4452done
4553
4654# Append all the unpacked files to the destination library
47- ${AR_COMMAND} -rcs ${DESTINATION} ** / * .o
55+ ${AR_COMMAND} -rcs ${DESTINATION} * .o
4856
4957# TODO: See if we need to do some cleanup in order to save cache space for
5058# Github actions runners.
You can’t perform that action at this time.
0 commit comments