|
|
83f30e |
commit 183d99737298bb3200f0610fdcd1c7549c8ed560
|
|
|
83f30e |
Author: Florian Weimer <fweimer@redhat.com>
|
|
|
83f30e |
Date: Tue Sep 6 07:38:10 2022 +0200
|
|
|
83f30e |
|
|
|
83f30e |
scripts/dso-ordering-test.py: Generate program run-time dependencies
|
|
|
83f30e |
|
|
|
83f30e |
The main program needs to depend on all shared objects, even objects
|
|
|
83f30e |
that have link-time dependencies among shared objects. Filtering
|
|
|
83f30e |
out shared objects that already have an link-time dependencies is not
|
|
|
83f30e |
necessary here; make will do this automatically.
|
|
|
83f30e |
|
|
|
83f30e |
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
83f30e |
|
|
|
83f30e |
diff --git a/scripts/dso-ordering-test.py b/scripts/dso-ordering-test.py
|
|
|
83f30e |
index ee476c810c76f1b0..43b5ec4d920ad6a3 100644
|
|
|
83f30e |
--- a/scripts/dso-ordering-test.py
|
|
|
83f30e |
+++ b/scripts/dso-ordering-test.py
|
|
|
83f30e |
@@ -707,13 +707,12 @@ def process_testcase(t):
|
|
|
83f30e |
"\t$(compile.c) $(OUTPUT_OPTION)\n")
|
|
|
83f30e |
makefile.write (rule)
|
|
|
83f30e |
|
|
|
83f30e |
- not_depended_objs = find_objs_not_depended_on(test_descr)
|
|
|
83f30e |
- if not_depended_objs:
|
|
|
83f30e |
- depstr = ""
|
|
|
83f30e |
- for dep in not_depended_objs:
|
|
|
83f30e |
- depstr += (" $(objpfx)" + test_subdir + "/"
|
|
|
83f30e |
- + test_name + "-" + dep + ".so")
|
|
|
83f30e |
- makefile.write("$(objpfx)%s.out:%s\n" % (base_test_name, depstr))
|
|
|
83f30e |
+ # Ensure that all shared objects are built before running the
|
|
|
83f30e |
+ # test, whether there link-time dependencies or not.
|
|
|
83f30e |
+ depobjs = ["$(objpfx){}/{}-{}.so".format(test_subdir, test_name, dep)
|
|
|
83f30e |
+ for dep in test_descr.objs]
|
|
|
83f30e |
+ makefile.write("$(objpfx){}.out: {}\n".format(
|
|
|
83f30e |
+ base_test_name, " ".join(depobjs)))
|
|
|
83f30e |
|
|
|
83f30e |
# Add main executable to test-srcs
|
|
|
83f30e |
makefile.write("test-srcs += %s/%s\n" % (test_subdir, test_name))
|