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