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