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