This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FAIL: elf/tst-dlopen-aout?


On Fri, Apr 11, 2014 at 10:24 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Paul Pluzhnikov <ppluzhnikov@google.com> writes:
>
>> That requires that I build a separate b.out, and try to dlopen it from
>> tst-dlopen-aout. Unfortunately, I completely failed to understand the
>> Makefile machinery to have a test that depends on another binary.
>
> Add it to the dependency list of the *.out file.

I have added new source: elf/tst-dlopen-aout-helper.c, and modified
elf/Makefile like so:

--- a/elf/Makefile
+++ b/elf/Makefile
@@ -148,11 +148,8 @@ tests += loadtest restest1 preloadtest loadfail
multiload origtest resolvfail \
         tst-stackguard1 tst-addr1 tst-thrlock \
         tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
         tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \
-        tst-ptrguard1
+        tst-ptrguard1 tst-dlopen-aout
 #       reldep9
-ifeq ($(build-hardcoded-path-in-tests),yes)
-tests += tst-dlopen-aout
-endif
 test-srcs = tst-pathopt
 selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
 ifneq ($(selinux-enabled),1)
@@ -1060,6 +1057,8 @@ $(objpfx)tst-addr1: $(libdl)

 $(objpfx)tst-thrlock: $(libdl) $(shared-thread-library)
 $(objpfx)tst-dlopen-aout: $(libdl) $(shared-thread-library)
+$(objpfx)tst-dlopen-aout.out: $(objpfx)tst-dlopen-aout-helper
+# $(objpfx)tst-dlopen-aout-helper: tst-dlopen-aout-helper.c

 CFLAGS-ifuncmain1pic.c += $(pic-ccflag)
 CFLAGS-ifuncmain1picstatic.c += $(pic-ccflag)


This produces

make[1]: Leaving directory `/glibc/elf'
make: *** No rule to make target `/build/elf/tst-dlopen-aout-helper',
needed by `/build/elf/tst-dlopen-aout.out'.  Stop.

If I comment in this line:

  $(objpfx)tst-dlopen-aout-helper: tst-dlopen-aout-helper.c

then there is no make error (but no tst-dlopen-aout-helper is linked either).

I am utterly failing to understand why implicit rules aren't kicking
in, or what I need to do to get tst-dlopen-aout-helper built.

Help?

Thanks,
-- 
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]