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