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