[PATCH 1/2] dso-ordering-test.py: Put all sources in one directory [BZ #28550]
H.J. Lu
hjl.tools@gmail.com
Mon Nov 8 14:07:41 GMT 2021
On Mon, Nov 8, 2021 at 5:46 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu via Libc-alpha:
>
> > Also use a temporary file to generate Makefile fragments for DSO sorting
> > tests.
>
> I don't see this part in the patch?
This is the leftover from the old changes.
> > diff --git a/scripts/dso-ordering-test.py b/scripts/dso-ordering-test.py
> > index 944ee74052..26497159a0 100644
> > --- a/scripts/dso-ordering-test.py
> > +++ b/scripts/dso-ordering-test.py
> > @@ -526,9 +526,13 @@ def process_testcase(t):
> > base_test_name = t.test_name
> > test_subdir = base_test_name + "-dir"
> > testpfx = objpfx + test_subdir + "/"
> > + test_srcdir = "dso-sort-tests-src/"
> > + testpfx_src = objpfx + test_srcdir
> >
> > if not os.path.exists(testpfx):
> > os.mkdir(testpfx)
> > + if not os.path.exists(testpfx_src):
> > + os.mkdir(testpfx_src)
> >
> > def find_objs_not_depended_on(t):
> > objs_not_depended_on = []
> > @@ -595,6 +599,11 @@ def process_testcase(t):
> > # Print out needed Makefile fragments for use in glibc/elf/Makefile.
> > module_names = ""
> > for o in test_descr.objs:
> > + rule = ("$(objpfx)" + test_subdir + "/" + test_name
> > + + "-" + o + ".os: $(objpfx)" + test_srcdir
> > + + test_name + "-" + o + ".c\n"
> > + "\t$(compile.c) $(OUTPUT_OPTION)\n")
> > + makefile.write (rule);
>
> Spurious semicolon at end of line (there are multiple such cases).
I will remove them.
> Why do you put the generated test sources into a separate subdirectory?
>
To avoid the default make rule:
$(objpfx)%$o: $(objpfx)%.c $(before-compile); $$(compile-command.c)
which causes the problem for parallel build.
--
H.J.
More information about the Libc-alpha
mailing list