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