Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | From e98779aa56fae0346dff2d0b72acadd0eaf01891 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Wed, 27 May 2015 16:10:50 -0700 |
| 4 | Subject: [PATCH 27/27] eglibc-use-option-groups: Conditionally exclude c++ |
| 5 | tests |
| 6 | |
| 7 | Some test programs written in c++ are still included in spite of |
| 8 | "libc-cxx-tests" being omitted from DISTRO_FEATURES_LIBC. |
| 9 | All .cc programs are compiled with g++. |
| 10 | g++ automatically specifies linking against the C++ library. |
| 11 | This patch conditionally excludes the following tests as well: |
| 12 | |
| 13 | bug-atexit3-lib.cc |
| 14 | tst-cancel24.cc |
| 15 | tst-cancel24-static.cc |
| 16 | tst-unique3lib.cc |
| 17 | tst-unique3lib2.cc |
| 18 | tst-unique4lib.cc |
| 19 | tst-unique3.cc |
| 20 | tst-unique4.cc |
| 21 | |
| 22 | Tested with DISTRO_FEATURES_LIBC_remove = " libc-cxx-tests" |
| 23 | |
| 24 | [YOCTO #7003] |
| 25 | |
| 26 | Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> |
| 27 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 28 | --- |
| 29 | dlfcn/Makefile | 8 ++++++-- |
| 30 | elf/Makefile | 19 ++++++++++++++----- |
| 31 | nptl/Makefile | 12 ++++++++++-- |
| 32 | 3 files changed, 30 insertions(+), 9 deletions(-) |
| 33 | |
| 34 | diff --git a/dlfcn/Makefile b/dlfcn/Makefile |
| 35 | index 3827607..920bd58 100644 |
| 36 | --- a/dlfcn/Makefile |
| 37 | +++ b/dlfcn/Makefile |
| 38 | @@ -39,16 +39,20 @@ ifeq (yes,$(build-shared)) |
| 39 | tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \ |
| 40 | bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \ |
| 41 | tstatexit bug-dl-leaf tst-rec-dlopen |
| 42 | -endif |
| 43 | - |
| 44 | tests-$(OPTION_EGLIBC_CXX_TESTS) += bug-atexit3 |
| 45 | |
| 46 | +endif |
| 47 | + |
| 48 | modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \ |
| 49 | defaultmod2 errmsg1mod modatexit modcxaatexit \ |
| 50 | bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \ |
| 51 | bug-atexit2-lib bug-dl-leaf-lib \ |
| 52 | bug-dl-leaf-lib-cb moddummy1 moddummy2 |
| 53 | |
| 54 | +ifeq (y,$(OPTION_EGLIBC_CXX_TESTS)) |
| 55 | +modules-names += bug-atexit3-lib |
| 56 | +endif |
| 57 | + |
| 58 | failtestmod.so-no-z-defs = yes |
| 59 | glreflib2.so-no-z-defs = yes |
| 60 | errmsg1mod.so-no-z-defs = yes |
| 61 | diff --git a/elf/Makefile b/elf/Makefile |
| 62 | index 71a18a1..26fe3c5 100644 |
| 63 | --- a/elf/Makefile |
| 64 | +++ b/elf/Makefile |
| 65 | @@ -17,6 +17,8 @@ |
| 66 | |
| 67 | # Makefile for elf subdirectory of GNU C Library. |
| 68 | |
| 69 | +include ../option-groups.mak |
| 70 | + |
| 71 | subdir := elf |
| 72 | |
| 73 | include ../Makeconfig |
| 74 | @@ -145,12 +147,15 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \ |
| 75 | unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \ |
| 76 | tst-audit1 tst-audit2 tst-audit8 tst-audit9 \ |
| 77 | tst-stackguard1 tst-addr1 tst-thrlock \ |
| 78 | - tst-unique1 tst-unique2 $(if $(CXX),tst-unique3 tst-unique4 \ |
| 79 | - tst-nodelete) \ |
| 80 | + tst-unique1 tst-unique2 \ |
| 81 | tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \ |
| 82 | tst-ptrguard1 tst-tlsalign tst-tlsalign-extern tst-nodelete-opened \ |
| 83 | tst-nodelete2 |
| 84 | # reldep9 |
| 85 | +ifeq (y,$(OPTION_EGLIBC_CXX_TESTS)) |
| 86 | +tests += $(if $(CXX),tst-unique3 tst-unique4 tst-nodelete) |
| 87 | +endif |
| 88 | + |
| 89 | ifeq ($(build-hardcoded-path-in-tests),yes) |
| 90 | tests += tst-dlopen-aout |
| 91 | LDFLAGS-tst-dlopen-aout = $(no-pie-ldflag) |
| 92 | @@ -209,9 +214,6 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ |
| 93 | tst-unique1mod1 tst-unique1mod2 \ |
| 94 | tst-unique2mod1 tst-unique2mod2 \ |
| 95 | tst-auditmod9a tst-auditmod9b \ |
| 96 | - $(if $(CXX),tst-unique3lib tst-unique3lib2 tst-unique4lib \ |
| 97 | - tst-nodelete-uniquemod tst-nodelete-rtldmod \ |
| 98 | - tst-nodelete-zmod) \ |
| 99 | tst-initordera1 tst-initorderb1 \ |
| 100 | tst-initordera2 tst-initorderb2 \ |
| 101 | tst-initordera3 tst-initordera4 \ |
| 102 | @@ -220,6 +222,13 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ |
| 103 | tst-relsort1mod1 tst-relsort1mod2 tst-array2dep \ |
| 104 | tst-array5dep tst-null-argv-lib \ |
| 105 | tst-tlsalign-lib tst-nodelete-opened-lib tst-nodelete2mod |
| 106 | + |
| 107 | +ifeq (y,$(OPTION_EGLIBC_CXX_TESTS)) |
| 108 | +modules-names += $(if $(CXX),tst-unique3lib tst-unique3lib2 tst-unique4lib \ |
| 109 | + tst-nodelete-uniquemod tst-nodelete-rtldmod \ |
| 110 | + tst-nodelete-zmod) |
| 111 | +endif |
| 112 | + |
| 113 | ifeq (yes,$(have-protected-data)) |
| 114 | modules-names += tst-protected1moda tst-protected1modb |
| 115 | tests += tst-protected1a tst-protected1b |
| 116 | diff --git a/nptl/Makefile b/nptl/Makefile |
| 117 | index 596ca3c..50a708b 100644 |
| 118 | --- a/nptl/Makefile |
| 119 | +++ b/nptl/Makefile |
| 120 | @@ -390,12 +390,20 @@ link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \ |
| 121 | $(common-objpfx)libc.a |
| 122 | |
| 123 | tests-static += tst-locale1 tst-locale2 tst-stackguard1-static \ |
| 124 | - tst-cancel21-static tst-cancel24-static tst-cond8-static \ |
| 125 | + tst-cancel21-static tst-cond8-static \ |
| 126 | tst-mutex8-static tst-mutexpi8-static tst-sem11-static \ |
| 127 | tst-sem12-static |
| 128 | -tests += tst-stackguard1-static tst-cancel21-static tst-cancel24-static \ |
| 129 | + |
| 130 | +ifeq (y,$(OPTION_EGLIBC_CXX_TESTS)) |
| 131 | +tests-static += tst-cancel24-static |
| 132 | +endif |
| 133 | + |
| 134 | +tests += tst-stackguard1-static tst-cancel21-static \ |
| 135 | tst-cond8-static tst-mutex8-static tst-mutexpi8-static \ |
| 136 | tst-sem11-static tst-sem12-static |
| 137 | + |
| 138 | +tests-$(OPTION_EGLIBC_CXX_TESTS) += tst-cancel24-static |
| 139 | + |
| 140 | xtests-static += tst-setuid1-static |
| 141 | |
| 142 | # These tests are linked with libc before libpthread |
| 143 | -- |
| 144 | 2.1.4 |
| 145 | |