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# 23# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 24# Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. 25# Copyright 2013 Garrett D'Amore <garrett@damore.org> 26# Copyright 2018 Nexenta Systems, Inc. 27# Copyright 2019 Joyent, Inc. 28# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. 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 psecflagsset.o \ 250 putmsg.o \ 251 putpmsg.o \ 252 pwrite.o \ 253 pwritev.o \ 254 read.o \ 255 readv.o \ 256 resolvepath.o \ 257 seteguid.o \ 258 setgid.o \ 259 setgroups.o \ 260 setitimer.o \ 261 setreid.o \ 262 setrlimit.o \ 263 setuid.o \ 264 sigaltstk.o \ 265 sigprocmsk.o \ 266 sigsendset.o \ 267 sigsuspend.o \ 268 statfs.o \ 269 statvfs.o \ 270 stty.o \ 271 sync.o \ 272 sysconfig.o \ 273 sysfs.o \ 274 sysinfo.o \ 275 syslwp.o \ 276 times.o \ 277 ulimit.o \ 278 umask.o \ 279 umount2.o \ 280 utssys.o \ 281 uucopy.o \ 282 vhangup.o \ 283 waitid.o \ 284 write.o \ 285 writev.o \ 286 yield.o 287 288SYSOBJS= \ 289 __clock_gettime.o \ 290 __clock_gettime_sys.o \ 291 __getcontext.o \ 292 __uadmin.o \ 293 _lwp_mutex_unlock.o \ 294 _stack_grow.o \ 295 door.o \ 296 forkx.o \ 297 forkallx.o \ 298 getcontext.o \ 299 gettimeofday.o \ 300 lwp_private.o \ 301 nuname.o \ 302 syscall.o \ 303 sysi86.o \ 304 tls_get_addr.o \ 305 uadmin.o \ 306 umount.o \ 307 uname.o \ 308 vforkx.o 309 310# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 311# This macro should ALWAYS be empty; native APIs are already 'large file'. 312PORTGEN64= 313 314# objects from source under $(LIBCDIR)/port 315PORTFP= \ 316 __flt_decim.o \ 317 __flt_rounds.o \ 318 __tbl_10_b.o \ 319 __tbl_10_h.o \ 320 __tbl_10_s.o \ 321 __tbl_2_b.o \ 322 __tbl_2_h.o \ 323 __tbl_2_s.o \ 324 __tbl_fdq.o \ 325 __tbl_tens.o \ 326 __x_power.o \ 327 _base_sup.o \ 328 aconvert.o \ 329 decimal_bin.o \ 330 double_decim.o \ 331 econvert.o \ 332 fconvert.o \ 333 file_decim.o \ 334 finite.o \ 335 fp_data.o \ 336 func_decim.o \ 337 gconvert.o \ 338 hex_bin.o \ 339 ieee_globals.o \ 340 pack_float.o \ 341 sigfpe.o \ 342 string_decim.o 343 344PORTGEN= \ 345 _env_data.o \ 346 _xftw.o \ 347 a64l.o \ 348 abort.o \ 349 addsev.o \ 350 ascii_strcasecmp.o \ 351 ascii_strncasecmp.o \ 352 assert.o \ 353 atexit.o \ 354 atfork.o \ 355 atof.o \ 356 atoi.o \ 357 atol.o \ 358 atoll.o \ 359 attropen.o \ 360 basename.o \ 361 calloc.o \ 362 catgets.o \ 363 catopen.o \ 364 cfgetispeed.o \ 365 cfgetospeed.o \ 366 cfree.o \ 367 cfsetispeed.o \ 368 cfsetospeed.o \ 369 cftime.o \ 370 clock.o \ 371 closedir.o \ 372 closefrom.o \ 373 confstr.o \ 374 crypt.o \ 375 csetlen.o \ 376 ctime.o \ 377 ctime_r.o \ 378 daemon.o \ 379 deflt.o \ 380 directio.o \ 381 dirname.o \ 382 div.o \ 383 drand48.o \ 384 dup.o \ 385 env_data.o \ 386 err.o \ 387 errno.o \ 388 euclen.o \ 389 event_port.o \ 390 execvp.o \ 391 explicit_bzero.o \ 392 fattach.o \ 393 fdetach.o \ 394 fdopendir.o \ 395 ffs.o \ 396 flock.o \ 397 fls.o \ 398 fmtmsg.o \ 399 freezero.o \ 400 ftime.o \ 401 ftok.o \ 402 fts.o \ 403 ftw.o \ 404 gcvt.o \ 405 get_nprocs.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 getopt.o \ 424 getopt_long.o \ 425 getpagesize.o \ 426 getpw.o \ 427 getpwnam.o \ 428 getpwnam_r.o \ 429 getrusage.o \ 430 getspent.o \ 431 getspent_r.o \ 432 getsubopt.o \ 433 gettxt.o \ 434 getusershell.o \ 435 getut.o \ 436 getutx.o \ 437 getvfsent.o \ 438 getwd.o \ 439 getwidth.o \ 440 getxby_door.o \ 441 gtxt.o \ 442 hsearch.o \ 443 iconv.o \ 444 imaxabs.o \ 445 imaxdiv.o \ 446 index.o \ 447 initgroups.o \ 448 insque.o \ 449 isaexec.o \ 450 isastream.o \ 451 isatty.o \ 452 killpg.o \ 453 klpdlib.o \ 454 l64a.o \ 455 lckpwdf.o \ 456 lconstants.o \ 457 lexp10.o \ 458 lfind.o \ 459 lfmt.o \ 460 lfmt_log.o \ 461 lldiv.o \ 462 llog10.o \ 463 lltostr.o \ 464 lmath.o \ 465 localtime.o \ 466 lsearch.o \ 467 madvise.o \ 468 malloc.o \ 469 memalign.o \ 470 memmem.o \ 471 memset_s.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 priv_str_xlate.o \ 505 privlib.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 reallocarray.o \ 519 reallocf.o \ 520 recallocarray.o \ 521 realpath.o \ 522 reboot.o \ 523 regexpr.o \ 524 remove.o \ 525 rewinddir.o \ 526 rindex.o \ 527 scandir.o \ 528 seekdir.o \ 529 select.o \ 530 set_constraint_handler_s.o \ 531 setlabel.o \ 532 setpriority.o \ 533 settimeofday.o \ 534 sh_locks.o \ 535 sigflag.o \ 536 siglist.o \ 537 sigsend.o \ 538 sigsetops.o \ 539 ssignal.o \ 540 stack.o \ 541 stpcpy.o \ 542 stpncpy.o \ 543 str2sig.o \ 544 strcase_charmap.o \ 545 strcat.o \ 546 strchr.o \ 547 strchrnul.o \ 548 strcspn.o \ 549 strdup.o \ 550 strerror.o \ 551 strlcat.o \ 552 strlcpy.o \ 553 strncat.o \ 554 strndup.o \ 555 strpbrk.o \ 556 strrchr.o \ 557 strsep.o \ 558 strsignal.o \ 559 strspn.o \ 560 strstr.o \ 561 strtod.o \ 562 strtoimax.o \ 563 strtok.o \ 564 strtok_r.o \ 565 strtonum.o \ 566 strtoumax.o \ 567 swab.o \ 568 swapctl.o \ 569 sysconf.o \ 570 syslog.o \ 571 tcdrain.o \ 572 tcflow.o \ 573 tcflush.o \ 574 tcgetattr.o \ 575 tcgetpgrp.o \ 576 tcgetsid.o \ 577 tcsendbreak.o \ 578 tcsetattr.o \ 579 tcsetpgrp.o \ 580 tell.o \ 581 telldir.o \ 582 tfind.o \ 583 time_data.o \ 584 time_gdata.o \ 585 timespec_get.o \ 586 tls_data.o \ 587 truncate.o \ 588 tsdalloc.o \ 589 tsearch.o \ 590 ttyname.o \ 591 ttyslot.o \ 592 ualarm.o \ 593 ucred.o \ 594 valloc.o \ 595 vlfmt.o \ 596 vpfmt.o \ 597 waitpid.o \ 598 walkstack.o \ 599 wdata.o \ 600 xgetwidth.o \ 601 xpg4.o \ 602 xpg6.o 603 604PORTINET= \ 605 inet_lnaof.o \ 606 inet_makeaddr.o \ 607 inet_network.o \ 608 inet_ntoa.o \ 609 inet_ntop.o \ 610 inet_pton.o 611 612PORTPRINT_W= \ 613 doprnt_w.o 614 615PORTPRINT= \ 616 asprintf.o \ 617 doprnt.o \ 618 fprintf.o \ 619 printf.o \ 620 snprintf.o \ 621 sprintf.o \ 622 vfprintf.o \ 623 vprintf.o \ 624 vsnprintf.o \ 625 vsprintf.o \ 626 vwprintf.o \ 627 wprintf.o 628 629# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 630# This macro should ALWAYS be empty; native APIs are already 'large file'. 631PORTSTDIO64= 632 633PORTSTDIO_W= \ 634 doscan_w.o 635 636PORTSTDIO= \ 637 __extensions.o \ 638 _endopen.o \ 639 _filbuf.o \ 640 _findbuf.o \ 641 _flsbuf.o \ 642 _wrtchk.o \ 643 clearerr.o \ 644 ctermid.o \ 645 ctermid_r.o \ 646 cuserid.o \ 647 data.o \ 648 doscan.o \ 649 fdopen.o \ 650 feof.o \ 651 ferror.o \ 652 fgetc.o \ 653 fgets.o \ 654 fileno.o \ 655 flockf.o \ 656 flush.o \ 657 fopen.o \ 658 fpos.o \ 659 fputc.o \ 660 fputs.o \ 661 fread.o \ 662 fseek.o \ 663 fseeko.o \ 664 ftell.o \ 665 ftello.o \ 666 fwrite.o \ 667 getc.o \ 668 getchar.o \ 669 getline.o \ 670 getpass.o \ 671 gets.o \ 672 getw.o \ 673 mse.o \ 674 popen.o \ 675 putc.o \ 676 putchar.o \ 677 puts.o \ 678 putw.o \ 679 rewind.o \ 680 scanf.o \ 681 setbuf.o \ 682 setbuffer.o \ 683 setvbuf.o \ 684 system.o \ 685 tempnam.o \ 686 tmpfile.o \ 687 tmpnam_r.o \ 688 ungetc.o \ 689 vscanf.o \ 690 vwscanf.o \ 691 wscanf.o 692 693PORTI18N= \ 694 getwchar.o \ 695 putwchar.o \ 696 putws.o \ 697 strtows.o \ 698 wcsnlen.o \ 699 wcsstr.o \ 700 wcstoimax.o \ 701 wcstol.o \ 702 wcstoul.o \ 703 wcswcs.o \ 704 wmemchr.o \ 705 wmemcmp.o \ 706 wmemcpy.o \ 707 wmemmove.o \ 708 wmemset.o \ 709 wscat.o \ 710 wschr.o \ 711 wscmp.o \ 712 wscpy.o \ 713 wscspn.o \ 714 wsdup.o \ 715 wslen.o \ 716 wsncat.o \ 717 wsncmp.o \ 718 wsncpy.o \ 719 wspbrk.o \ 720 wsprintf.o \ 721 wsrchr.o \ 722 wsscanf.o \ 723 wsspn.o \ 724 wstod.o \ 725 wstok.o \ 726 wstol.o \ 727 wstoll.o \ 728 wsxfrm.o \ 729 gettext.o \ 730 gettext_gnu.o \ 731 gettext_real.o \ 732 gettext_util.o \ 733 plural_parser.o \ 734 wdresolve.o \ 735 _ctype.o \ 736 isascii.o \ 737 toascii.o 738 739PORTI18N_COND= \ 740 wcstol_longlong.o \ 741 wcstoul_longlong.o 742 743PORTLOCALE= \ 744 big5.o \ 745 btowc.o \ 746 collate.o \ 747 collcmp.o \ 748 euc.o \ 749 fnmatch.o \ 750 fgetwc.o \ 751 fgetws.o \ 752 fix_grouping.o \ 753 fputwc.o \ 754 fputws.o \ 755 fwide.o \ 756 gb18030.o \ 757 gb2312.o \ 758 gbk.o \ 759 getdate.o \ 760 isdigit.o \ 761 iswctype.o \ 762 ldpart.o \ 763 lmessages.o \ 764 lnumeric.o \ 765 lmonetary.o \ 766 localeconv.o \ 767 localeimpl.o \ 768 mbftowc.o \ 769 mblen.o \ 770 mbrlen.o \ 771 mbrtowc.o \ 772 mbsinit.o \ 773 mbsnrtowcs.o \ 774 mbsrtowcs.o \ 775 mbstowcs.o \ 776 mbtowc.o \ 777 mskanji.o \ 778 nextwctype.o \ 779 nl_langinfo.o \ 780 none.o \ 781 rune.o \ 782 runetype.o \ 783 setlocale.o \ 784 setrunelocale.o \ 785 strcasecmp.o \ 786 strcasestr.o \ 787 strcoll.o \ 788 strfmon.o \ 789 strftime.o \ 790 strncasecmp.o \ 791 strptime.o \ 792 strxfrm.o \ 793 table.o \ 794 timelocal.o \ 795 tolower.o \ 796 towlower.o \ 797 ungetwc.o \ 798 utf8.o \ 799 wcrtomb.o \ 800 wcscasecmp.o \ 801 wcscoll.o \ 802 wcsftime.o \ 803 wcsnrtombs.o \ 804 wcsrtombs.o \ 805 wcswidth.o \ 806 wcstombs.o \ 807 wcsxfrm.o \ 808 wctob.o \ 809 wctomb.o \ 810 wctrans.o \ 811 wctype.o \ 812 wcwidth.o \ 813 wscol.o 814 815AIOOBJS= \ 816 aio.o \ 817 aio_alloc.o \ 818 posix_aio.o 819 820RTOBJS= \ 821 clock_timer.o \ 822 mqueue.o \ 823 pos4obj.o \ 824 sched.o \ 825 sem.o \ 826 shm.o \ 827 sigev_thread.o 828 829SECFLAGSOBJS= \ 830 secflags.o 831 832TPOOLOBJS= \ 833 thread_pool.o 834 835THREADSOBJS= \ 836 alloc.o \ 837 assfail.o \ 838 c11_thr.o \ 839 cancel.o \ 840 door_calls.o \ 841 tmem.o \ 842 pthr_attr.o \ 843 pthr_barrier.o \ 844 pthr_cond.o \ 845 pthr_mutex.o \ 846 pthr_rwlock.o \ 847 pthread.o \ 848 rwlock.o \ 849 scalls.o \ 850 sema.o \ 851 sigaction.o \ 852 spawn.o \ 853 synch.o \ 854 tdb_agent.o \ 855 thr.o \ 856 thread_interface.o \ 857 tls.o \ 858 tsd.o 859 860THREADSMACHOBJS= \ 861 machdep.o 862 863THREADSASMOBJS= \ 864 asm_subr.o 865 866UNICODEOBJS= \ 867 u8_textprep.o \ 868 uconv.o 869 870UNWINDMACHOBJS= \ 871 call_frame_inst.o \ 872 eh_frame.o \ 873 thrp_unwind.o \ 874 unwind.o 875 876pics/unwind.o:= COPTFLAG64 = 877 878UNWINDASMOBJS= \ 879 unwind_frame.o 880 881# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 882# This macro should ALWAYS be empty; native APIs are already 'large file'. 883PORTSYS64= 884 885PORTSYS= \ 886 _autofssys.o \ 887 access.o \ 888 acctctl.o \ 889 bsd_signal.o \ 890 chmod.o \ 891 chown.o \ 892 corectl.o \ 893 epoll.o \ 894 exacctsys.o \ 895 execl.o \ 896 execle.o \ 897 execv.o \ 898 eventfd.o \ 899 fcntl.o \ 900 getpagesizes.o \ 901 getpeerucred.o \ 902 inst_sync.o \ 903 issetugid.o \ 904 label.o \ 905 link.o \ 906 lockf.o \ 907 lwp.o \ 908 lwp_cond.o \ 909 lwp_rwlock.o \ 910 lwp_sigmask.o \ 911 meminfosys.o \ 912 mkdir.o \ 913 mknod.o \ 914 msgsys.o \ 915 nfssys.o \ 916 open.o \ 917 pgrpsys.o \ 918 posix_sigwait.o \ 919 ppriv.o \ 920 psetsys.o \ 921 rctlsys.o \ 922 readlink.o \ 923 rename.o \ 924 sbrk.o \ 925 semsys.o \ 926 set_errno.o \ 927 sharefs.o \ 928 shmsys.o \ 929 sidsys.o \ 930 siginterrupt.o \ 931 signal.o \ 932 signalfd.o \ 933 sigpending.o \ 934 sigstack.o \ 935 stat.o \ 936 symlink.o \ 937 tasksys.o \ 938 time.o \ 939 time_util.o \ 940 timerfd.o \ 941 ucontext.o \ 942 unlink.o \ 943 ustat.o \ 944 utimesys.o \ 945 zone.o 946 947PORTREGEX= \ 948 glob.o \ 949 regcmp.o \ 950 regcomp.o \ 951 regerror.o \ 952 regex.o \ 953 regexec.o \ 954 regfree.o \ 955 wordexp.o 956 957VALUES= \ 958 values-Xa.o 959 960MOSTOBJS= \ 961 $(STRETS) \ 962 $(CRTOBJS) \ 963 $(DYNOBJS) \ 964 $(FPOBJS) \ 965 $(I386FPOBJS) \ 966 $(FPASMOBJS) \ 967 $(ATOMICOBJS) \ 968 $(CHACHAOBJS) \ 969 $(XATTROBJS) \ 970 $(COMOBJS) \ 971 $(GENOBJS) \ 972 $(PORTFP) \ 973 $(PORTGEN) \ 974 $(PORTGEN64) \ 975 $(PORTI18N) \ 976 $(PORTI18N_COND) \ 977 $(PORTINET) \ 978 $(PORTLOCALE) \ 979 $(PORTPRINT) \ 980 $(PORTPRINT_W) \ 981 $(PORTREGEX) \ 982 $(PORTSTDIO) \ 983 $(PORTSTDIO64) \ 984 $(PORTSTDIO_W) \ 985 $(PORTSYS) \ 986 $(PORTSYS64) \ 987 $(AIOOBJS) \ 988 $(RTOBJS) \ 989 $(SECFLAGSOBJS) \ 990 $(TPOOLOBJS) \ 991 $(THREADSOBJS) \ 992 $(THREADSMACHOBJS) \ 993 $(THREADSASMOBJS) \ 994 $(UNICODEOBJS) \ 995 $(UNWINDMACHOBJS) \ 996 $(UNWINDASMOBJS) \ 997 $(COMSYSOBJS) \ 998 $(SYSOBJS) \ 999 $(COMSYSOBJS64) \ 1000 $(SYSOBJS64) \ 1001 $(VALUES) 1002 1003TRACEOBJS= \ 1004 plockstat.o 1005 1006# NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 1007# modules whose source is provided in the $(SRC)/lib/crt directory. 1008# This must be done because otherwise the Sun C compiler would insert 1009# its own versions of these modules and those versions contain code 1010# to call out to C++ initialization functions. Such C++ initialization 1011# functions can call back into libc before thread initialization is 1012# complete and this leads to segmentation violations and other problems. 1013# Since libc contains no C++ code, linking with the minimal crti.o and 1014# crtn.o modules is safe and avoids the problems described above. 1015OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 1016CRTSRCS= ../../crt/amd64 1017 1018# include common library definitions 1019include ../../Makefile.lib 1020include ../../Makefile.lib.64 1021 1022CFLAGS64 += $(CTF_FLAGS) 1023 1024# This is necessary to avoid problems with calling _ex_unwind(). 1025# We probably don't want any inlining anyway. 1026CFLAGS64 += -xinline= 1027 1028CERRWARN += -_gcc=-Wno-parentheses 1029CERRWARN += -_gcc=-Wno-switch 1030CERRWARN += $(CNOWARN_UNINIT) 1031CERRWARN += -_gcc=-Wno-unused-value 1032CERRWARN += -_gcc=-Wno-unused-label 1033CERRWARN += -_gcc=-Wno-unused-variable 1034CERRWARN += -_gcc=-Wno-type-limits 1035CERRWARN += -_gcc=-Wno-char-subscripts 1036CERRWARN += -_gcc=-Wno-clobbered 1037CERRWARN += -_gcc=-Wno-unused-function 1038CERRWARN += -_gcc=-Wno-address 1039 1040$(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused 1041 1042# not linted 1043SMATCH=off 1044 1045# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) 1046# enables ASSERT() checking in the threads portion of the library. 1047# This is automatically enabled for DEBUG builds, not for non-debug builds. 1048THREAD_DEBUG = 1049$(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 1050 1051# Make string literals read-only to save memory 1052CFLAGS64 += $(XSTRCONST) 1053 1054ALTPICS= $(TRACEOBJS:%=pics/%) 1055 1056$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS) 1057 1058MAPFILES = $(LIBCDIR)/port/mapfile-vers 1059 1060CPPFLAGS= -D_REENTRANT -D$(MACH64) -D__$(MACH64) $(THREAD_DEBUG) \ 1061 -I. -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master) 1062ASFLAGS= $(AS_PICFLAGS) -P -D__STDC__ -D_ASM $(CPPFLAGS) \ 1063 $(amd64_AS_XARCH) 1064 1065# As a favor to the dtrace syscall provider, libc still calls the 1066# old syscall traps that have been obsoleted by the *at() interfaces. 1067# Delete this to compile libc using only the new *at() system call traps 1068CPPFLAGS += -D_RETAIN_OLD_SYSCALLS 1069 1070# proc64_id.o is built with defines in $(SRC)/uts/intel/sys/x86_archext.h 1071pics/proc64_id.o := CFLAGS64 += -I$(SRC)/uts/intel 1072 1073# Inform the run-time linker about libc specialized initialization 1074RTLDINFO = -z rtldinfo=tls_rtldinfo 1075DYNFLAGS += $(RTLDINFO) 1076 1077# Force libc's internal references to be resolved immediately upon loading 1078# in order to avoid critical region problems. Since almost all libc symbols 1079# are marked 'protected' in the mapfiles, this is a minimal set (15 to 20). 1080DYNFLAGS += -znow 1081 1082BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 1083 1084# Override this top level flag so the compiler builds in its native 1085# C99 mode. This has been enabled to support the complex arithmetic 1086# added to libc. 1087CSTD= $(CSTD_GNU99) 1088 1089# libc method of building an archive 1090# The "$(GREP) -v ' L '" part is necessary only until 1091# lorder is fixed to ignore thread-local variables. 1092BUILD.AR= $(RM) $@ ; \ 1093 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)` 1094 1095# extra files for the clean target 1096CLEANFILES += \ 1097 $(LIBCDIR)/port/gen/errlst.c \ 1098 $(LIBCDIR)/port/gen/new_list.c \ 1099 assym.h \ 1100 genassym \ 1101 crt/_rtld.s \ 1102 pics/crti.o \ 1103 pics/crtn.o \ 1104 $(ALTPICS) 1105 1106CLOBBERFILES += $(LIB_PIC) 1107 1108# conditional assignments 1109# $(DYNLIB) $(LIB_PIC) := DYNOBJS = _rtbootld.o 1110$(DYNLIB) := CRTI = crti.o 1111$(DYNLIB) := CRTN = crtn.o 1112 1113# Files which need the threads .il inline template 1114TIL= \ 1115 aio.o \ 1116 alloc.o \ 1117 assfail.o \ 1118 atexit.o \ 1119 atfork.o \ 1120 cancel.o \ 1121 door_calls.o \ 1122 err.o \ 1123 errno.o \ 1124 lwp.o \ 1125 ma.o \ 1126 machdep.o \ 1127 posix_aio.o \ 1128 pthr_attr.o \ 1129 pthr_barrier.o \ 1130 pthr_cond.o \ 1131 pthr_mutex.o \ 1132 pthr_rwlock.o \ 1133 pthread.o \ 1134 rand.o \ 1135 rwlock.o \ 1136 scalls.o \ 1137 sched.o \ 1138 sema.o \ 1139 sigaction.o \ 1140 sigev_thread.o \ 1141 spawn.o \ 1142 stack.o \ 1143 synch.o \ 1144 tdb_agent.o \ 1145 thr.o \ 1146 thread_interface.o \ 1147 thread_pool.o \ 1148 thrp_unwind.o \ 1149 tls.o \ 1150 tmem.o \ 1151 tsd.o 1152 1153$(TIL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/threads/amd64.il 1154 1155# pics/mul64.o := CFLAGS64 += crt/mul64.il 1156 1157# large-file-aware components that should be built large 1158 1159#$(COMSYSOBJS64:%=pics/%) := \ 1160# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1161 1162#$(SYSOBJS64:%=pics/%) := \ 1163# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1164 1165#$(PORTGEN64:%=pics/%) := \ 1166# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1167 1168#$(PORTSTDIO64:%=pics/%) := \ 1169# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1170 1171#$(PORTSYS64:%=pics/%) := \ 1172# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1173 1174$(PORTSTDIO_W:%=pics/%) := \ 1175 CPPFLAGS += -D_WIDE 1176 1177$(PORTPRINT_W:%=pics/%) := \ 1178 CPPFLAGS += -D_WIDE 1179 1180$(PORTPRINT_C89:%=pics/%) := \ 1181 CPPFLAGS += -D_C89_INTMAX32 1182 1183$(PORTSTDIO_C89:%=pics/%) := \ 1184 CPPFLAGS += -D_C89_INTMAX32 1185 1186$(PORTI18N_COND:%=pics/%) := \ 1187 CPPFLAGS += -D_WCS_LONGLONG 1188 1189pics/arc4random.o := CPPFLAGS += -I$(SRC)/common/crypto/chacha 1190 1191pics/__clock_gettime.o := CPPFLAGS += $(COMMPAGE_CPPFLAGS) 1192pics/gettimeofday.o := CPPFLAGS += $(COMMPAGE_CPPFLAGS) 1193 1194.KEEP_STATE: 1195 1196all: $(LIBS) $(LIB_PIC) 1197 1198# object files that depend on inline template 1199$(TIL:%=pics/%): $(LIBCBASE)/threads/amd64.il 1200# pics/mul64.o: crt/mul64.il 1201 1202# include common libc targets 1203include ../Makefile.targ 1204 1205# We need to strip out all CTF data from the static library 1206$(LIB_PIC) := DIR = pics 1207$(LIB_PIC): pics $$(PICS) 1208 $(BUILD.AR) 1209 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1210 $(AR) -ts $@ > /dev/null 1211 $(POST_PROCESS_A) 1212 1213ASSYMDEP_OBJS= \ 1214 _lwp_mutex_unlock.o \ 1215 _stack_grow.o \ 1216 asm_subr.o \ 1217 getcontext.o \ 1218 setjmp.o \ 1219 tls_get_addr.o \ 1220 vforkx.o 1221 1222$(ASSYMDEP_OBJS:%=pics/%): assym.h 1223 1224# assym.h build rules 1225 1226GENASSYM_C = genassym.c 1227LDFLAGS.native = $(LDASSERTS) $(ZASSERTDEFLIB)=libc.so $(BDIRECT) 1228 1229genassym: $(GENASSYM_C) 1230 $(NATIVECC) $(NATIVE_CFLAGS) -Iinc -I$(LIBCDIR)/inc $(CPPFLAGS.native) \ 1231 $(LDFLAGS.native) -o $@ $(GENASSYM_C) 1232 1233OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1234 1235assym.h: $(OFFSETS) genassym 1236 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1237 ./genassym >>$@ 1238 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 1243 1244pics/errlst.o: $(LIBCDIR)/port/gen/errlst.c 1245 1246pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c 1247