]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - posix/Makefile
Correct type of SSIZE_MAX for 32-bit (bug 13575).
[thirdparty/glibc.git] / posix / Makefile
index efcbeff96a56d9f063340aac3e85148f9f03e50d..51dcf129ecbf49246e4bbac48bbb3daed74be0bd 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2017 Free Software Foundation, Inc.
+# Copyright (C) 1991-2018 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -23,13 +23,15 @@ subdir      := posix
 include ../Makeconfig
 
 headers        := sys/utsname.h sys/times.h sys/wait.h sys/types.h unistd.h          \
-          glob.h regex.h wordexp.h fnmatch.h getopt.h                        \
+          glob.h regex.h wordexp.h fnmatch.h                                 \
+          getopt.h bits/getopt_core.h bits/getopt_ext.h bits/getopt_posix.h  \
           bits/types.h bits/typesizes.h bits/pthreadtypes.h                  \
+          bits/pthreadtypes-arch.h bits/thread-shared-types.h                \
           bits/posix1_lim.h bits/posix2_lim.h bits/posix_opt.h               \
           bits/local_lim.h tar.h bits/utsname.h bits/confname.h              \
           bits/waitflags.h bits/waitstatus.h sys/unistd.h sched.h            \
-          bits/sched.h re_comp.h wait.h bits/environments.h cpio.h           \
-          spawn.h bits/unistd.h
+          bits/sched.h bits/cpu-set.h re_comp.h wait.h bits/environments.h   \
+          cpio.h spawn.h bits/unistd.h
 
 routines :=                                                                  \
        uname                                                                 \
@@ -43,7 +45,8 @@ routines :=                                                                 \
        getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid             \
        getresuid getresgid setresuid setresgid                               \
        pathconf sysconf fpathconf                                            \
-       glob glob64 fnmatch regex                                             \
+       glob glob64 globfree globfree64 glob_pattern_p fnmatch regex          \
+       glob-lstat-compat glob64-lstat-compat                                 \
        confstr                                                               \
        getopt getopt1                                                        \
        sched_setp sched_getp sched_sets sched_gets sched_yield sched_primax  \
@@ -67,36 +70,43 @@ tests               := test-errno tstgetopt testfnm runtests runptests \
                   tst-mmap tst-mmap-offset tst-getaddrinfo tst-truncate \
                   tst-truncate64 tst-fork tst-fnmatch tst-regexloc tst-dir \
                   tst-chmod bug-regex1 bug-regex2 bug-regex3 bug-regex4 \
-                  tst-gnuglob tst-regex bug-regex5 bug-regex6 bug-regex7 \
+                  tst-gnuglob tst-gnuglob64 tst-regex bug-regex6 bug-regex7 \
                   bug-regex8 bug-regex9 bug-regex10 bug-regex11 bug-regex12 \
                   bug-regex13 bug-regex14 bug-regex15 bug-regex16 \
-                  bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
+                  bug-regex17 bug-regex18 bug-regex19 \
                   bug-regex21 bug-regex22 bug-regex23 bug-regex24 \
                   bug-regex25 bug-regex26 bug-regex27 bug-regex28 \
                   bug-regex29 bug-regex30 bug-regex31 bug-regex32 \
-                  bug-regex33 tst-nice tst-nanosleep tst-regex2 \
+                  tst-nice tst-nanosleep tst-regex2 \
                   transbug tst-rxspencer tst-pcre tst-boost \
                   bug-ga1 tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
-                  tst-getaddrinfo2 bug-glob1 bug-glob2 bug-glob3 tst-sysconf \
+                  tst-getaddrinfo2 bug-glob2 bug-glob3 tst-sysconf \
                   tst-execvp1 tst-execvp2 tst-execlp1 tst-execlp2 \
                   tst-execv1 tst-execv2 tst-execl1 tst-execl2 \
                   tst-execve1 tst-execve2 tst-execle1 tst-execle2 \
-                  tst-execvp3 tst-execvp4 tst-rfc3484 tst-rfc3484-2 \
+                  tst-execvp3 tst-execvp4 \
                   tst-execvpe1 tst-execvpe2 tst-execvpe3 tst-execvpe4 \
                   tst-execvpe5 tst-execvpe6 \
-                  tst-rfc3484-3 \
                   tst-getaddrinfo3 tst-fnmatch2 tst-cpucount tst-cpuset \
                   bug-getopt1 bug-getopt2 bug-getopt3 bug-getopt4 \
                   bug-getopt5 tst-getopt_long1 bug-regex34 bug-regex35 \
-                  tst-pathconf tst-getaddrinfo4 tst-rxspencer-no-utf8 \
-                  tst-fnmatch3 bug-regex36 tst-getaddrinfo5 \
-                  tst-posix_spawn-fd \
-                  tst-posix_fadvise tst-posix_fadvise64
-xtests         := bug-ga2
+                  tst-pathconf tst-rxspencer-no-utf8 \
+                  tst-fnmatch3 bug-regex36 \
+                  tst-posix_spawn-fd tst-posix_spawn-setsid \
+                  tst-posix_fadvise tst-posix_fadvise64 \
+                  tst-sysconf-empty-chroot tst-glob_symlinks tst-fexecve \
+                  tst-glob-tilde test-ssize-max
+tests-internal := bug-regex5 bug-regex20 bug-regex33 \
+                  tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 \
+                  tst-glob_lstat_compat
+xtests         := bug-ga2 tst-getaddrinfo4 tst-getaddrinfo5
 ifeq (yes,$(build-shared))
 test-srcs      := globtest
 tests           += wordexp-test tst-exec tst-spawn tst-spawn2 tst-spawn3
 endif
+ifeq (yesyes,$(build-shared)$(have-thread-library))
+tests          += tst-getopt-cancel
+endif
 tests-static   = tst-exec-static tst-spawn-static
 tests          += $(tests-static)
 others         := getconf
@@ -134,7 +144,8 @@ tests-special += $(objpfx)bug-regex2-mem.out $(objpfx)bug-regex14-mem.out \
                 $(objpfx)tst-rxspencer-no-utf8-mem.out $(objpfx)tst-pcre-mem.out \
                 $(objpfx)tst-boost-mem.out $(objpfx)tst-getconf.out \
                 $(objpfx)bug-glob2-mem.out $(objpfx)tst-vfork3-mem.out \
-                $(objpfx)tst-fnmatch-mem.out $(objpfx)bug-regex36-mem.out
+                $(objpfx)tst-fnmatch-mem.out $(objpfx)bug-regex36-mem.out \
+                $(objpfx)tst-glob-tilde-mem.out
 xtests-special += $(objpfx)bug-ga2-mem.out
 endif
 
@@ -145,11 +156,11 @@ ifeq ($(run-built-tests),yes)
 ifeq (yes,$(build-shared))
 $(objpfx)globtest.out: globtest.sh $(objpfx)globtest
        $(SHELL) $< $(common-objpfx) '$(test-via-rtld-prefix)' \
-               '$(test-program-prefix)' '$(test-wrapper-env)'; \
+               '$(test-program-prefix)' '$(test-wrapper-env)' > $@; \
        $(evaluate-test)
 $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
        $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
-                '$(run-program-env)' '$(test-program-prefix-after-env)'; \
+                '$(run-program-env)' '$(test-program-prefix-after-env)' > $@; \
        $(evaluate-test)
 endif
 
@@ -193,32 +204,31 @@ $(objpfx)config-name.h: $(..)scripts/config-uname.sh $(common-objpfx)config.make
           '$(config-machine)-$(config-vendor)' > $@.new
        mv -f $@.new $@
 
-CFLAGS-getaddrinfo.c = -DRESOLVER -fexceptions
-CFLAGS-pause.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-pread.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-pread64.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-pwrite.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-pwrite64.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-sleep.c = -fexceptions
-CFLAGS-wait.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-waitid.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-waitpid.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-getopt.c = -fexceptions
-CFLAGS-wordexp.c = -fexceptions
+CFLAGS-getaddrinfo.c += -DRESOLVER -fexceptions
+CFLAGS-pause.c += -fexceptions -fasynchronous-unwind-tables
+CFLAGS-pread.c += -fexceptions -fasynchronous-unwind-tables
+CFLAGS-pread64.c += -fexceptions -fasynchronous-unwind-tables
+CFLAGS-pwrite.c += -fexceptions -fasynchronous-unwind-tables
+CFLAGS-pwrite64.c += -fexceptions -fasynchronous-unwind-tables
+CFLAGS-sleep.c += -fexceptions
+CFLAGS-wait.c += -fexceptions -fasynchronous-unwind-tables
+CFLAGS-waitid.c += -fexceptions -fasynchronous-unwind-tables
+CFLAGS-waitpid.c += -fexceptions -fasynchronous-unwind-tables
+CFLAGS-getopt.c += -fexceptions
+CFLAGS-wordexp.c += -fexceptions
 CFLAGS-wordexp.os = -fomit-frame-pointer
-CFLAGS-sysconf.c = -fexceptions -DGETCONF_DIR='"$(libexecdir)/getconf"'
-CFLAGS-pathconf.c = -fexceptions
-CFLAGS-fpathconf.c = -fexceptions
-CFLAGS-spawn.c = -fexceptions
+CFLAGS-sysconf.c += -fexceptions -DGETCONF_DIR='"$(libexecdir)/getconf"'
+CFLAGS-pathconf.c += -fexceptions
+CFLAGS-fpathconf.c += -fexceptions
+CFLAGS-spawn.c += -fexceptions
 CFLAGS-spawn.os = -fomit-frame-pointer
-CFLAGS-spawnp.c = -fexceptions
+CFLAGS-spawnp.c += -fexceptions
 CFLAGS-spawnp.os = -fomit-frame-pointer
-CFLAGS-spawni.c = -fexceptions
+CFLAGS-spawni.c += -fexceptions
 CFLAGS-spawni.os = -fomit-frame-pointer
-CFLAGS-pause.c = -fexceptions
-CFLAGS-glob.c = $(uses-callbacks) -fexceptions
-CFLAGS-glob64.c = $(uses-callbacks) -fexceptions
-CFLAGS-getconf.c = -DGETCONF_DIR='"$(libexecdir)/getconf"'
+CFLAGS-glob.c += $(uses-callbacks) -fexceptions
+CFLAGS-glob64.c += $(uses-callbacks) -fexceptions
+CFLAGS-getconf.c += -DGETCONF_DIR='"$(libexecdir)/getconf"'
 CFLAGS-execve.os = -fomit-frame-pointer
 CFLAGS-fexecve.os = -fomit-frame-pointer
 CFLAGS-execv.os = -fomit-frame-pointer
@@ -226,6 +236,7 @@ CFLAGS-execle.os = -fomit-frame-pointer
 CFLAGS-execl.os = -fomit-frame-pointer
 CFLAGS-execvp.os = -fomit-frame-pointer
 CFLAGS-execlp.os = -fomit-frame-pointer
+CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables
 
 tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
                --none random --col --color --colour
@@ -254,6 +265,8 @@ ptestcases.h: PTESTS PTESTS2C.sed
        LC_ALL=C sed -f PTESTS2C.sed < $< > $@T
        mv -f $@T $@
 
+$(objpfx)tst-getopt-cancel: $(shared-thread-library)
+
 test-xfail-annexc = yes
 $(objpfx)annexc.out: $(objpfx)annexc
        $(dir $<)$(notdir $<) '$(CC)' \
@@ -326,7 +339,7 @@ $(objpfx)tst-boost-mem.out: $(objpfx)tst-boost.out
        $(evaluate-test)
 
 $(objpfx)tst-getconf.out: tst-getconf.sh $(objpfx)getconf
-       $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'; \
+       $(SHELL) $< $(common-objpfx) '$(built-program-cmd)' > $@; \
        $(evaluate-test)
 
 $(objpfx)bug-ga2-mem.out: $(objpfx)bug-ga2.out
@@ -341,6 +354,12 @@ $(objpfx)bug-glob2-mem.out: $(objpfx)bug-glob2.out
        $(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@; \
        $(evaluate-test)
 
+tst-glob-tilde-ENV = MALLOC_TRACE=$(objpfx)tst-glob-tilde.mtrace
+
+$(objpfx)tst-glob-tilde-mem.out: $(objpfx)tst-glob-tilde.out
+       $(common-objpfx)malloc/mtrace $(objpfx)tst-glob-tilde.mtrace > $@; \
+       $(evaluate-test)
+
 $(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
                            $(objpfx)getconf.speclist FORCE
        $(addprefix $(..)./scripts/mkinstalldirs ,\