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