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