import less(1)
[unleashed/tickless.git] / usr / src / lib / libc / i386 / Makefile.com
blob89163635f55a0d62053cc998871e9c5c31b87eef
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
22 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Copyright 2016 Joyent, Inc.
24 # Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
25 # Copyright 2013 Garrett D'Amore <garrett@damore.org>
27 # Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
28 # Use is subject to license terms.
31 LIBCDIR=        $(SRC)/lib/libc
32 LIB_PIC=        libc_pic.a
33 VERS=           .1
34 TARGET_ARCH=    i386
36 # include comm page definitions
37 include $(SRC)/lib/commpage/Makefile.shared.com
38 include $(SRC)/lib/commpage/Makefile.shared.targ
40 VALUES=         values-Xa.o
42 # objects are grouped by source directory
44 # Symbol capabilities objects
45 EXTPICS=        \
46         $(LIBCDIR)/capabilities/i386-sse/i386/pics/symcap.o \
47         $(LIBCDIR)/capabilities/i386-sse2/i386/pics/symcap.o
49 # local objects
50 STRETS=
52 CRTOBJS=                        \
53         cerror.o                \
54         cerror64.o
56 DYNOBJS=                        \
57         _rtbootld.o
59 FPOBJS=                         \
60         _D_cplx_div.o           \
61         _D_cplx_div_ix.o        \
62         _D_cplx_div_rx.o        \
63         _D_cplx_lr_div.o        \
64         _D_cplx_lr_div_ix.o     \
65         _D_cplx_lr_div_rx.o     \
66         _D_cplx_mul.o           \
67         _F_cplx_div.o           \
68         _F_cplx_div_ix.o        \
69         _F_cplx_div_rx.o        \
70         _F_cplx_lr_div.o        \
71         _F_cplx_lr_div_ix.o     \
72         _F_cplx_lr_div_rx.o     \
73         _F_cplx_mul.o           \
74         _X_cplx_div.o           \
75         _X_cplx_div_ix.o        \
76         _X_cplx_div_rx.o        \
77         _X_cplx_lr_div.o        \
78         _X_cplx_lr_div_ix.o     \
79         _X_cplx_lr_div_rx.o     \
80         _X_cplx_mul.o           \
81         fpgetmask.o             \
82         fpgetround.o            \
83         fpgetsticky.o           \
84         fpsetmask.o             \
85         fpsetround.o            \
86         fpsetsticky.o           \
87         fpstart.o               \
88         ieee.o
90 FPASMOBJS=                      \
91         __xgetRD.o              \
92         _base_il.o              \
93         _xtoll.o                \
94         _xtoull.o               \
95         fpcw.o
97 ATOMICOBJS=                     \
98         atomic.o
100 CHACHAOBJS=                     \
101         chacha.o
103 XATTROBJS=                      \
104         xattr_common.o
106 COMOBJS=                        \
107         bcmp.o                  \
108         bcopy.o                 \
109         bsearch.o               \
110         bzero.o                 \
111         qsort.o                 \
112         strtol.o                \
113         strtoul.o               \
114         strtoll.o               \
115         strtoull.o
117 DTRACEOBJS=                     \
118         dtrace_data.o
120 SECFLAGSOBJS=                   \
121         secflags.o
123 GENOBJS=                        \
124         $(COMMPAGE_OBJS)        \
125         _div64.o                \
126         _divdi3.o               \
127         _getsp.o                \
128         _mul64.o                \
129         abs.o                   \
130         alloca.o                \
131         arc4random.o            \
132         arc4random_uniform.o    \
133         byteorder.o             \
134         byteorder64.o           \
135         cuexit.o                \
136         ecvt.o                  \
137         endian.o                \
138         errlst.o                \
139         fts.o                   \
140         freezero.o              \
141         i386_data.o             \
142         ladd.o                  \
143         ldivide.o               \
144         lmul.o                  \
145         lock.o                  \
146         lshiftl.o               \
147         lsign.o                 \
148         lsub.o                  \
149         makectxt.o              \
150         memccpy.o               \
151         memchr.o                \
152         memcmp.o                \
153         memcpy.o                \
154         memset.o                \
155         new_list.o              \
156         reallocarray.o          \
157         recallocarray.o         \
158         setjmp.o                \
159         siginfolst.o            \
160         siglongjmp.o            \
161         strcat.o                \
162         strchr.o                \
163         strcmp.o                \
164         strcpy.o                \
165         strlen.o                \
166         strncat.o               \
167         strncmp.o               \
168         strncpy.o               \
169         strnlen.o               \
170         strrchr.o               \
171         sync_instruction_memory.o\
172         unvis.o                 \
173         vis.o
175 # sysobjs that contain large-file interfaces
176 COMSYSOBJS64=                   \
177         fstatvfs64.o            \
178         getdents64.o            \
179         getrlimit64.o           \
180         lseek64.o               \
181         mmap64.o                \
182         pread64.o               \
183         preadv64.o              \
184         pwrite64.o              \
185         pwritev64.o             \
186         setrlimit64.o           \
187         statvfs64.o
189 SYSOBJS64=
191 COMSYSOBJS=                     \
192         __clock_timer.o         \
193         __getloadavg.o          \
194         __rusagesys.o           \
195         __signotify.o           \
196         __sigrt.o               \
197         __time.o                \
198         _lgrp_home_fast.o       \
199         _lgrpsys.o              \
200         _nfssys.o               \
201         _portfs.o               \
202         _pset.o                 \
203         _rpcsys.o               \
204         _sigaction.o            \
205         _so_accept.o            \
206         _so_bind.o              \
207         _so_connect.o           \
208         _so_getpeername.o       \
209         _so_getsockname.o       \
210         _so_getsockopt.o        \
211         _so_listen.o            \
212         _so_recv.o              \
213         _so_recvfrom.o          \
214         _so_recvmsg.o           \
215         _so_send.o              \
216         _so_sendmsg.o           \
217         _so_sendto.o            \
218         _so_setsockopt.o        \
219         _so_shutdown.o          \
220         _so_socket.o            \
221         _so_socketpair.o        \
222         _sockconfig.o           \
223         acct.o                  \
224         acl.o                   \
225         adjtime.o               \
226         alarm.o                 \
227         brk.o                   \
228         chdir.o                 \
229         chroot.o                \
230         close.o                 \
231         execve.o                \
232         exit.o                  \
233         facl.o                  \
234         fchdir.o                \
235         fchroot.o               \
236         fdsync.o                \
237         fpathconf.o             \
238         fstatfs.o               \
239         fstatvfs.o              \
240         getcpuid.o              \
241         getdents.o              \
242         getegid.o               \
243         geteuid.o               \
244         getgid.o                \
245         getgroups.o             \
246         gethrtime.o             \
247         getitimer.o             \
248         getmsg.o                \
249         getpid.o                \
250         getpmsg.o               \
251         getppid.o               \
252         getrandom.o             \
253         getrlimit.o             \
254         getuid.o                \
255         gtty.o                  \
256         install_utrap.o         \
257         ioctl.o                 \
258         kaio.o                  \
259         kill.o                  \
260         llseek.o                \
261         lseek.o                 \
262         mmapobjsys.o            \
263         memcntl.o               \
264         mincore.o               \
265         mmap.o                  \
266         modctl.o                \
267         mount.o                 \
268         mprotect.o              \
269         munmap.o                \
270         nice.o                  \
271         ntp_adjtime.o           \
272         ntp_gettime.o           \
273         p_online.o              \
274         pathconf.o              \
275         pause.o                 \
276         pcsample.o              \
277         pipe2.o                 \
278         pollsys.o               \
279         pread.o                 \
280         preadv.o                \
281         priocntlset.o           \
282         processor_bind.o        \
283         processor_info.o        \
284         profil.o                \
285         psecflagsset.o          \
286         putmsg.o                \
287         putpmsg.o               \
288         pwrite.o                \
289         pwritev.o               \
290         read.o                  \
291         readv.o                 \
292         resolvepath.o           \
293         seteguid.o              \
294         setgid.o                \
295         setgroups.o             \
296         setitimer.o             \
297         setreid.o               \
298         setrlimit.o             \
299         setuid.o                \
300         sigaltstk.o             \
301         sigprocmsk.o            \
302         sigsendset.o            \
303         sigsuspend.o            \
304         statfs.o                \
305         statvfs.o               \
306         stty.o                  \
307         sync.o                  \
308         sysconfig.o             \
309         sysfs.o                 \
310         sysinfo.o               \
311         syslwp.o                \
312         times.o                 \
313         ulimit.o                \
314         umask.o                 \
315         umount2.o               \
316         uname.o                 \
317         utssys.o                \
318         uucopy.o                \
319         vhangup.o               \
320         waitid.o                \
321         write.o                 \
322         writev.o                \
323         yield.o
325 SYSOBJS=                        \
326         __clock_gettime.o       \
327         __clock_gettime_sys.o   \
328         __getcontext.o          \
329         __uadmin.o              \
330         _lwp_mutex_unlock.o     \
331         _stack_grow.o           \
332         door.o                  \
333         forkx.o                 \
334         forkallx.o              \
335         getcontext.o            \
336         gettimeofday.o          \
337         lwp_private.o           \
338         ptrace.o                \
339         syscall.o               \
340         sysi86.o                \
341         tls_get_addr.o          \
342         uadmin.o                \
343         umount.o                \
344         vforkx.o                \
345         xstat.o
347 # objects under $(LIBCDIR)/port which contain transitional large file interfaces
348 PORTGEN64=                      \
349         _xftw64.o               \
350         attropen64.o            \
351         ftw64.o                 \
352         mkstemp64.o             \
353         nftw64.o                \
354         tell64.o                \
355         truncate64.o
357 # objects from source under $(LIBCDIR)/port
358 PORTFP=                         \
359         __flt_decim.o           \
360         __flt_rounds.o          \
361         __tbl_10_b.o            \
362         __tbl_10_h.o            \
363         __tbl_10_s.o            \
364         __tbl_2_b.o             \
365         __tbl_2_h.o             \
366         __tbl_2_s.o             \
367         __tbl_fdq.o             \
368         __tbl_tens.o            \
369         __x_power.o             \
370         _base_sup.o             \
371         aconvert.o              \
372         decimal_bin.o           \
373         double_decim.o          \
374         econvert.o              \
375         fconvert.o              \
376         file_decim.o            \
377         finite.o                \
378         fp_data.o               \
379         func_decim.o            \
380         gconvert.o              \
381         hex_bin.o               \
382         ieee_globals.o          \
383         pack_float.o            \
384         sigfpe.o                \
385         string_decim.o
387 PORTGEN=                        \
388         _env_data.o             \
389         _xftw.o                 \
390         a64l.o                  \
391         abort.o                 \
392         addsev.o                \
393         ascii_strcasecmp.o      \
394         ascii_strncasecmp.o     \
395         assert.o                \
396         atof.o                  \
397         atoi.o                  \
398         atol.o                  \
399         atoll.o                 \
400         attrat.o                \
401         attropen.o              \
402         atexit.o                \
403         atfork.o                \
404         base64.o                \
405         basename.o              \
406         calloc.o                \
407         catgets.o               \
408         catopen.o               \
409         cfgetispeed.o           \
410         cfgetospeed.o           \
411         cfree.o                 \
412         cfsetispeed.o           \
413         cfsetospeed.o           \
414         cftime.o                \
415         clock.o                 \
416         closedir.o              \
417         closefrom.o             \
418         confstr.o               \
419         crypt.o                 \
420         csetlen.o               \
421         ctime.o                 \
422         daemon.o                \
423         deflt.o                 \
424         directio.o              \
425         dirname.o               \
426         div.o                   \
427         drand48.o               \
428         dup.o                   \
429         env_data.o              \
430         err.o                   \
431         errno.o                 \
432         euclen.o                \
433         event_port.o            \
434         execvp.o                \
435         explicit_bzero.o        \
436         fattach.o               \
437         fdetach.o               \
438         fdopendir.o             \
439         ffs.o                   \
440         flock.o                 \
441         fls.o                   \
442         fmtmsg.o                \
443         ftime.o                 \
444         ftok.o                  \
445         ftw.o                   \
446         gcvt.o                  \
447         getauxv.o               \
448         getcwd.o                \
449         getdate_err.o           \
450         getdtblsize.o           \
451         getentropy.o            \
452         getenv.o                \
453         getexecname.o           \
454         getgrnam.o              \
455         getgrnam_r.o            \
456         gethostid.o             \
457         gethostname.o           \
458         gethz.o                 \
459         getisax.o               \
460         getloadavg.o            \
461         getlogin.o              \
462         getmntent.o             \
463         getnetgrent.o           \
464         get_nprocs.o            \
465         getopt.o                \
466         getopt_long.o           \
467         getpagesize.o           \
468         getpw.o                 \
469         getpwnam.o              \
470         getpwnam_r.o            \
471         getrusage.o             \
472         getspent.o              \
473         getspent_r.o            \
474         getsubopt.o             \
475         gettxt.o                \
476         getusershell.o          \
477         getut.o                 \
478         getutx.o                \
479         getvfsent.o             \
480         getwd.o                 \
481         getwidth.o              \
482         getxby_door.o           \
483         gtxt.o                  \
484         hsearch.o               \
485         iconv.o                 \
486         imaxabs.o               \
487         imaxdiv.o               \
488         index.o                 \
489         initgroups.o            \
490         insque.o                \
491         isaexec.o               \
492         isastream.o             \
493         isatty.o                \
494         killpg.o                \
495         klpdlib.o               \
496         l64a.o                  \
497         lckpwdf.o               \
498         lconstants.o            \
499         lexp10.o                \
500         lfind.o                 \
501         lfmt.o                  \
502         lfmt_log.o              \
503         llabs.o                 \
504         lldiv.o                 \
505         llog10.o                \
506         lltostr.o               \
507         localtime.o             \
508         lsearch.o               \
509         madvise.o               \
510         malloc.o                \
511         memalign.o              \
512         memmem.o                \
513         mkdev.o                 \
514         mkdtemp.o               \
515         mkfifo.o                \
516         mkstemp.o               \
517         mktemp.o                \
518         mlock.o                 \
519         mlockall.o              \
520         mon.o                   \
521         msync.o                 \
522         munlock.o               \
523         munlockall.o            \
524         ndbm.o                  \
525         nftw.o                  \
526         nlspath_checks.o        \
527         nsparse.o               \
528         nss_common.o            \
529         nss_dbdefs.o            \
530         nss_deffinder.o         \
531         opendir.o               \
532         opt_data.o              \
533         perror.o                \
534         pfmt.o                  \
535         pfmt_data.o             \
536         pfmt_print.o            \
537         pipe.o                  \
538         plock.o                 \
539         poll.o                  \
540         posix_fadvise.o         \
541         posix_fallocate.o       \
542         posix_madvise.o         \
543         posix_memalign.o        \
544         priocntl.o              \
545         privlib.o               \
546         priv_str_xlate.o        \
547         psecflags.o             \
548         psiginfo.o              \
549         psignal.o               \
550         pt.o                    \
551         putpwent.o              \
552         putspent.o              \
553         raise.o                 \
554         rand.o                  \
555         random.o                \
556         rctlops.o               \
557         readdir.o               \
558         readdir_r.o             \
559         realpath.o              \
560         reboot.o                \
561         regexpr.o               \
562         remove.o                \
563         rewinddir.o             \
564         rindex.o                \
565         scandir.o               \
566         seekdir.o               \
567         select.o                \
568         setlabel.o              \
569         setmode.o               \
570         setpriority.o           \
571         settimeofday.o          \
572         sh_locks.o              \
573         sigflag.o               \
574         siglist.o               \
575         sigsend.o               \
576         sigsetops.o             \
577         ssignal.o               \
578         stack.o                 \
579         stpcpy.o                \
580         stpncpy.o               \
581         str2sig.o               \
582         strcase_charmap.o       \
583         strchrnul.o             \
584         strcspn.o               \
585         strdup.o                \
586         strerror.o              \
587         strlcat.o               \
588         strlcpy.o               \
589         strndup.o               \
590         strpbrk.o               \
591         strsep.o                \
592         strsignal.o             \
593         strspn.o                \
594         strstr.o                \
595         strtod.o                \
596         strtoimax.o             \
597         strtok.o                \
598         strtok_r.o              \
599         strtonum.o              \
600         strtoumax.o             \
601         swab.o                  \
602         swapctl.o               \
603         sysconf.o               \
604         syslog.o                \
605         tcdrain.o               \
606         tcflow.o                \
607         tcflush.o               \
608         tcgetattr.o             \
609         tcgetpgrp.o             \
610         tcgetsid.o              \
611         tcsendbreak.o           \
612         tcsetattr.o             \
613         tcsetpgrp.o             \
614         tell.o                  \
615         telldir.o               \
616         tfind.o                 \
617         time_data.o             \
618         time_gdata.o            \
619         timespec_get.o          \
620         tls_data.o              \
621         truncate.o              \
622         tsdalloc.o              \
623         tsearch.o               \
624         ttyname.o               \
625         ttyslot.o               \
626         ualarm.o                \
627         ucred.o                 \
628         valloc.o                \
629         vlfmt.o                 \
630         vpfmt.o                 \
631         waitpid.o               \
632         walkstack.o             \
633         wdata.o                 \
634         xgetwidth.o             \
635         xpg4.o                  \
636         xpg6.o
638 PORTPRINT_W=                    \
639         doprnt_w.o
641 PORTPRINT=                      \
642         asprintf.o              \
643         doprnt.o                \
644         fprintf.o               \
645         printf.o                \
646         snprintf.o              \
647         sprintf.o               \
648         vfprintf.o              \
649         vprintf.o               \
650         vsnprintf.o             \
651         vsprintf.o              \
652         vwprintf.o              \
653         wprintf.o
655 # c89 variants to support 32-bit size of c89 u/intmax_t (32-bit libc only)
656 PORTPRINT_C89=                  \
657         vfprintf_c89.o          \
658         vprintf_c89.o           \
659         vsnprintf_c89.o         \
660         vsprintf_c89.o          \
661         vwprintf_c89.o
663 PORTSTDIO_C89=                  \
664         vscanf_c89.o            \
665         vwscanf_c89.o           \
667 # portable stdio objects that contain large file interfaces.
668 # Note: fopen64 is a special case, as we build it small.
669 PORTSTDIO64=                    \
670         fopen64.o               \
671         fpos64.o
673 PORTSTDIO_W=                    \
674         doscan_w.o
676 PORTSTDIO=                      \
677         __extensions.o          \
678         _endopen.o              \
679         _filbuf.o               \
680         _findbuf.o              \
681         _flsbuf.o               \
682         _wrtchk.o               \
683         clearerr.o              \
684         ctermid.o               \
685         ctermid_r.o             \
686         cuserid.o               \
687         data.o                  \
688         doscan.o                \
689         fdopen.o                \
690         feof.o                  \
691         ferror.o                \
692         fgetc.o                 \
693         fgets.o                 \
694         fileno.o                \
695         flockf.o                \
696         flush.o                 \
697         fopen.o                 \
698         fpos.o                  \
699         fputc.o                 \
700         fputs.o                 \
701         fread.o                 \
702         fseek.o                 \
703         fseeko.o                \
704         ftell.o                 \
705         ftello.o                \
706         fwrite.o                \
707         getc.o                  \
708         getchar.o               \
709         getline.o               \
710         getpass.o               \
711         gets.o                  \
712         getw.o                  \
713         mse.o                   \
714         popen.o                 \
715         putc.o                  \
716         putchar.o               \
717         puts.o                  \
718         putw.o                  \
719         rewind.o                \
720         scanf.o                 \
721         setbuf.o                \
722         setbuffer.o             \
723         setvbuf.o               \
724         system.o                \
725         tempnam.o               \
726         tmpfile.o               \
727         tmpnam_r.o              \
728         ungetc.o                \
729         vscanf.o                \
730         vwscanf.o               \
731         wscanf.o
733 PORTI18N=                       \
734         getwchar.o              \
735         putwchar.o              \
736         putws.o                 \
737         strtows.o               \
738         wcsnlen.o               \
739         wcsstr.o                \
740         wcstoimax.o             \
741         wcstol.o                \
742         wcstoul.o               \
743         wcswcs.o                \
744         wmemchr.o               \
745         wmemcmp.o               \
746         wmemcpy.o               \
747         wmemmove.o              \
748         wmemset.o               \
749         wscat.o                 \
750         wschr.o                 \
751         wscmp.o                 \
752         wscpy.o                 \
753         wscspn.o                \
754         wsdup.o                 \
755         wslen.o                 \
756         wsncat.o                \
757         wsncmp.o                \
758         wsncpy.o                \
759         wspbrk.o                \
760         wsprintf.o              \
761         wsrchr.o                \
762         wsscanf.o               \
763         wsspn.o                 \
764         wstod.o                 \
765         wstok.o                 \
766         wstol.o                 \
767         wstoll.o                \
768         wsxfrm.o                \
769         gettext.o               \
770         gettext_gnu.o           \
771         gettext_real.o          \
772         gettext_util.o          \
773         plural_parser.o         \
774         wdresolve.o             \
775         _ctype.o                \
776         isascii.o               \
777         toascii.o
779 PORTI18N_COND=                  \
780         wcstol_longlong.o       \
781         wcstoul_longlong.o
783 PORTINET= bindresvport.o bootparams_getbyname.o ether_addr.o \
784           getaddrinfo.o getnameinfo.o getnetent.o getnetent_r.o \
785           getprotoent.o getprotoent_r.o getservbyname_r.o getservent.o \
786           getservent_r.o inet_lnaof.o inet_mkaddr.o inet_network.o \
787           inet6_opt.o inet6_rthdr.o interface_id.o link_addr.o \
788           netmasks.o ruserpass.o sourcefilter.o \
789           getifaddrs.o
791 PORTLOCALE=                     \
792         big5.o                  \
793         btowc.o                 \
794         collate.o               \
795         collcmp.o               \
796         euc.o                   \
797         fnmatch.o               \
798         fgetwc.o                \
799         fgetws.o                \
800         fix_grouping.o          \
801         fputwc.o                \
802         fputws.o                \
803         fwide.o                 \
804         gb18030.o               \
805         gb2312.o                \
806         gbk.o                   \
807         getdate.o               \
808         isdigit.o               \
809         iswctype.o              \
810         ldpart.o                \
811         lmessages.o             \
812         lnumeric.o              \
813         lmonetary.o             \
814         localeconv.o            \
815         localeimpl.o            \
816         mbftowc.o               \
817         mblen.o                 \
818         mbrlen.o                \
819         mbrtowc.o               \
820         mbsinit.o               \
821         mbsnrtowcs.o            \
822         mbsrtowcs.o             \
823         mbstowcs.o              \
824         mbtowc.o                \
825         mskanji.o               \
826         nextwctype.o            \
827         nl_langinfo.o           \
828         none.o                  \
829         rune.o                  \
830         runetype.o              \
831         setlocale.o             \
832         setrunelocale.o         \
833         strcasecmp.o            \
834         strcasestr.o            \
835         strcoll.o               \
836         strfmon.o               \
837         strftime.o              \
838         strncasecmp.o           \
839         strptime.o              \
840         strxfrm.o               \
841         table.o                 \
842         timelocal.o             \
843         tolower.o               \
844         towlower.o              \
845         ungetwc.o               \
846         utf8.o                  \
847         wcrtomb.o               \
848         wcscasecmp.o            \
849         wcscoll.o               \
850         wcsftime.o              \
851         wcsnrtombs.o            \
852         wcsrtombs.o             \
853         wcswidth.o              \
854         wcstombs.o              \
855         wcsxfrm.o               \
856         wctob.o                 \
857         wctomb.o                \
858         wctrans.o               \
859         wctype.o                \
860         wcwidth.o               \
861         wscol.o
863 PORTNSL= _conn_util.o _data2.o _errlst.o _utility.o algs.o auth_des.o \
864          auth_none.o auth_sys.o auth_time.o authdes_prot.o authsys_prot.o \
865          can_use_af.o checkver.o clnt_bcast.o clnt_dg.o clnt_door.o \
866          clnt_generic.o clnt_perror.o clnt_raw.o clnt_simple.o clnt_vc.o \
867          daemon_utils.o dbm.o des_crypt.o des_soft.o doconfig.o getauthattr.o \
868          getauuser.o getdname.o getexecattr.o gethostby_door.o \
869          gethostbyname_r.o gethostent.o gethostent6.o gethostent_r.o \
870          getipnodeby.o getipnodeby_door.o getprofattr.o getrpcent.o \
871          getrpcent_r.o getuserattr.o inet_matchaddr.o inet_ntoa.o inet_ntop.o \
872          inet_pton.o key_call.o key_prot.o mt_misc.o netdir.o netdir_inet.o \
873          netdir_inet_sundry.o netname.o netnamer.o netselect.o nis_misc.o \
874          nis_misc_proc.o nis_sec_mechs.o nis_subr.o nis_xdr.o parse.o \
875          pmap_clnt.o pmap_prot.o publickey.o rpc_callmsg.o rpc_comdata.o \
876          rpc_fdsync.o rpc_generic.o rpc_prot.o rpc_sel2poll.o \
877          rpc_soc.o rpc_td.o rpcb_clnt.o rpcb_prot.o rpcb_st_xdr.o rpcdname.o \
878          rpcsec_gss_if.o rtime_tli.o svc.o svc_auth.o svc_auth_loopb.o \
879          svc_auth_sys.o svc_dg.o svc_door.o svc_generic.o svc_raw.o svc_run.o \
880          svc_simple.o svc_vc.o svcauth_des.o svid_funcs.o t_accept.o \
881          t_alloc.o t_bind.o t_close.o t_connect.o t_error.o t_free.o \
882          t_getinfo.o t_getname.o t_getstate.o t_listen.o t_look.o t_open.o \
883          t_optmgmt.o t_rcv.o t_rcvconnect.o t_rcvdis.o t_rcvrel.o \
884          t_rcvreldata.o t_rcvudata.o t_rcvuderr.o t_rcvv.o t_rcvvudata.o \
885          t_snd.o t_snddis.o t_sndrel.o t_sndreldata.o t_sndudata.o t_sndv.o \
886          t_sndvudata.o t_strerror.o t_sync.o t_sysconf.o t_unbind.o \
887          thr_get_storage.o ti_opts.o tli_wrappers.o xdr.o xdr_array.o \
888          xdr_float.o xdr_mem.o xdr_rec.o xdr_refer.o xdr_sizeof.o xdr_stdio.o \
889          xti_wrappers.o yp_all.o yp_b_clnt.o yp_b_xdr.o yp_bind.o yp_enum.o \
890          yp_master.o yp_match.o yp_order.o yp_rsvd.o yp_update.o yp_xdr.o \
891          yperr_string.o yppasswd_xdr.o ypprot_err.o ypupd.o
893 AIOOBJS=                        \
894         aio.o                   \
895         aio_alloc.o             \
896         posix_aio.o
898 RTOBJS=                         \
899         clock_timer.o           \
900         mqueue.o                \
901         pos4obj.o               \
902         sched.o                 \
903         sem.o                   \
904         shm.o                   \
905         sigev_thread.o
907 TPOOLOBJS=                      \
908         thread_pool.o
910 THREADSOBJS=                    \
911         alloc.o                 \
912         assfail.o               \
913         cancel.o                \
914         c11_thr.o               \
915         door_calls.o            \
916         tmem.o                  \
917         pthr_attr.o             \
918         pthr_barrier.o          \
919         pthr_cond.o             \
920         pthr_mutex.o            \
921         pthr_rwlock.o           \
922         pthread.o               \
923         rwlock.o                \
924         scalls.o                \
925         sema.o                  \
926         sigaction.o             \
927         spawn.o                 \
928         synch.o                 \
929         tdb_agent.o             \
930         thr.o                   \
931         thread_interface.o      \
932         tls.o                   \
933         tsd.o
935 THREADSMACHOBJS=                \
936         machdep.o
938 THREADSASMOBJS=                 \
939         asm_subr.o
941 UNICODEOBJS=                    \
942         u8_textprep.o           \
943         uconv.o
945 UNWINDMACHOBJS=                 \
946         unwind.o
948 UNWINDASMOBJS=                  \
949         unwind_frame.o
951 # objects that implement the transitional large file API
952 PORTSYS64=                      \
953         lockf64.o               \
954         stat64.o
956 PORTSYS=                        \
957         _autofssys.o            \
958         access.o                \
959         acctctl.o               \
960         bsd_signal.o            \
961         chmod.o                 \
962         chown.o                 \
963         corectl.o               \
964         epoll.o                 \
965         eventfd.o               \
966         exacctsys.o             \
967         execl.o                 \
968         execle.o                \
969         execv.o                 \
970         fcntl.o                 \
971         getpagesizes.o          \
972         getpeerucred.o          \
973         inst_sync.o             \
974         issetugid.o             \
975         link.o                  \
976         lockf.o                 \
977         lwp.o                   \
978         lwp_cond.o              \
979         lwp_rwlock.o            \
980         lwp_sigmask.o           \
981         meminfosys.o            \
982         mkdir.o                 \
983         mknod.o                 \
984         msgsys.o                \
985         nfssys.o                \
986         open.o                  \
987         pgrpsys.o               \
988         posix_sigwait.o         \
989         ppriv.o                 \
990         psetsys.o               \
991         rctlsys.o               \
992         readlink.o              \
993         rename.o                \
994         sbrk.o                  \
995         semsys.o                \
996         set_errno.o             \
997         sharefs.o               \
998         shmsys.o                \
999         sidsys.o                \
1000         siginterrupt.o          \
1001         signal.o                \
1002         signalfd.o              \
1003         sigpending.o            \
1004         sigstack.o              \
1005         stat.o                  \
1006         symlink.o               \
1007         tasksys.o               \
1008         time.o                  \
1009         time_util.o             \
1010         timerfd.o               \
1011         ucontext.o              \
1012         unlink.o                \
1013         ustat.o                 \
1014         utimesys.o              \
1015         zone.o
1017 PORTREGEX=                      \
1018         glob.o                  \
1019         regcmp.o                \
1020         regcomp.o               \
1021         regerror.o              \
1022         regex.o                 \
1023         regexec.o               \
1024         regfree.o               \
1025         wordexp.o
1027 PORTREGEX64=                    \
1028         glob64.o
1030 PORTSOCKET= _soutil.o sockatmark.o socket.o socketpair.o weaks.o
1032 MOSTOBJS=                       \
1033         $(STRETS)               \
1034         $(CRTOBJS)              \
1035         $(DYNOBJS)              \
1036         $(FPOBJS)               \
1037         $(FPASMOBJS)            \
1038         $(ATOMICOBJS)           \
1039         $(CHACHAOBJS)           \
1040         $(XATTROBJS)            \
1041         $(COMOBJS)              \
1042         $(DTRACEOBJS)           \
1043         $(GENOBJS)              \
1044         $(PORTFP)               \
1045         $(PORTGEN)              \
1046         $(PORTGEN64)            \
1047         $(PORTI18N)             \
1048         $(PORTI18N_COND)        \
1049         $(PORTINET)             \
1050         $(PORTLOCALE)           \
1051         $(PORTNSL)              \
1052         $(PORTPRINT)            \
1053         $(PORTPRINT_C89)        \
1054         $(PORTPRINT_W)          \
1055         $(PORTREGEX)            \
1056         $(PORTREGEX64)          \
1057         $(PORTSOCKET)           \
1058         $(PORTSTDIO)            \
1059         $(PORTSTDIO64)          \
1060         $(PORTSTDIO_C89)        \
1061         $(PORTSTDIO_W)          \
1062         $(PORTSYS)              \
1063         $(PORTSYS64)            \
1064         $(AIOOBJS)              \
1065         $(RTOBJS)               \
1066         $(SECFLAGSOBJS)         \
1067         $(TPOOLOBJS)            \
1068         $(THREADSOBJS)          \
1069         $(THREADSMACHOBJS)      \
1070         $(THREADSASMOBJS)       \
1071         $(UNICODEOBJS)          \
1072         $(UNWINDMACHOBJS)       \
1073         $(UNWINDASMOBJS)        \
1074         $(COMSYSOBJS)           \
1075         $(SYSOBJS)              \
1076         $(COMSYSOBJS64)         \
1077         $(SYSOBJS64)            \
1078         $(VALUES)
1080 TRACEOBJS=                      \
1081         plockstat.o
1083 # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o
1084 # modules whose source is provided in the $(SRC)/lib/crt directory.
1085 # This must be done because otherwise the Sun C compiler would insert
1086 # its own versions of these modules and those versions contain code
1087 # to call out to C++ initialization functions.  Such C++ initialization
1088 # functions can call back into libc before thread initialization is
1089 # complete and this leads to segmentation violations and other problems.
1090 # Since libc contains no C++ code, linking with the minimal crti.o and
1091 # crtn.o modules is safe and avoids the problems described above.
1092 OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN)
1093 CRTSRCS= ../../crt/i86
1095 LDPASS_OFF=     $(POUND_SIGN)
1097 # include common library definitions
1098 include ../../Makefile.lib
1100 # we need to override the default SONAME here because we might
1101 # be building a variant object (still libc.so.1, but different filename)
1102 SONAME = libc.so.1
1104 CFLAGS += $(CTF_FLAGS)
1106 CERRWARN += -Wno-parentheses
1107 CERRWARN += -Wno-switch
1108 CERRWARN += -Wno-uninitialized
1109 CERRWARN += -Wno-unused-value
1110 CERRWARN += -Wno-unused-label
1111 CERRWARN += -Wno-unused-variable
1112 CERRWARN += -Wno-type-limits
1113 CERRWARN += -Wno-char-subscripts
1114 CERRWARN += -Wno-clobbered
1115 CERRWARN += -Wno-unused-function
1116 CERRWARN += -Wno-address
1118 # Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...)
1119 # enables ASSERT() checking in the threads portion of the library.
1120 # This is automatically enabled for DEBUG builds, not for non-debug builds.
1121 THREAD_DEBUG =
1122 $(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG
1124 ALTPICS= $(TRACEOBJS:%=pics/%)
1126 # The use of sed is a gross hack needed because the current build system
1127 # assumed that the compiler accepted linker flags (-Bfoo -zfoo and -Mfoo)
1128 # directly.  Here, since we're calling the linker directly, we have to
1129 # discard the prefixes.  Ideally, we would be using the LD_Z* and LD_B*
1130 # variables instead, but that would require a lot of mucking with makefiles.
1131 # So for now, we do this.
1132 REMOVE_GCC_PREFIX=echo $(DYNFLAGS) | $(SED) -e 's/-Wl,//g'
1133 $(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(REMOVE_GCC_PREFIX:sh) $(PICS) $(ALTPICS) \
1134                 $(EXTPICS) $(LDLIBS)
1136 MAPFILES =      $(LIBCDIR)/port/mapfile-vers
1139 # EXTN_CPPFLAGS and EXTN_CFLAGS set in enclosing Makefile
1141 CFLAGS +=       -march=pentiumpro
1142 CPPFLAGS=       -Di386 $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \
1143                 -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master)
1144 ASFLAGS=        $(AS_PICFLAGS) -D_ASM $(CPPFLAGS) $(i386_AS_XARCH)
1146 # Inform the run-time linker about libc specialized initialization
1147 RTLDINFO =      -z rtldinfo=tls_rtldinfo
1148 DYNFLAGS +=     $(RTLDINFO)
1150 # Force libc's internal references to be resolved immediately upon loading
1151 # in order to avoid critical region problems.  Since almost all libc symbols
1152 # are marked 'protected' in the mapfiles, this is a minimal set (15 to 20).
1153 DYNFLAGS +=     -znow
1155 DYNFLAGS +=     -e __rtboot
1156 DYNFLAGS +=     $(EXTN_DYNFLAGS)
1158 # Inform the kernel about the initial DTrace area (in case
1159 # libc is being used as the interpreter / runtime linker).
1160 DTRACE_DATA =   -zdtrace=dtrace_data
1161 DYNFLAGS +=     $(DTRACE_DATA)
1163 # DTrace needs an executable data segment.
1164 DYNFLAGS += -M$(SRC)/common/mapfiles/common/map.execdata
1166 BUILD.s=        $(AS) $(ASFLAGS) $< -o $@
1168 # Override this top level flag so the compiler builds in its native
1169 # C99 mode.  This has been enabled to support the complex arithmetic
1170 # added to libc.
1171 C99MODE=        $(C99_ENABLE)
1173 # libc method of building an archive
1174 # The "$(GREP) -v ' L '" part is necessary only until
1175 # lorder is fixed to ignore thread-local variables.
1176 BUILD.AR= $(RM) $@ ; \
1177         $(AR) qc $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)`
1179 # extra files for the clean target
1180 CLEANFILES +=                   \
1181         $(LIBCDIR)/port/gen/errlst.c    \
1182         $(LIBCDIR)/port/gen/new_list.c  \
1183         assym.h                 \
1184         genassym                \
1185         crt/_rtld.s             \
1186         crt/_rtbootld.s         \
1187         pics/_rtbootld.o        \
1188         pics/crti.o             \
1189         pics/crtn.o             \
1190         $(ALTPICS)
1192 CLOBBERFILES += $(LIB_PIC)
1194 # list of C source formerly for lint
1195 SRCS=                                                   \
1196         $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c)      \
1197         $(XATTROBJS:%.o=$(SRC)/common/xattr/%.c)        \
1198         $(COMOBJS:%.o=$(SRC)/common/util/%.c)           \
1199         $(DTRACEOBJS:%.o=$(SRC)/common/dtrace/%.c)      \
1200         $(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c)                    \
1201         $(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c)                  \
1202         $(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c)                \
1203         $(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c)            \
1204         $(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c)              \
1205         $(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c)              \
1206         $(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c)              \
1207         $(PORTSYS:%.o=$(LIBCDIR)/port/sys/%.c)                  \
1208         $(AIOOBJS:%.o=$(LIBCDIR)/port/aio/%.c)                  \
1209         $(RTOBJS:%.o=$(LIBCDIR)/port/rt/%.c)                    \
1210         $(SECFLAGSOBJS:%.o=$(SRC)/common/secflags/%.c)          \
1211         $(TPOOLOBJS:%.o=$(LIBCDIR)/port/tpool/%.c)              \
1212         $(THREADSOBJS:%.o=$(LIBCDIR)/port/threads/%.c)          \
1213         $(THREADSMACHOBJS:%.o=$(LIBCDIR)/$(MACH)/threads/%.c)   \
1214         $(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c)    \
1215         $(UNWINDMACHOBJS:%.o=$(LIBCDIR)/port/unwind/%.c)        \
1216         $(FPOBJS:%.o=$(LIBCDIR)/$(MACH)/fp/%.c)                 \
1217         $(LIBCBASE)/gen/ecvt.c                          \
1218         $(LIBCBASE)/gen/makectxt.c                      \
1219         $(LIBCBASE)/gen/siginfolst.c                    \
1220         $(LIBCBASE)/gen/siglongjmp.c                    \
1221         $(LIBCBASE)/gen/strcmp.c                        \
1222         $(LIBCBASE)/gen/sync_instruction_memory.c       \
1223         $(LIBCBASE)/sys/ptrace.c                        \
1224         $(LIBCBASE)/sys/uadmin.c
1226 # conditional assignments
1227 $(DYNLIB) := CRTI = crti.o
1228 $(DYNLIB) := CRTN = crtn.o
1230 # large-file-aware components that should be built large
1232 $(COMSYSOBJS64:%=pics/%) := \
1233         CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1235 $(SYSOBJS64:%=pics/%) := \
1236         CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1238 $(PORTGEN64:%=pics/%) := \
1239         CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1241 $(PORTREGEX64:%=pics/%) := \
1242         CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1244 $(PORTSTDIO64:%=pics/%) := \
1245         CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1247 $(PORTSYS64:%=pics/%) := \
1248         CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1250 $(PORTSTDIO_W:%=pics/%) := \
1251         CPPFLAGS += -D_WIDE
1253 $(PORTPRINT_W:%=pics/%) := \
1254         CPPFLAGS += -D_WIDE
1256 $(PORTPRINT_C89:%=pics/%) := \
1257         CPPFLAGS += -D_C89_INTMAX32
1259 $(PORTSTDIO_C89:%=pics/%) := \
1260         CPPFLAGS += -D_C89_INTMAX32
1262 $(PORTI18N_COND:%=pics/%) := \
1263         CPPFLAGS += -D_WCS_LONGLONG
1265 pics/arc4random.o :=    CPPFLAGS += -I$(SRC)/common/crypto/chacha
1267 pics/__clock_gettime.o := CPPFLAGS += $(COMMPAGE_CPPFLAGS)
1269 .KEEP_STATE:
1271 all: $(LIBS) $(LIB_PIC)
1273 # include common libc targets
1274 include $(LIBCDIR)/Makefile.targ
1276 # We need to strip out all CTF and DOF data from the static library
1277 $(LIB_PIC) := DIR = pics
1278 $(LIB_PIC): pics $$(PICS)
1279         $(BUILD.AR)
1280         $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1
1281         $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1
1282         $(AR) -ts $@ > /dev/null
1283         $(POST_PROCESS_A)
1285 $(LIBCBASE)/crt/_rtbootld.s: $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.c
1286         $(CC) $(CPPFLAGS) $(CTF_FLAGS) -O -S $(C_PICFLAGS) \
1287             $(LIBCBASE)/crt/_rtld.c -o $(LIBCBASE)/crt/_rtld.s
1288         $(CAT) $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.s > $@
1289         $(RM) $(LIBCBASE)/crt/_rtld.s
1291 # partially built from C source
1292 pics/_rtbootld.o: $(LIBCBASE)/crt/_rtbootld.s
1293         $(AS) $(ASFLAGS) $(LIBCBASE)/crt/_rtbootld.s -o $@
1294         $(CTFCONVERT_O)
1296 ASSYMDEP_OBJS=                  \
1297         _lwp_mutex_unlock.o     \
1298         _stack_grow.o           \
1299         getcontext.o            \
1300         setjmp.o                \
1301         tls_get_addr.o          \
1302         vforkx.o
1304 $(ASSYMDEP_OBJS:%=pics/%)       :=      CPPFLAGS += -I.
1306 $(ASSYMDEP_OBJS:%=pics/%): assym.h
1308 # assym.h build rules
1310 GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c
1312 genassym: $(GENASSYM_C)
1313         $(NATIVECC) $(NATIVE_CFLAGS) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \
1314                 -D__EXTENSIONS__ $(CPPFLAGS.native) -o $@ $(GENASSYM_C)
1316 OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in
1318 assym.h: $(OFFSETS) genassym
1319         $(OFFSETS_CREATE) <$(OFFSETS) >$@
1320         ./genassym >>$@
1322 # derived C source and related explicit dependencies
1323 $(LIBCDIR)/port/gen/errlst.c + \
1324 $(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk
1325         cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist
1327 pics/errlst.o: $(LIBCDIR)/port/gen/errlst.c
1329 pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c