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 sigpending.o \ 980 sigstack.o \ 981 stat.o \ 982 symlink.o \ 983 tasksys.o \ 984 time.o \ 985 time_util.o \ 986 timerfd.o \ 987 ucontext.o \ 988 unlink.o \ 989 ustat.o \ 990 utimesys.o \ 991 zone.o 992 993PORTREGEX= \ 994 glob.o \ 995 regcmp.o \ 996 regex.o \ 997 wordexp.o 998 999VALUES= values-Xa.o 1000 1001MOSTOBJS= \ 1002 $(STRETS) \ 1003 $(CRTOBJS) \ 1004 $(DYNOBJS) \ 1005 $(FPOBJS) \ 1006 $(FPASMOBJS) \ 1007 $(ATOMICOBJS) \ 1008 $(CHACHAOBJS) \ 1009 $(XATTROBJS) \ 1010 $(COMOBJS) \ 1011 $(DTRACEOBJS) \ 1012 $(GENOBJS) \ 1013 $(PRFOBJS) \ 1014 $(PORTFP) \ 1015 $(PORTGEN) \ 1016 $(PORTGEN64) \ 1017 $(PORTI18N) \ 1018 $(PORTI18N_COND) \ 1019 $(PORTLOCALE) \ 1020 $(PORTPRINT) \ 1021 $(PORTPRINT_C89) \ 1022 $(PORTPRINT_W) \ 1023 $(PORTREGEX) \ 1024 $(PORTSTDIO) \ 1025 $(PORTSTDIO64) \ 1026 $(PORTSTDIO_C89) \ 1027 $(PORTSTDIO_W) \ 1028 $(PORTSYS) \ 1029 $(PORTSYS64) \ 1030 $(AIOOBJS) \ 1031 $(RTOBJS) \ 1032 $(TPOOLOBJS) \ 1033 $(THREADSOBJS) \ 1034 $(THREADSMACHOBJS) \ 1035 $(THREADSASMOBJS) \ 1036 $(UNICODEOBJS) \ 1037 $(UNWINDMACHOBJS) \ 1038 $(UNWINDASMOBJS) \ 1039 $(COMSYSOBJS) \ 1040 $(SYSOBJS) \ 1041 $(COMSYSOBJS64) \ 1042 $(SYSOBJS64) \ 1043 $(VALUES) 1044 1045TRACEOBJS= \ 1046 plockstat.o 1047 1048# NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 1049# modules whose source is provided in the $(SRC)/lib/common directory. 1050# This must be done because otherwise the Sun C compiler would insert 1051# its own versions of these modules and those versions contain code 1052# to call out to C++ initialization functions. Such C++ initialization 1053# functions can call back into libc before thread initialization is 1054# complete and this leads to segmentation violations and other problems. 1055# Since libc contains no C++ code, linking with the minimal crti.o and 1056# crtn.o modules is safe and avoids the problems described above. 1057OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 1058CRTSRCS= ../../common/sparc 1059 1060# include common library definitions 1061include $(SRC)/lib/Makefile.lib 1062 1063# we need to override the default SONAME here because we might 1064# be building a variant object (still libc.so.1, but different filename) 1065SONAME = libc.so.1 1066 1067CFLAGS += $(CCVERBOSE) 1068 1069# This is necessary to avoid problems with calling _ex_unwind(). 1070# We probably don't want any inlining anyway. 1071CFLAGS += -xinline= 1072 1073CERRWARN += -_gcc=-Wno-parentheses 1074CERRWARN += -_gcc=-Wno-switch 1075CERRWARN += -_gcc=-Wno-uninitialized 1076CERRWARN += -_gcc=-Wno-unused-value 1077CERRWARN += -_gcc=-Wno-unused-label 1078CERRWARN += -_gcc=-Wno-unused-variable 1079CERRWARN += -_gcc=-Wno-type-limits 1080CERRWARN += -_gcc=-Wno-char-subscripts 1081CERRWARN += -_gcc=-Wno-clobbered 1082CERRWARN += -_gcc=-Wno-unused-function 1083CERRWARN += -_gcc=-Wno-address 1084 1085# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) 1086# enables ASSERT() checking in the threads portion of the library. 1087# This is automatically enabled for DEBUG builds, not for non-debug builds. 1088THREAD_DEBUG = 1089$(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 1090 1091# Make string literals read-only to save memory. 1092CFLAGS += $(XSTRCONST) 1093 1094ALTPICS= $(TRACEOBJS:%=pics/%) 1095 1096$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS) 1097 1098MAPFILES = $(LIBCDIR)/port/mapfile-vers 1099 1100CFLAGS += $(EXTN_CFLAGS) 1101CPPFLAGS= -D_REENTRANT -Dsparc $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \ 1102 -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master) 1103ASFLAGS= $(EXTN_ASFLAGS) -K pic -P -D__STDC__ -D_ASM $(CPPFLAGS) $(sparc_AS_XARCH) 1104 1105# As a favor to the dtrace syscall provider, libc still calls the 1106# old syscall traps that have been obsoleted by the *at() interfaces. 1107# Delete this to compile libc using only the new *at() system call traps 1108CPPFLAGS += -D_RETAIN_OLD_SYSCALLS 1109 1110# Inform the run-time linker about libc specialized initialization 1111RTLDINFO = -z rtldinfo=tls_rtldinfo 1112DYNFLAGS += $(RTLDINFO) 1113 1114# Force libc's internal references to be resolved immediately upon loading 1115# in order to avoid critical region problems. Since almost all libc symbols 1116# are marked 'protected' in the mapfiles, this is a minimal set (15 to 20). 1117DYNFLAGS += -znow 1118 1119DYNFLAGS += -e __rtboot 1120DYNFLAGS += $(EXTN_DYNFLAGS) 1121 1122# Inform the kernel about the initial DTrace area (in case 1123# libc is being used as the interpreter / runtime linker). 1124DTRACE_DATA = -zdtrace=dtrace_data 1125DYNFLAGS += $(DTRACE_DATA) 1126 1127# DTrace needs an executable data segment. 1128MAPFILE.NED= 1129 1130BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 1131 1132# Override this top level flag so the compiler builds in its native 1133# C99 mode. This has been enabled to support the complex arithmetic 1134# added to libc. 1135C99MODE= $(C99_ENABLE) 1136 1137# libc method of building an archive 1138# The "$(GREP) -v ' L '" part is necessary only until 1139# lorder is fixed to ignore thread-local variables. 1140BUILD.AR= $(RM) $@ ; \ 1141 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)` 1142 1143# extra files for the clean target 1144CLEANFILES= \ 1145 $(LIBCDIR)/port/gen/errlst.c \ 1146 $(LIBCDIR)/port/gen/new_list.c \ 1147 assym.h \ 1148 genassym \ 1149 $(LIBCBASE)/crt/_rtld.s \ 1150 $(LIBCBASE)/crt/_rtbootld.s \ 1151 pics/_rtbootld.o \ 1152 pics/crti.o \ 1153 pics/crtn.o \ 1154 $(ALTPICS) 1155 1156CLOBBERFILES += $(LIB_PIC) 1157 1158# list of C source for lint 1159SRCS= \ 1160 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \ 1161 $(XATTROBJS:%.o=$(SRC)/common/xattr/%.c) \ 1162 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \ 1163 $(DTRACEOBJS:%.o=$(SRC)/common/dtrace/%.c) \ 1164 $(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c) \ 1165 $(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c) \ 1166 $(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c) \ 1167 $(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c) \ 1168 $(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c) \ 1169 $(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c) \ 1170 $(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c) \ 1171 $(PORTSYS:%.o=$(LIBCDIR)/port/sys/%.c) \ 1172 $(AIOOBJS:%.o=$(LIBCDIR)/port/aio/%.c) \ 1173 $(RTOBJS:%.o=$(LIBCDIR)/port/rt/%.c) \ 1174 $(TPOOLOBJS:%.o=$(LIBCDIR)/port/tpool/%.c) \ 1175 $(THREADSOBJS:%.o=$(LIBCDIR)/port/threads/%.c) \ 1176 $(THREADSMACHOBJS:%.o=$(LIBCDIR)/$(MACH)/threads/%.c) \ 1177 $(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c) \ 1178 $(UNWINDMACHOBJS:%.o=$(LIBCDIR)/port/unwind/%.c) \ 1179 $(FPOBJS:%.o=$(LIBCDIR)/$(MACH)/fp/%.c) \ 1180 $(LIBCBASE)/crt/_ftou.c \ 1181 $(LIBCBASE)/gen/_xregs_clrptr.c \ 1182 $(LIBCBASE)/gen/byteorder.c \ 1183 $(LIBCBASE)/gen/ecvt.c \ 1184 $(LIBCBASE)/gen/getctxt.c \ 1185 $(LIBCBASE)/gen/lmul.c \ 1186 $(LIBCBASE)/gen/makectxt.c \ 1187 $(LIBCBASE)/gen/siginfolst.c \ 1188 $(LIBCBASE)/gen/siglongjmp.c \ 1189 $(LIBCBASE)/gen/swapctxt.c \ 1190 $(LIBCBASE)/sys/ptrace.c \ 1191 $(LIBCBASE)/sys/uadmin.c 1192 1193# conditional assignments 1194$(DYNLIB) := CRTI = crti.o 1195$(DYNLIB) := CRTN = crtn.o 1196 1197# Files which need the threads .il inline template 1198TIL= \ 1199 aio.o \ 1200 alloc.o \ 1201 assfail.o \ 1202 atexit.o \ 1203 atfork.o \ 1204 cancel.o \ 1205 door_calls.o \ 1206 err.o \ 1207 errno.o \ 1208 getctxt.o \ 1209 lwp.o \ 1210 ma.o \ 1211 machdep.o \ 1212 posix_aio.o \ 1213 pthr_attr.o \ 1214 pthr_barrier.o \ 1215 pthr_cond.o \ 1216 pthr_mutex.o \ 1217 pthr_rwlock.o \ 1218 pthread.o \ 1219 rand.o \ 1220 rwlock.o \ 1221 scalls.o \ 1222 sched.o \ 1223 sema.o \ 1224 sigaction.o \ 1225 sigev_thread.o \ 1226 spawn.o \ 1227 stack.o \ 1228 swapctxt.o \ 1229 synch.o \ 1230 tdb_agent.o \ 1231 thr.o \ 1232 thread_interface.o \ 1233 thread_pool.o \ 1234 tls.o \ 1235 tsd.o \ 1236 unwind.o 1237 1238$(TIL:%=pics/%) := CFLAGS += $(LIBCBASE)/threads/sparc.il 1239 1240# special kludge for inlines with 'cas': 1241pics/rwlock.o pics/synch.o pics/lwp.o pics/door_calls.o := \ 1242 sparc_CFLAGS += -_gcc=-Wa,-xarch=v8plus 1243 1244# Files in port/fp subdirectory that need base.il inline template 1245IL= \ 1246 __flt_decim.o \ 1247 decimal_bin.o 1248 1249$(IL:%=pics/%) := CFLAGS += $(LIBCBASE)/fp/base.il 1250 1251# Files in fp subdirectory which need __quad.il inline template 1252QIL= \ 1253 _Q_add.o \ 1254 _Q_cmp.o \ 1255 _Q_cmpe.o \ 1256 _Q_div.o \ 1257 _Q_dtoq.o \ 1258 _Q_fcc.o \ 1259 _Q_mul.o \ 1260 _Q_qtod.o \ 1261 _Q_qtoi.o \ 1262 _Q_qtos.o \ 1263 _Q_qtou.o \ 1264 _Q_sqrt.o \ 1265 _Q_stoq.o \ 1266 _Q_sub.o 1267 1268$(QIL:%=pics/%) := CFLAGS += $(LIBCDIR)/$(MACH)/fp/__quad.il 1269pics/_Q%.o := sparc_COPTFLAG = -xO4 -dalign 1270pics/__quad%.o := sparc_COPTFLAG = -xO4 -dalign 1271 1272# large-file-aware components that should be built large 1273 1274$(COMSYSOBJS64:%=pics/%) := \ 1275 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1276 1277$(SYSOBJS64:%=pics/%) := \ 1278 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1279 1280$(PORTGEN64:%=pics/%) := \ 1281 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1282 1283$(PORTSTDIO64:%=pics/%) := \ 1284 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1285 1286$(PORTSYS64:%=pics/%) := \ 1287 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1288 1289$(PORTSTDIO_W:%=pics/%) := \ 1290 CPPFLAGS += -D_WIDE 1291 1292$(PORTPRINT_W:%=pics/%) := \ 1293 CPPFLAGS += -D_WIDE 1294 1295# printf/scanf functions to support c89-sized intmax_t variables 1296$(PORTPRINT_C89:%=pics/%) := \ 1297 CPPFLAGS += -D_C89_INTMAX32 1298 1299$(PORTSTDIO_C89:%=pics/%) := \ 1300 CPPFLAGS += -D_C89_INTMAX32 1301 1302$(PORTI18N_COND:%=pics/%) := \ 1303 CPPFLAGS += -D_WCS_LONGLONG 1304 1305pics/arc4random.o := CPPFLAGS += -I$(SRC)/common/crypto/chacha 1306 1307# Files which need extra optimization 1308pics/getenv.o := sparc_COPTFLAG = -xO4 1309 1310.KEEP_STATE: 1311 1312all: $(LIBS) $(LIB_PIC) 1313 1314lint := CPPFLAGS += -I$(LIBCDIR)/$(MACH)/fp 1315lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99 1316lint := LINTFLAGS += -mn 1317 1318lint: 1319 @echo $(LINT.c) ... $(LDLIBS) 1320 @$(LINT.c) $(SRCS) $(LDLIBS) 1321 1322$(LINTLIB):= SRCS=$(LIBCDIR)/port/llib-lc 1323$(LINTLIB):= CPPFLAGS += -D_MSE_INT_H 1324$(LINTLIB):= LINTFLAGS=-nvx 1325 1326# object files that depend on inline template 1327$(TIL:%=pics/%): $(LIBCBASE)/threads/sparc.il 1328$(IL:%=pics/%): $(LIBCBASE)/fp/base.il 1329$(QIL:%=pics/%): $(LIBCDIR)/$(MACH)/fp/__quad.il 1330 1331# include common libc targets 1332include $(LIBCDIR)/Makefile.targ 1333 1334# We need to strip out all CTF and DOF data from the static library 1335$(LIB_PIC) := DIR = pics 1336$(LIB_PIC): pics $$(PICS) 1337 $(BUILD.AR) 1338 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1339 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1340 $(AR) -ts $@ > /dev/null 1341 $(POST_PROCESS_A) 1342 1343# special cases 1344$(STRETS:%=pics/%): $(LIBCBASE)/crt/stret.s 1345 $(AS) $(ASFLAGS) -DSTRET$(@F:stret%.o=%) $(LIBCBASE)/crt/stret.s -o $@ 1346 $(POST_PROCESS_O) 1347 1348$(LIBCBASE)/crt/_rtbootld.s: $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.c 1349 $(CC) $(CPPFLAGS) $(CTF_FLAGS) -O -S -K pic \ 1350 $(LIBCBASE)/crt/_rtld.c -o $(LIBCBASE)/crt/_rtld.s 1351 $(CAT) $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.s > $@ 1352 $(RM) $(LIBCBASE)/crt/_rtld.s 1353 1354# partially built from C source 1355pics/_rtbootld.o: $(LIBCBASE)/crt/_rtbootld.s 1356 $(AS) $(ASFLAGS) $(LIBCBASE)/crt/_rtbootld.s -o $@ 1357 $(CTFCONVERT_O) 1358 1359ASSYMDEP_OBJS= \ 1360 _lwp_mutex_unlock.o \ 1361 _stack_grow.o \ 1362 asm_subr.o \ 1363 setjmp.o \ 1364 smt_pause.o \ 1365 tls_get_addr.o \ 1366 unwind_frame.o \ 1367 vforkx.o 1368 1369$(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1370 1371$(ASSYMDEP_OBJS:%=pics/%): assym.h 1372 1373# assym.h build rules 1374 1375assym.h := CFLAGS += -g 1376 1377GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c 1378 1379genassym: $(GENASSYM_C) 1380 $(NATIVECC) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \ 1381 $(CPPFLAGS.native) -o $@ $(GENASSYM_C) 1382 1383OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1384 1385assym.h: $(OFFSETS) genassym 1386 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1387 ./genassym >>$@ 1388 1389# derived C source and related explicit dependencies 1390$(LIBCDIR)/port/gen/errlst.c + \ 1391$(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk 1392 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist 1393 1394pics/errlst.o: $(LIBCDIR)/port/gen/errlst.c 1395 1396pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c 1397