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