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