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