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