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