| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
subdir := misc |
| 23 |
|
| 24 |
include ../Makeconfig |
| 25 |
|
| 26 |
headers := \ |
| 27 |
a.out.h \ |
| 28 |
ar.h \ |
| 29 |
bits/err-ldbl.h \ |
| 30 |
bits/error-ldbl.h \ |
| 31 |
bits/error.h \ |
| 32 |
bits/hwcap.h \ |
| 33 |
bits/ioctl-types.h \ |
| 34 |
bits/ioctls.h \ |
| 35 |
bits/mman.h \ |
| 36 |
bits/param.h \ |
| 37 |
bits/select-decl.h \ |
| 38 |
bits/select.h \ |
| 39 |
bits/select2.h \ |
| 40 |
bits/stab.def \ |
| 41 |
bits/syslog-decl.h \ |
| 42 |
bits/syslog-ldbl.h \ |
| 43 |
bits/syslog-path.h \ |
| 44 |
bits/syslog.h \ |
| 45 |
bits/sysmacros.h \ |
| 46 |
bits/types/struct_iovec.h \ |
| 47 |
bits/uio-ext.h \ |
| 48 |
bits/uio_lim.h \ |
| 49 |
err.h \ |
| 50 |
error.h \ |
| 51 |
fstab.h \ |
| 52 |
libgen.h \ |
| 53 |
mntent.h \ |
| 54 |
paths.h \ |
| 55 |
regexp.h \ |
| 56 |
search.h \ |
| 57 |
sgtty.h \ |
| 58 |
stab.h \ |
| 59 |
sys/auxv.h \ |
| 60 |
sys/cdefs.h \ |
| 61 |
sys/dir.h \ |
| 62 |
sys/file.h \ |
| 63 |
sys/ioctl.h \ |
| 64 |
sys/mman.h \ |
| 65 |
sys/param.h \ |
| 66 |
sys/ptrace.h \ |
| 67 |
sys/queue.h \ |
| 68 |
sys/reboot.h \ |
| 69 |
sys/select.h \ |
| 70 |
sys/single_threaded.h \ |
| 71 |
sys/swap.h \ |
| 72 |
sys/syscall.h \ |
| 73 |
sys/sysinfo.h \ |
| 74 |
sys/syslog.h \ |
| 75 |
sys/sysmacros.h \ |
| 76 |
sys/uio.h \ |
| 77 |
sys/xattr.h \ |
| 78 |
syscall.h \ |
| 79 |
sysexits.h \ |
| 80 |
syslog.h \ |
| 81 |
ttyent.h \ |
| 82 |
# headers |
| 83 |
|
| 84 |
routines := \ |
| 85 |
acct \ |
| 86 |
allocate_once \ |
| 87 |
atomic_wide_counter \ |
| 88 |
brk \ |
| 89 |
chflags \ |
| 90 |
chroot \ |
| 91 |
daemon \ |
| 92 |
dirname \ |
| 93 |
efgcvt \ |
| 94 |
efgcvt_r \ |
| 95 |
err \ |
| 96 |
error \ |
| 97 |
fchflags \ |
| 98 |
fd_to_filename \ |
| 99 |
fdatasync \ |
| 100 |
fgetxattr \ |
| 101 |
flistxattr \ |
| 102 |
fremovexattr \ |
| 103 |
fsetxattr \ |
| 104 |
fstab \ |
| 105 |
fsync \ |
| 106 |
ftruncate \ |
| 107 |
ftruncate64 \ |
| 108 |
futimes \ |
| 109 |
futimesat \ |
| 110 |
getauxval \ |
| 111 |
getclktck \ |
| 112 |
getdomain \ |
| 113 |
getdtsz \ |
| 114 |
gethostid \ |
| 115 |
gethostname \ |
| 116 |
getloadavg \ |
| 117 |
getpagesize \ |
| 118 |
getpass \ |
| 119 |
getsysstats \ |
| 120 |
getttyent \ |
| 121 |
getusershell \ |
| 122 |
getxattr \ |
| 123 |
gtty \ |
| 124 |
hsearch \ |
| 125 |
hsearch_r \ |
| 126 |
ifunc-impl-list \ |
| 127 |
insremque \ |
| 128 |
ioctl \ |
| 129 |
lgetxattr \ |
| 130 |
listxattr \ |
| 131 |
llistxattr \ |
| 132 |
lremovexattr \ |
| 133 |
lsearch \ |
| 134 |
lsetxattr \ |
| 135 |
lutimes \ |
| 136 |
madvise \ |
| 137 |
makedev \ |
| 138 |
mincore \ |
| 139 |
mkdtemp \ |
| 140 |
mkostemp \ |
| 141 |
mkostemp64 \ |
| 142 |
mkostemps \ |
| 143 |
mkostemps64 \ |
| 144 |
mkstemp \ |
| 145 |
mkstemp64 \ |
| 146 |
mkstemps \ |
| 147 |
mkstemps64 \ |
| 148 |
mktemp \ |
| 149 |
mlock \ |
| 150 |
mlockall \ |
| 151 |
mmap \ |
| 152 |
mmap64 \ |
| 153 |
mntent \ |
| 154 |
mntent_r \ |
| 155 |
mprotect \ |
| 156 |
msync \ |
| 157 |
munlock \ |
| 158 |
munlockall \ |
| 159 |
munmap \ |
| 160 |
preadv \ |
| 161 |
preadv2 \ |
| 162 |
preadv64 \ |
| 163 |
preadv64v2 \ |
| 164 |
pselect \ |
| 165 |
ptrace \ |
| 166 |
pwritev \ |
| 167 |
pwritev2 \ |
| 168 |
pwritev64 \ |
| 169 |
pwritev64v2 \ |
| 170 |
qefgcvt \ |
| 171 |
qefgcvt_r \ |
| 172 |
readv \ |
| 173 |
reboot \ |
| 174 |
regexp \ |
| 175 |
remap_file_pages \ |
| 176 |
removexattr \ |
| 177 |
revoke \ |
| 178 |
sbrk \ |
| 179 |
select \ |
| 180 |
setdomain \ |
| 181 |
setegid \ |
| 182 |
seteuid \ |
| 183 |
sethostid \ |
| 184 |
sethostname \ |
| 185 |
setregid \ |
| 186 |
setreuid \ |
| 187 |
setxattr \ |
| 188 |
single_threaded \ |
| 189 |
sstk \ |
| 190 |
stty \ |
| 191 |
swapoff \ |
| 192 |
swapon \ |
| 193 |
sync \ |
| 194 |
syncfs \ |
| 195 |
syscall \ |
| 196 |
syslog \ |
| 197 |
truncate \ |
| 198 |
truncate64 \ |
| 199 |
tsearch \ |
| 200 |
ttyslot \ |
| 201 |
ualarm \ |
| 202 |
unwind-link \ |
| 203 |
usleep \ |
| 204 |
ustat \ |
| 205 |
utimes \ |
| 206 |
vhangup \ |
| 207 |
writev \ |
| 208 |
# routines |
| 209 |
|
| 210 |
|
| 211 |
routines_no_fortify += \ |
| 212 |
getdomain \ |
| 213 |
gethostname \ |
| 214 |
syslog \ |
| 215 |
# routines_no_fortify |
| 216 |
|
| 217 |
ifeq ($(run-built-tests),yes) |
| 218 |
ifeq (yes,$(build-shared)) |
| 219 |
ifneq ($(PERL),no) |
| 220 |
generated += \ |
| 221 |
tst-allocate_once-mem.out \ |
| 222 |
tst-allocate_once.mtrace \ |
| 223 |
tst-error1-mem.out \ |
| 224 |
tst-error1.mtrace \ |
| 225 |
# generated |
| 226 |
endif |
| 227 |
endif |
| 228 |
endif |
| 229 |
|
| 230 |
aux := init-misc |
| 231 |
install-lib := libg.a |
| 232 |
|
| 233 |
gpl2lgpl := \ |
| 234 |
error.c \ |
| 235 |
error.h \ |
| 236 |
# gpl2lgpl |
| 237 |
|
| 238 |
tests := \ |
| 239 |
bug-hsearch1 \ |
| 240 |
bug18240 \ |
| 241 |
tst-dbl-efgcvt \ |
| 242 |
tst-dirname \ |
| 243 |
tst-empty \ |
| 244 |
tst-error1 \ |
| 245 |
tst-fdset \ |
| 246 |
tst-hsearch \ |
| 247 |
tst-insremque \ |
| 248 |
tst-ioctl \ |
| 249 |
tst-ldbl-efgcvt \ |
| 250 |
tst-ldbl-error \ |
| 251 |
tst-ldbl-errorfptr \ |
| 252 |
tst-ldbl-warn \ |
| 253 |
tst-makedev \ |
| 254 |
tst-mntent \ |
| 255 |
tst-mntent-autofs \ |
| 256 |
tst-mntent-blank-corrupt \ |
| 257 |
tst-mntent-blank-passno \ |
| 258 |
tst-mntent-escape \ |
| 259 |
tst-mntent2 \ |
| 260 |
tst-mremap1 \ |
| 261 |
tst-mremap2 \ |
| 262 |
tst-preadvwritev \ |
| 263 |
tst-preadvwritev2 \ |
| 264 |
tst-preadvwritev64 \ |
| 265 |
tst-preadvwritev64v2 \ |
| 266 |
tst-pselect \ |
| 267 |
tst-select \ |
| 268 |
tst-syscalls \ |
| 269 |
tst-tsearch \ |
| 270 |
tst-warn-wide \ |
| 271 |
# tests |
| 272 |
|
| 273 |
tests-time64 := \ |
| 274 |
tst-ioctl-time64 \ |
| 275 |
tst-pselect-time64 \ |
| 276 |
tst-select-time64 \ |
| 277 |
# tests-time64 |
| 278 |
|
| 279 |
|
| 280 |
ifeq (yes,$(build-shared)) |
| 281 |
tests += tst-gethostid |
| 282 |
endif |
| 283 |
|
| 284 |
tests-internal := \ |
| 285 |
tst-allocate_once \ |
| 286 |
tst-atomic \ |
| 287 |
tst-atomic-long \ |
| 288 |
# tests-internal |
| 289 |
tests-static := tst-empty |
| 290 |
|
| 291 |
|
| 292 |
tests-internal += tst-fd_to_filename |
| 293 |
tests-static += tst-fd_to_filename |
| 294 |
|
| 295 |
|
| 296 |
xtests += \ |
| 297 |
tst-mkstemp-fuse \ |
| 298 |
tst-mkstemp-fuse-parallel \ |
| 299 |
# xtests |
| 300 |
|
| 301 |
ifeq ($(run-built-tests),yes) |
| 302 |
ifeq (yes,$(build-shared)) |
| 303 |
ifneq ($(PERL),no) |
| 304 |
tests-special += \ |
| 305 |
$(objpfx)tst-allocate_once-mem.out \ |
| 306 |
$(objpfx)tst-error1-mem.out \ |
| 307 |
# tests-special |
| 308 |
endif |
| 309 |
endif |
| 310 |
endif |
| 311 |
|
| 312 |
tests-container := \ |
| 313 |
tst-syslog \ |
| 314 |
tst-syslog-long-progname \ |
| 315 |
# tests-container |
| 316 |
|
| 317 |
CFLAGS-select.c += -fexceptions -fasynchronous-unwind-tables |
| 318 |
CFLAGS-tsearch.c += $(uses-callbacks) |
| 319 |
CFLAGS-lsearch.c += $(uses-callbacks) |
| 320 |
CFLAGS-pselect.c += -fexceptions |
| 321 |
CFLAGS-readv.c += -fexceptions -fasynchronous-unwind-tables |
| 322 |
CFLAGS-writev.c += -fexceptions -fasynchronous-unwind-tables |
| 323 |
CFLAGS-preadv.c += -fexceptions -fasynchronous-unwind-tables |
| 324 |
CFLAGS-preadv64.c += -fexceptions -fasynchronous-unwind-tables |
| 325 |
CFLAGS-pwritev.c += -fexceptions -fasynchronous-unwind-tables |
| 326 |
CFLAGS-pwritev64.c += -fexceptions -fasynchronous-unwind-tables |
| 327 |
CFLAGS-preadv2.c += -fexceptions -fasynchronous-unwind-tables |
| 328 |
CFLAGS-preadv64v2.c += -fexceptions -fasynchronous-unwind-tables |
| 329 |
CFLAGS-pwritev2.c += -fexceptions -fasynchronous-unwind-tables |
| 330 |
CFLAGS-pwritev64v2.c += -fexceptions -fasynchronous-unwind-tables |
| 331 |
CFLAGS-usleep.c += -fexceptions |
| 332 |
CFLAGS-syslog.c += -fexceptions |
| 333 |
CFLAGS-error.c += -fexceptions |
| 334 |
CFLAGS-getpass.c += -fexceptions |
| 335 |
CFLAGS-mkstemp.c += -fexceptions |
| 336 |
CFLAGS-mkstemp64.c += -fexceptions |
| 337 |
CFLAGS-getsysstats.c += -fexceptions |
| 338 |
CFLAGS-getusershell.c += -fexceptions |
| 339 |
CFLAGS-err.c += -fexceptions |
| 340 |
CFLAGS-tst-tsearch.c += $(stack-align-test-flags) |
| 341 |
CFLAGS-msync.c += -fexceptions -fasynchronous-unwind-tables |
| 342 |
CFLAGS-fdatasync.c += -fexceptions -fasynchronous-unwind-tables |
| 343 |
CFLAGS-fsync.c += -fexceptions -fasynchronous-unwind-tables |
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
CFLAGS-sbrk.o = $(no-stack-protector) |
| 348 |
CFLAGS-sbrk.op = $(no-stack-protector) |
| 349 |
CFLAGS-brk.o = $(no-stack-protector) |
| 350 |
CFLAGS-brk.op = $(no-stack-protector) |
| 351 |
CFLAGS-mmap.o = $(no-stack-protector) |
| 352 |
CFLAGS-mmap.op = $(no-stack-protector) |
| 353 |
CFLAGS-mmap64.o = $(no-stack-protector) |
| 354 |
CFLAGS-mmap64.op = $(no-stack-protector) |
| 355 |
|
| 356 |
include ../Rules |
| 357 |
|
| 358 |
$(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib) |
| 359 |
|
| 360 |
$(objpfx)tst-tsearch: $(libm) |
| 361 |
|
| 362 |
tst-error1-ENV = MALLOC_TRACE=$(objpfx)tst-error1.mtrace \ |
| 363 |
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so |
| 364 |
tst-error1-ARGS = $(objpfx)tst-error1.out |
| 365 |
$(objpfx)tst-error1-mem.out: $(objpfx)tst-error1.out |
| 366 |
$(common-objpfx)malloc/mtrace $(objpfx)tst-error1.mtrace > $@; \ |
| 367 |
$(evaluate-test) |
| 368 |
|
| 369 |
tst-allocate_once-ENV = MALLOC_TRACE=$(objpfx)tst-allocate_once.mtrace \ |
| 370 |
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so |
| 371 |
$(objpfx)tst-allocate_once-mem.out: $(objpfx)tst-allocate_once.out |
| 372 |
$(common-objpfx)malloc/mtrace $(objpfx)tst-allocate_once.mtrace > $@; \ |
| 373 |
$(evaluate-test) |
| 374 |
|
| 375 |
tst-syslog-long-progname-ENV = GLIBC_TUNABLES=glibc.malloc.check=3 \ |
| 376 |
LD_PRELOAD=libc_malloc_debug.so.0 |
| 377 |
|
| 378 |
$(objpfx)tst-select: $(librt) |
| 379 |
$(objpfx)tst-select-time64: $(librt) |
| 380 |
$(objpfx)tst-pselect: $(librt) |
| 381 |
$(objpfx)tst-pselect-time64: $(librt) |
| 382 |
$(objpfx)tst-mkstemp-fuse-parallel: $(shared-thread-library) |