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_cstd.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 wcslcat.o \ 754 wcslcpy.o \ 755 wcsnlen.o \ 756 wcsstr.o \ 757 wcstoimax.o \ 758 wcstol.o \ 759 wcstoul.o \ 760 wcswcs.o \ 761 wmemchr.o \ 762 wmemcmp.o \ 763 wmemcpy.o \ 764 wmemmove.o \ 765 wmemset.o \ 766 wscat.o \ 767 wschr.o \ 768 wscmp.o \ 769 wscpy.o \ 770 wscspn.o \ 771 wsdup.o \ 772 wslen.o \ 773 wsncat.o \ 774 wsncmp.o \ 775 wsncpy.o \ 776 wspbrk.o \ 777 wsprintf.o \ 778 wsrchr.o \ 779 wsscanf.o \ 780 wsspn.o \ 781 wstod.o \ 782 wstok.o \ 783 wstol.o \ 784 wstoll.o \ 785 wsxfrm.o \ 786 gettext.o \ 787 gettext_gnu.o \ 788 gettext_real.o \ 789 gettext_util.o \ 790 plural_parser.o \ 791 wdresolve.o \ 792 _ctype.o \ 793 isascii.o \ 794 toascii.o 795 796PORTI18N_COND= \ 797 wcstol_longlong.o \ 798 wcstoul_longlong.o 799 800PORTLOCALE= \ 801 big5.o \ 802 btowc.o \ 803 c16rtomb.o \ 804 c32rtomb.o \ 805 collate.o \ 806 collcmp.o \ 807 euc.o \ 808 fnmatch.o \ 809 fgetwc.o \ 810 fgetws.o \ 811 fix_grouping.o \ 812 fputwc.o \ 813 fputws.o \ 814 fwide.o \ 815 gb18030.o \ 816 gb2312.o \ 817 gbk.o \ 818 getdate.o \ 819 isdigit.o \ 820 iswctype.o \ 821 ldpart.o \ 822 lmessages.o \ 823 lnumeric.o \ 824 lmonetary.o \ 825 localeconv.o \ 826 localeimpl.o \ 827 mbftowc.o \ 828 mblen.o \ 829 mbrlen.o \ 830 mbrtoc16.o \ 831 mbrtoc32.o \ 832 mbrtowc.o \ 833 mbsinit.o \ 834 mbsnrtowcs.o \ 835 mbsrtowcs.o \ 836 mbstowcs.o \ 837 mbtowc.o \ 838 mskanji.o \ 839 nextwctype.o \ 840 nl_langinfo.o \ 841 none.o \ 842 rune.o \ 843 runetype.o \ 844 setlocale.o \ 845 setrunelocale.o \ 846 strcasecmp.o \ 847 strcasestr.o \ 848 strcoll.o \ 849 strfmon.o \ 850 strftime.o \ 851 strncasecmp.o \ 852 strptime.o \ 853 strxfrm.o \ 854 table.o \ 855 timelocal.o \ 856 tolower.o \ 857 towlower.o \ 858 ungetwc.o \ 859 utf8.o \ 860 wcrtomb.o \ 861 wcscasecmp.o \ 862 wcscoll.o \ 863 wcsftime.o \ 864 wcsnrtombs.o \ 865 wcsrtombs.o \ 866 wcswidth.o \ 867 wcstombs.o \ 868 wcsxfrm.o \ 869 wctob.o \ 870 wctomb.o \ 871 wctrans.o \ 872 wctype.o \ 873 wcwidth.o \ 874 wscol.o 875 876AIOOBJS= \ 877 aio.o \ 878 aio_alloc.o \ 879 posix_aio.o 880 881RTOBJS= \ 882 clock_timer.o \ 883 mqueue.o \ 884 pos4obj.o \ 885 sched.o \ 886 sem.o \ 887 shm.o \ 888 sigev_thread.o 889 890TPOOLOBJS= \ 891 thread_pool.o 892 893THREADSOBJS= \ 894 alloc.o \ 895 assfail.o \ 896 cancel.o \ 897 c11_thr.o \ 898 door_calls.o \ 899 tmem.o \ 900 pthr_attr.o \ 901 pthr_barrier.o \ 902 pthr_cond.o \ 903 pthr_mutex.o \ 904 pthr_rwlock.o \ 905 pthread.o \ 906 rwlock.o \ 907 scalls.o \ 908 sema.o \ 909 sigaction.o \ 910 spawn.o \ 911 synch.o \ 912 tdb_agent.o \ 913 thr.o \ 914 thread_interface.o \ 915 tls.o \ 916 tsd.o 917 918THREADSMACHOBJS= \ 919 machdep.o 920 921THREADSASMOBJS= \ 922 asm_subr.o 923 924UNICODEOBJS= \ 925 u8_textprep.o \ 926 uconv.o 927 928UNWINDMACHOBJS= \ 929 unwind.o 930 931UNWINDASMOBJS= \ 932 unwind_frame.o 933 934# objects that implement the transitional large file API 935PORTSYS64= \ 936 lockf64.o \ 937 stat64.o 938 939PORTSYS= \ 940 _autofssys.o \ 941 access.o \ 942 acctctl.o \ 943 bsd_signal.o \ 944 chmod.o \ 945 chown.o \ 946 corectl.o \ 947 epoll.o \ 948 eventfd.o \ 949 exacctsys.o \ 950 execl.o \ 951 execle.o \ 952 execv.o \ 953 execve.o \ 954 fcntl.o \ 955 fexecve.o \ 956 getpagesizes.o \ 957 getpeerucred.o \ 958 inst_sync.o \ 959 issetugid.o \ 960 label.o \ 961 link.o \ 962 lockf.o \ 963 lwp.o \ 964 lwp_cond.o \ 965 lwp_rwlock.o \ 966 lwp_sigmask.o \ 967 meminfosys.o \ 968 mkdir.o \ 969 mknod.o \ 970 msgsys.o \ 971 nfssys.o \ 972 open.o \ 973 pgrpsys.o \ 974 posix_sigwait.o \ 975 ppriv.o \ 976 psetsys.o \ 977 rctlsys.o \ 978 readlink.o \ 979 rename.o \ 980 sbrk.o \ 981 semsys.o \ 982 set_errno.o \ 983 sharefs.o \ 984 shmsys.o \ 985 sidsys.o \ 986 siginterrupt.o \ 987 signal.o \ 988 signalfd.o \ 989 sigpending.o \ 990 sigstack.o \ 991 stat.o \ 992 symlink.o \ 993 tasksys.o \ 994 time.o \ 995 time_util.o \ 996 timerfd.o \ 997 ucontext.o \ 998 unlink.o \ 999 ustat.o \ 1000 utimesys.o \ 1001 zone.o 1002 1003PORTREGEX= \ 1004 glob.o \ 1005 regcmp.o \ 1006 regcomp.o \ 1007 regerror.o \ 1008 regex.o \ 1009 regexec.o \ 1010 regfree.o \ 1011 wordexp.o 1012 1013PORTREGEX64= \ 1014 glob64.o 1015 1016BITOBJS= \ 1017 stdbit.o 1018 1019MOSTOBJS= \ 1020 $(STRETS) \ 1021 $(CRTOBJS) \ 1022 $(DYNOBJS) \ 1023 $(FPOBJS) \ 1024 $(FPASMOBJS) \ 1025 $(ATOMICOBJS) \ 1026 $(CHACHAOBJS) \ 1027 $(XATTROBJS) \ 1028 $(COMOBJS) \ 1029 $(DTRACEOBJS) \ 1030 $(GENOBJS) \ 1031 $(PORTFP) \ 1032 $(PORTGEN) \ 1033 $(PORTGEN64) \ 1034 $(PORTI18N) \ 1035 $(PORTI18N_COND) \ 1036 $(PORTINET) \ 1037 $(PORTLOCALE) \ 1038 $(PORTPRINT) \ 1039 $(PORTPRINT_C89) \ 1040 $(PORTPRINT_W) \ 1041 $(PORTREGEX) \ 1042 $(PORTREGEX64) \ 1043 $(PORTSTDIO) \ 1044 $(PORTSTDIO64) \ 1045 $(PORTSTDIO_C89) \ 1046 $(PORTSTDIO_W) \ 1047 $(PORTSYS) \ 1048 $(PORTSYS64) \ 1049 $(AIOOBJS) \ 1050 $(RTOBJS) \ 1051 $(SECFLAGSOBJS) \ 1052 $(TPOOLOBJS) \ 1053 $(THREADSOBJS) \ 1054 $(THREADSMACHOBJS) \ 1055 $(THREADSASMOBJS) \ 1056 $(UNICODEOBJS) \ 1057 $(UNWINDMACHOBJS) \ 1058 $(UNWINDASMOBJS) \ 1059 $(COMSYSOBJS) \ 1060 $(SYSOBJS) \ 1061 $(COMSYSOBJS64) \ 1062 $(SYSOBJS64) \ 1063 $(VALUES) \ 1064 $(BITOBJS) 1065 1066TRACEOBJS= \ 1067 plockstat.o 1068 1069# NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 1070# modules whose source is provided in the $(SRC)/lib/crt directory. 1071# This must be done because otherwise the Sun C compiler would insert 1072# its own versions of these modules and those versions contain code 1073# to call out to C++ initialization functions. Such C++ initialization 1074# functions can call back into libc before thread initialization is 1075# complete and this leads to segmentation violations and other problems. 1076# Since libc contains no C++ code, linking with the minimal crti.o and 1077# crtn.o modules is safe and avoids the problems described above. 1078OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 1079CRTSRCS= ../../crt/i386 1080 1081LDPASS_OFF= $(POUND_SIGN) 1082 1083# include common library definitions 1084include ../../Makefile.lib 1085 1086# we need to override the default SONAME here because we might 1087# be building a variant object (still libc.so.1, but different filename) 1088SONAME = libc.so.1 1089 1090CFLAGS += $(CCVERBOSE) $(CTF_FLAGS) 1091 1092CERRWARN += -_gcc=-Wno-parentheses 1093CERRWARN += -_gcc=-Wno-switch 1094CERRWARN += $(CNOWARN_UNINIT) 1095CERRWARN += -_gcc=-Wno-unused-value 1096CERRWARN += -_gcc=-Wno-unused-label 1097CERRWARN += -_gcc=-Wno-unused-variable 1098CERRWARN += -_gcc=-Wno-type-limits 1099CERRWARN += -_gcc=-Wno-char-subscripts 1100CERRWARN += -_gcc=-Wno-clobbered 1101CERRWARN += -_gcc=-Wno-unused-function 1102CERRWARN += -_gcc=-Wno-address 1103 1104$(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused 1105 1106# not linted 1107SMATCH=off 1108 1109# Setting THREAD_DEBUG = -DDEBUG (make THREAD_DEBUG=-DDEBUG ...) 1110# enables ASSERT() checking in the library. 1111# This is automatically enabled for DEBUG builds, not for non-debug builds. 1112THREAD_DEBUG = 1113$(NOT_RELEASE_BUILD)THREAD_DEBUG = -DDEBUG 1114 1115ALTPICS= $(TRACEOBJS:%=pics/%) 1116 1117$(DYNLIB) := BUILD.SO = $(LD) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(ALTPICS) \ 1118 $(EXTPICS) $(LDLIBS) 1119 1120MAPFILES = $(LIBCDIR)/port/mapfile-vers 1121 1122# 1123# EXTN_CPPFLAGS and EXTN_CFLAGS set in enclosing Makefile 1124# 1125CFLAGS += $(EXTN_CFLAGS) 1126CPPFLAGS= -D_REENTRANT -Di386 $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \ 1127 -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master) 1128 1129# __XOPEN_OR_POSIX is necessary to avoid implicit _LARGEFILE_SOURCE which 1130# breaks the libc compilation environment. 1131ASFLAGS= $(AS_PICFLAGS) -D_ASM \ 1132 $(CPPFLAGS) $(i386_XARCH) -D__XOPEN_OR_POSIX=1 1133 1134# As a favor to the dtrace syscall provider, libc still calls the 1135# old syscall traps that have been obsoleted by the *at() interfaces. 1136# Delete this to compile libc using only the new *at() system call traps 1137CPPFLAGS += -D_RETAIN_OLD_SYSCALLS 1138 1139# Inform the run-time linker about libc specialized initialization 1140RTLDINFO = -z rtldinfo=tls_rtldinfo 1141DYNFLAGS += $(RTLDINFO) 1142 1143# Force libc's internal references to be resolved immediately upon loading 1144# in order to avoid critical region problems. Since almost all libc symbols 1145# are marked 'protected' in the mapfiles, this is a minimal set (15 to 20). 1146DYNFLAGS += -znow 1147 1148DYNFLAGS += -e __rtboot 1149DYNFLAGS += $(EXTN_DYNFLAGS) 1150 1151# Inform the kernel about the initial DTrace area (in case 1152# libc is being used as the interpreter / runtime linker). 1153DTRACE_DATA = -zdtrace=dtrace_data 1154DYNFLAGS += $(DTRACE_DATA) 1155 1156# DTrace needs an executable data segment. 1157MAPFILE.NED= 1158 1159BUILD.s= $(AS) $(ASFLAGS) $< -c -o $@ 1160 1161# Override this top level flag so the compiler builds in its native 1162# C99 mode. This has been enabled to support the complex arithmetic 1163# added to libc. 1164CSTD= $(CSTD_GNU99) 1165 1166# libc method of building an archive 1167# The "$(GREP) -v ' L '" part is necessary only until 1168# lorder is fixed to ignore thread-local variables. 1169BUILD.AR= $(RM) $@ ; \ 1170 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)` 1171 1172# extra files for the clean target 1173CLEANFILES += \ 1174 $(LIBCDIR)/port/gen/errlst.c \ 1175 $(LIBCDIR)/port/gen/new_list.c \ 1176 assym.h \ 1177 genassym \ 1178 crt/_rtld.s \ 1179 crt/_rtbootld.s \ 1180 pics/_rtbootld.o \ 1181 pics/crti.o \ 1182 pics/crtn.o \ 1183 $(ALTPICS) 1184 1185CLOBBERFILES += $(LIB_PIC) $(LIBCBASE)/crt/_rtbootld.S 1186 1187# conditional assignments 1188$(DYNLIB) := CRTI = crti.o 1189$(DYNLIB) := CRTN = crtn.o 1190 1191# pics/mul64.o := CFLAGS += $(LIBCBASE)/crt/mul64.il 1192 1193# large-file-aware components that should be built large 1194 1195$(COMSYSOBJS64:%=pics/%) := \ 1196 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1197 1198$(SYSOBJS64:%=pics/%) := \ 1199 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1200 1201$(PORTGEN64:%=pics/%) := \ 1202 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1203 1204$(PORTREGEX64:%=pics/%) := \ 1205 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1206 1207$(PORTSTDIO64:%=pics/%) := \ 1208 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1209 1210$(PORTSYS64:%=pics/%) := \ 1211 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1212 1213$(PORTSTDIO_W:%=pics/%) := \ 1214 CPPFLAGS += -D_WIDE 1215 1216$(PORTPRINT_W:%=pics/%) := \ 1217 CPPFLAGS += -D_WIDE 1218 1219$(PORTPRINT_C89:%=pics/%) := \ 1220 CPPFLAGS += -D_C89_INTMAX32 1221 1222$(PORTSTDIO_C89:%=pics/%) := \ 1223 CPPFLAGS += -D_C89_INTMAX32 1224 1225$(PORTI18N_COND:%=pics/%) := \ 1226 CPPFLAGS += -D_WCS_LONGLONG 1227 1228pics/arc4random.o := CPPFLAGS += -I$(SRC)/common/crypto/chacha 1229 1230pics/__clock_gettime.o := CPPFLAGS += $(COMMPAGE_CPPFLAGS) 1231pics/gettimeofday.o := CPPFLAGS += $(COMMPAGE_CPPFLAGS) 1232 1233# 1234# Disable the stack protector due to issues with bootstrapping rtld. See 1235# cmd/sgs/rtld/Makefile.com for more information. 1236# 1237STACKPROTECT = none 1238 1239.KEEP_STATE: 1240 1241all: $(LIBS) $(LIB_PIC) 1242 1243# include common libc targets 1244include $(LIBCDIR)/Makefile.targ 1245 1246# We need to strip out all CTF and DOF data from the static library 1247$(LIB_PIC) := DIR = pics 1248$(LIB_PIC): pics $$(PICS) 1249 $(BUILD.AR) 1250 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1251 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1252 $(AR) -ts $@ > /dev/null 1253 $(POST_PROCESS_A) 1254 1255$(LIBCBASE)/crt/_rtbootld.S: $(LIBCBASE)/crt/_rtboot.S $(LIBCBASE)/crt/_rtld.c 1256 $(CC) $($(MACH)_XARCH) $(CPPFLAGS) -_smatch=off $(CTF_FLAGS) -O -S \ 1257 $(C_PICFLAGS) $(LIBCBASE)/crt/_rtld.c -o $(LIBCBASE)/crt/_rtld.s 1258 $(CAT) $(LIBCBASE)/crt/_rtboot.S $(LIBCBASE)/crt/_rtld.s > $@ 1259 $(RM) $(LIBCBASE)/crt/_rtld.s 1260 1261# partially built from C source 1262pics/_rtbootld.o: $(LIBCBASE)/crt/_rtbootld.S 1263 $(AS) $(ASFLAGS) $(LIBCBASE)/crt/_rtbootld.S -c -o $@ 1264 $(CTFCONVERT_O) 1265 1266ASSYMDEP_OBJS= \ 1267 _lwp_mutex_unlock.o \ 1268 _stack_grow.o \ 1269 getcontext.o \ 1270 setjmp.o \ 1271 tls_get_addr.o \ 1272 vforkx.o 1273 1274$(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1275 1276$(ASSYMDEP_OBJS:%=pics/%): assym.h 1277 1278# assym.h build rules 1279 1280GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c 1281LDFLAGS.native = $(LDASSERTS) $(BDIRECT) 1282 1283genassym := NATIVE_LIBS += libc.so 1284 1285genassym: $(GENASSYM_C) 1286 $(NATIVECC) $(NATIVE_CFLAGS) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \ 1287 -D__EXTENSIONS__ $(CPPFLAGS.native) $(LDFLAGS.native) \ 1288 -o $@ $(GENASSYM_C) 1289 1290OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1291 1292assym.h: $(OFFSETS) genassym 1293 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1294 ./genassym >>$@ 1295 1296# derived C source and related explicit dependencies 1297$(LIBCDIR)/port/gen/errlst.c + \ 1298$(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk 1299 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist 1300 1301pics/errlst.o: $(LIBCDIR)/port/gen/errlst.c 1302 1303pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c 1304