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