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