]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4re-core/uclibc/lib/contrib/uclibc/test/dlopen/Makefile.in
Update
[l4.git] / l4 / pkg / l4re-core / uclibc / lib / contrib / uclibc / test / dlopen / Makefile.in
1 # uClibc dlopen tests
2 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
3
4 # rules need a little love to work with glibc ...
5 export UCLIBC_ONLY := 1
6
7 TESTS := dltest dltest2 dlstatic test1 test2 test3 dlundef dlafk dladdr \
8         testscope
9
10 ifneq ($(HAVE_SHARED),y)
11 TESTS_DISABLED := test3
12 LDFLAGS_libtest.so := -lpthread
13 endif
14
15 CFLAGS_dltest    := -DLIBNAME="\"./libtest.so\""
16 CFLAGS_dltest2   := -DLIBNAME="\"./libtest3.so\""
17
18 LDFLAGS_dlstatic := -ldl
19 LDFLAGS_dltest   := -ldl
20 LDFLAGS_dltest2  := -ldl
21 LDFLAGS_dlundef  := -ldl
22 LDFLAGS_dlafk    := -ldl ./libafk.so -Wl,-rpath,.
23 LDFLAGS_test1    := -ldl
24 LDFLAGS_test2    := -ldl
25 LDFLAGS_test3    := -ldl ./libtest1.so ./libtest2.so -Wl,-rpath,.
26 LDFLAGS_dladdr   := -ldl
27 LDFLAGS_testscope:= -ldl
28
29 DEBUG_LIBS := X
30 WRAPPER := env $(DEBUG_LIBS)=all LD_LIBRARY_PATH="$$PWD:.:$(LD_LIBRARY_PATH)"
31
32 # Build libC.so without -mprefergot compilation flag to force a
33 # R_SH_JMP_SLOT relocation instead of R_SH_GLOB_DAT for _libC_fini. This is
34 # needed to resolve the _libC_fini symbol when used (by libC.so destructor),
35 # whereas with GLOB_DAT relocation the resolution happens in the GOT entry
36 # when the libC is loaded, for the same reason remove also the "-z now"
37 # linker flag.
38 # These are needed to spot the issue test case want raise.
39
40 ifeq ($(TARGET_ARCH),sh)
41 CFLAGS-OMIT-libC.c = -mprefergot
42 endif
43 LDFLAGS-OMIT-libC.c = -Wl,-z,now
44
45 dltest: libtest.so
46 dltest2: libtest3.so
47 dlstatic: libstatic.so
48 dlundef: libundef.so
49 dlafk: libafk.so
50 testscope:libA.so
51 libafk.so: libafk-temp.so
52 LDFLAGS_libafk.so := ./libafk-temp.so -Wl,-rpath,.
53 test1: libtest1.so
54 test2: libtest1.so libtest2.so
55 test3: libtest1.so libtest2.so
56 libtest1.so: libtest2.so
57 libB.so: libC.so
58 libA.so: libB.so
59 LDFLAGS_libtest.so := -lpthread
60 LDFLAGS_libtest1.so := ./libtest2.so -Wl,-rpath,.
61 LDFLAGS_libtest2.so := -Wl,-rpath,.
62 LDFLAGS_libtest3.so := -lpthread -Wl,-rpath,.
63 LDFLAGS_libC.so := -ldl
64 LDFLAGS_libB.so := ./libC.so -Wl,-rpath,.
65 LDFLAGS_libA.so := ./libB.so -Wl,-rpath,.