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 29 LIBCDIR= $(SRC)/lib/libc 30 LIB_PIC= libc_pic.a 31 VERS= .1 32 CPP= /usr/lib/cpp 33 TARGET_ARCH= sparc 34 35 # objects are grouped by source directory 36 37 # Symbol capabilities objects. 38 EXTPICS= \ 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 47 STRETS= \ 48 stret1.o \ 49 stret2.o \ 50 stret4.o 51 52 CRTOBJS= \ 53 _ftou.o \ 54 cerror.o \ 55 cerror64.o \ 56 hwmuldiv.o 57 58 DYNOBJS= \ 59 _rtbootld.o 60 61 FPOBJS= \ 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 101 FPASMOBJS= \ 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 113 ATOMICOBJS= \ 114 atomic.o 115 116 XATTROBJS= \ 117 xattr_common.o 118 119 COMOBJS= \ 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 131 DTRACEOBJS= \ 132 dtrace_data.o 133 134 GENOBJS= \ 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 170 COMSYSOBJS64= \ 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 181 SYSOBJS64= 182 183 COMSYSOBJS= \ 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 313 SYSOBJS= \ 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 332 PORTGEN64= \ 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 342 PORTFP= \ 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 386 PORTGEN= \ 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 setlabel.o \ 566 setpriority.o \ 567 settimeofday.o \ 568 sh_locks.o \ 569 sigflag.o \ 570 siglist.o \ 571 sigsend.o \ 572 sigsetops.o \ 573 ssignal.o \ 574 stack.o \ 575 stpcpy.o \ 576 stpncpy.o \ 577 str2sig.o \ 578 strcase_charmap.o \ 579 strcat.o \ 580 strchrnul.o \ 581 strcspn.o \ 582 strdup.o \ 583 strerror.o \ 584 strlcat.o \ 585 strncat.o \ 586 strndup.o \ 587 strpbrk.o \ 588 strrchr.o \ 589 strsep.o \ 590 strsignal.o \ 591 strspn.o \ 592 strstr.o \ 593 strtod.o \ 594 strtoimax.o \ 595 strtok.o \ 596 strtok_r.o \ 597 strtoumax.o \ 598 swab.o \ 599 swapctl.o \ 600 sysconf.o \ 601 syslog.o \ 602 tcdrain.o \ 603 tcflow.o \ 604 tcflush.o \ 605 tcgetattr.o \ 606 tcgetpgrp.o \ 607 tcgetsid.o \ 608 tcsendbreak.o \ 609 tcsetattr.o \ 610 tcsetpgrp.o \ 611 tell.o \ 612 telldir.o \ 613 tfind.o \ 614 time_data.o \ 615 time_gdata.o \ 616 tls_data.o \ 617 truncate.o \ 618 tsdalloc.o \ 619 tsearch.o \ 620 ttyname.o \ 621 ttyslot.o \ 622 ualarm.o \ 623 ucred.o \ 624 valloc.o \ 625 vlfmt.o \ 626 vpfmt.o \ 627 waitpid.o \ 628 walkstack.o \ 629 wdata.o \ 630 xgetwidth.o \ 631 xpg4.o \ 632 xpg6.o 633 634 PORTPRINT_W= \ 635 doprnt_w.o 636 637 PORTPRINT= \ 638 asprintf.o \ 639 doprnt.o \ 640 fprintf.o \ 641 printf.o \ 642 snprintf.o \ 643 sprintf.o \ 644 vfprintf.o \ 645 vprintf.o \ 646 vsnprintf.o \ 647 vsprintf.o \ 648 vwprintf.o \ 649 wprintf.o 650 651 # c89 variants to support 32-bit size of c89 u/intmax_t (32-bit libc only) 652 PORTPRINT_C89= \ 653 vfprintf_c89.o \ 654 vprintf_c89.o \ 655 vsnprintf_c89.o \ 656 vsprintf_c89.o \ 657 vwprintf_c89.o 658 659 PORTSTDIO_C89= \ 660 vscanf_c89.o \ 661 vwscanf_c89.o 662 663 # portable stdio objects that contain large file interfaces. 664 # Note: fopen64 is a special case, as we build it small. 665 PORTSTDIO64= \ 666 fopen64.o \ 667 fpos64.o 668 669 PORTSTDIO_W= \ 670 doscan_w.o 671 672 PORTSTDIO= \ 673 __extensions.o \ 674 _endopen.o \ 675 _filbuf.o \ 676 _findbuf.o \ 677 _flsbuf.o \ 678 _wrtchk.o \ 679 clearerr.o \ 680 ctermid.o \ 681 ctermid_r.o \ 682 cuserid.o \ 683 data.o \ 684 doscan.o \ 685 fdopen.o \ 686 feof.o \ 687 ferror.o \ 688 fgetc.o \ 689 fgets.o \ 690 fileno.o \ 691 flockf.o \ 692 flush.o \ 693 fopen.o \ 694 fpos.o \ 695 fputc.o \ 696 fputs.o \ 697 fread.o \ 698 fseek.o \ 699 fseeko.o \ 700 ftell.o \ 701 ftello.o \ 702 fwrite.o \ 703 getc.o \ 704 getchar.o \ 705 getline.o \ 706 getpass.o \ 707 gets.o \ 708 getw.o \ 709 popen.o \ 710 putc.o \ 711 putchar.o \ 712 puts.o \ 713 putw.o \ 714 rewind.o \ 715 scanf.o \ 716 setbuf.o \ 717 setbuffer.o \ 718 setvbuf.o \ 719 system.o \ 720 tempnam.o \ 721 tmpfile.o \ 722 tmpnam_r.o \ 723 ungetc.o \ 724 mse.o \ 725 vscanf.o \ 726 vwscanf.o \ 727 wscanf.o 728 729 PORTI18N= \ 730 getwchar.o \ 731 putwchar.o \ 732 putws.o \ 733 strcasecmp.o \ 734 strcasestr.o \ 735 strncasecmp.o \ 736 strtows.o \ 737 wcsnlen.o \ 738 wcstoimax.o \ 739 wcstol.o \ 740 wcstoul.o \ 741 wcswcs.o \ 742 wscasecmp.o \ 743 wscat.o \ 744 wschr.o \ 745 wscmp.o \ 746 wscpy.o \ 747 wscspn.o \ 748 wsdup.o \ 749 wslen.o \ 750 wsncasecmp.o \ 751 wsncat.o \ 752 wsncmp.o \ 753 wsncpy.o \ 754 wspbrk.o \ 755 wsprintf.o \ 756 wsrchr.o \ 757 wsscanf.o \ 758 wsspn.o \ 759 wstod.o \ 760 wstok.o \ 761 wstol.o \ 762 wstoll.o \ 763 wsxfrm.o \ 764 wmemchr.o \ 765 wmemcmp.o \ 766 wmemcpy.o \ 767 wmemmove.o \ 768 wmemset.o \ 769 wcsstr.o \ 770 gettext.o \ 771 gettext_real.o \ 772 gettext_util.o \ 773 gettext_gnu.o \ 774 plural_parser.o \ 775 wdresolve.o \ 776 _ctype.o \ 777 isascii.o \ 778 isdigit.o \ 779 toascii.o 780 781 PORTI18N_COND= \ 782 wcstol_longlong.o \ 783 wcstoul_longlong.o 784 785 PORTLOCALE= \ 786 big5.o \ 787 btowc.o \ 788 collate.o \ 789 collcmp.o \ 790 euc.o \ 791 fnmatch.o \ 792 fgetwc.o \ 793 fgetws.o \ 794 fix_grouping.o \ 795 fputwc.o \ 796 fputws.o \ 797 fwide.o \ 798 gb18030.o \ 799 gb2312.o \ 800 gbk.o \ 801 getdate.o \ 802 iswctype.o \ 803 ldpart.o \ 804 lmessages.o \ 805 lnumeric.o \ 806 lmonetary.o \ 807 localeconv.o \ 808 mbftowc.o \ 809 mblen.o \ 810 mbrlen.o \ 811 mbrtowc.o \ 812 mbsinit.o \ 813 mbsnrtowcs.o \ 814 mbsrtowcs.o \ 815 mbstowcs.o \ 816 mbtowc.o \ 817 mskanji.o \ 818 nextwctype.o \ 819 nl_langinfo.o \ 820 none.o \ 821 regcomp.o \ 822 regfree.o \ 823 regerror.o \ 824 regexec.o \ 825 rune.o \ 826 runetype.o \ 827 setlocale.o \ 828 setrunelocale.o \ 829 strcoll.o \ 830 strfmon.o \ 831 strftime.o \ 832 strptime.o \ 833 strxfrm.o \ 834 table.o \ 835 timelocal.o \ 836 tolower.o \ 837 towlower.o \ 838 ungetwc.o \ 839 utf8.o \ 840 wcrtomb.o \ 841 wcscoll.o \ 842 wcsftime.o \ 843 wcsnrtombs.o \ 844 wcsrtombs.o \ 845 wcstombs.o \ 846 wcswidth.o \ 847 wcsxfrm.o \ 848 wctob.o \ 849 wctomb.o \ 850 wctrans.o \ 851 wctype.o \ 852 wcwidth.o \ 853 wscol.o 854 855 AIOOBJS= \ 856 aio.o \ 857 aio_alloc.o \ 858 posix_aio.o 859 860 RTOBJS= \ 861 clock_timer.o \ 862 mqueue.o \ 863 pos4obj.o \ 864 sched.o \ 865 sem.o \ 866 shm.o \ 867 sigev_thread.o 868 869 TPOOLOBJS= \ 870 thread_pool.o 871 872 THREADSOBJS= \ 873 alloc.o \ 874 assfail.o \ 875 cancel.o \ 876 door_calls.o \ 877 pthr_attr.o \ 878 pthr_barrier.o \ 879 pthr_cond.o \ 880 pthr_mutex.o \ 881 pthr_rwlock.o \ 882 pthread.o \ 883 rwlock.o \ 884 scalls.o \ 885 sema.o \ 886 sigaction.o \ 887 spawn.o \ 888 synch.o \ 889 tdb_agent.o \ 890 thr.o \ 891 thread_interface.o \ 892 tls.o \ 893 tsd.o 894 895 THREADSMACHOBJS= \ 896 machdep.o 897 898 THREADSASMOBJS= \ 899 asm_subr.o 900 901 UNICODEOBJS= \ 902 u8_textprep.o \ 903 uconv.o 904 905 UNWINDMACHOBJS= \ 906 unwind.o 907 908 UNWINDASMOBJS= \ 909 unwind_frame.o 910 911 # objects that implement the transitional large file API 912 PORTSYS64= \ 913 lockf64.o \ 914 stat64.o 915 916 PORTSYS= \ 917 _autofssys.o \ 918 access.o \ 919 acctctl.o \ 920 bsd_signal.o \ 921 chmod.o \ 922 chown.o \ 923 corectl.o \ 924 exacctsys.o \ 925 execl.o \ 926 execle.o \ 927 execv.o \ 928 fcntl.o \ 929 getpagesizes.o \ 930 getpeerucred.o \ 931 inst_sync.o \ 932 issetugid.o \ 933 label.o \ 934 link.o \ 935 lockf.o \ 936 lwp.o \ 937 lwp_cond.o \ 938 lwp_rwlock.o \ 939 lwp_sigmask.o \ 940 meminfosys.o \ 941 mkdir.o \ 942 mknod.o \ 943 msgsys.o \ 944 nfssys.o \ 945 open.o \ 946 pgrpsys.o \ 947 posix_sigwait.o \ 948 ppriv.o \ 949 psetsys.o \ 950 rctlsys.o \ 951 readlink.o \ 952 rename.o \ 953 sbrk.o \ 954 semsys.o \ 955 set_errno.o \ 956 sharefs.o \ 957 shmsys.o \ 958 sidsys.o \ 959 siginterrupt.o \ 960 signal.o \ 961 sigpending.o \ 962 sigstack.o \ 963 stat.o \ 964 symlink.o \ 965 tasksys.o \ 966 time.o \ 967 time_util.o \ 968 ucontext.o \ 969 unlink.o \ 970 ustat.o \ 971 utimesys.o \ 972 zone.o 973 974 PORTREGEX= \ 975 glob.o \ 976 regcmp.o \ 977 regex.o \ 978 wordexp.o 979 980 VALUES= values-Xa.o 981 982 MOSTOBJS= \ 983 $(STRETS) \ 984 $(CRTOBJS) \ 985 $(DYNOBJS) \ 986 $(FPOBJS) \ 987 $(FPASMOBJS) \ 988 $(ATOMICOBJS) \ 989 $(XATTROBJS) \ 990 $(COMOBJS) \ 991 $(DTRACEOBJS) \ 992 $(GENOBJS) \ 993 $(PRFOBJS) \ 994 $(PORTFP) \ 995 $(PORTGEN) \ 996 $(PORTGEN64) \ 997 $(PORTI18N) \ 998 $(PORTI18N_COND) \ 999 $(PORTLOCALE) \ 1000 $(PORTPRINT) \ 1001 $(PORTPRINT_C89) \ 1002 $(PORTPRINT_W) \ 1003 $(PORTREGEX) \ 1004 $(PORTSTDIO) \ 1005 $(PORTSTDIO64) \ 1006 $(PORTSTDIO_C89) \ 1007 $(PORTSTDIO_W) \ 1008 $(PORTSYS) \ 1009 $(PORTSYS64) \ 1010 $(AIOOBJS) \ 1011 $(RTOBJS) \ 1012 $(TPOOLOBJS) \ 1013 $(THREADSOBJS) \ 1014 $(THREADSMACHOBJS) \ 1015 $(THREADSASMOBJS) \ 1016 $(UNICODEOBJS) \ 1017 $(UNWINDMACHOBJS) \ 1018 $(UNWINDASMOBJS) \ 1019 $(COMSYSOBJS) \ 1020 $(SYSOBJS) \ 1021 $(COMSYSOBJS64) \ 1022 $(SYSOBJS64) \ 1023 $(VALUES) 1024 1025 TRACEOBJS= \ 1026 plockstat.o 1027 1028 # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 1029 # modules whose source is provided in the $(SRC)/lib/common directory. 1030 # This must be done because otherwise the Sun C compiler would insert 1031 # its own versions of these modules and those versions contain code 1032 # to call out to C++ initialization functions. Such C++ initialization 1033 # functions can call back into libc before thread initialization is 1034 # complete and this leads to segmentation violations and other problems. 1035 # Since libc contains no C++ code, linking with the minimal crti.o and 1036 # crtn.o modules is safe and avoids the problems described above. 1037 OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 1038 CRTSRCS= ../../common/sparc 1039 1040 # include common library definitions 1041 include $(SRC)/lib/Makefile.lib 1042 1043 # we need to override the default SONAME here because we might 1044 # be building a variant object (still libc.so.1, but different filename) 1045 SONAME = libc.so.1 1046 1047 CFLAGS += $(CCVERBOSE) 1048 1049 # This is necessary to avoid problems with calling _ex_unwind(). 1050 # We probably don't want any inlining anyway. 1051 CFLAGS += -xinline= 1052 1053 CERRWARN += -_gcc=-Wno-parentheses 1054 CERRWARN += -_gcc=-Wno-switch 1055 CERRWARN += -_gcc=-Wno-uninitialized 1056 CERRWARN += -_gcc=-Wno-unused-value 1057 CERRWARN += -_gcc=-Wno-unused-label 1058 CERRWARN += -_gcc=-Wno-unused-variable 1059 CERRWARN += -_gcc=-Wno-type-limits 1060 CERRWARN += -_gcc=-Wno-char-subscripts 1061 CERRWARN += -_gcc=-Wno-clobbered 1062 CERRWARN += -_gcc=-Wno-unused-function 1063 CERRWARN += -_gcc=-Wno-address 1064 1065 # Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) 1066 # enables ASSERT() checking in the threads portion of the library. 1067 # This is automatically enabled for DEBUG builds, not for non-debug builds. 1068 THREAD_DEBUG = 1069 $(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 1070 1071 # Make string literals read-only to save memory. 1072 CFLAGS += $(XSTRCONST) 1073 1074 ALTPICS= $(TRACEOBJS:%=pics/%) 1075 1076 $(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS) 1077 1078 MAPFILES = $(LIBCDIR)/port/mapfile-vers 1079 1080 CFLAGS += $(EXTN_CFLAGS) 1081 CPPFLAGS= -D_REENTRANT -Dsparc $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \ 1082 -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master) 1083 ASFLAGS= $(EXTN_ASFLAGS) -K pic -P -D__STDC__ -D_ASM $(CPPFLAGS) $(sparc_AS_XARCH) 1084 1085 # As a favor to the dtrace syscall provider, libc still calls the 1086 # old syscall traps that have been obsoleted by the *at() interfaces. 1087 # Delete this to compile libc using only the new *at() system call traps 1088 CPPFLAGS += -D_RETAIN_OLD_SYSCALLS 1089 1090 # Inform the run-time linker about libc specialized initialization 1091 RTLDINFO = -z rtldinfo=tls_rtldinfo 1092 DYNFLAGS += $(RTLDINFO) 1093 1094 # Force libc's internal references to be resolved immediately upon loading 1095 # in order to avoid critical region problems. Since almost all libc symbols 1096 # are marked 'protected' in the mapfiles, this is a minimal set (15 to 20). 1097 DYNFLAGS += -znow 1098 1099 DYNFLAGS += -e __rtboot 1100 DYNFLAGS += $(EXTN_DYNFLAGS) 1101 1102 # Inform the kernel about the initial DTrace area (in case 1103 # libc is being used as the interpreter / runtime linker). 1104 DTRACE_DATA = -zdtrace=dtrace_data 1105 DYNFLAGS += $(DTRACE_DATA) 1106 1107 # DTrace needs an executable data segment. 1108 MAPFILE.NED= 1109 1110 BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 1111 1112 # Override this top level flag so the compiler builds in its native 1113 # C99 mode. This has been enabled to support the complex arithmetic 1114 # added to libc. 1115 C99MODE= $(C99_ENABLE) 1116 1117 # libc method of building an archive 1118 # The "$(GREP) -v ' L '" part is necessary only until 1119 # lorder is fixed to ignore thread-local variables. 1120 BUILD.AR= $(RM) $@ ; \ 1121 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)` 1122 1123 # extra files for the clean target 1124 CLEANFILES= \ 1125 $(LIBCDIR)/port/gen/errlst.c \ 1126 $(LIBCDIR)/port/gen/new_list.c \ 1127 assym.h \ 1128 genassym \ 1129 $(LIBCBASE)/crt/_rtld.s \ 1130 $(LIBCBASE)/crt/_rtbootld.s \ 1131 pics/_rtbootld.o \ 1132 pics/crti.o \ 1133 pics/crtn.o \ 1134 $(ALTPICS) 1135 1136 CLOBBERFILES += $(LIB_PIC) 1137 1138 # list of C source for lint 1139 SRCS= \ 1140 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \ 1141 $(XATTROBJS:%.o=$(SRC)/common/xattr/%.c) \ 1142 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \ 1143 $(DTRACEOBJS:%.o=$(SRC)/common/dtrace/%.c) \ 1144 $(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c) \ 1145 $(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c) \ 1146 $(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c) \ 1147 $(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c) \ 1148 $(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c) \ 1149 $(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c) \ 1150 $(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c) \ 1151 $(PORTSYS:%.o=$(LIBCDIR)/port/sys/%.c) \ 1152 $(AIOOBJS:%.o=$(LIBCDIR)/port/aio/%.c) \ 1153 $(RTOBJS:%.o=$(LIBCDIR)/port/rt/%.c) \ 1154 $(TPOOLOBJS:%.o=$(LIBCDIR)/port/tpool/%.c) \ 1155 $(THREADSOBJS:%.o=$(LIBCDIR)/port/threads/%.c) \ 1156 $(THREADSMACHOBJS:%.o=$(LIBCDIR)/$(MACH)/threads/%.c) \ 1157 $(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c) \ 1158 $(UNWINDMACHOBJS:%.o=$(LIBCDIR)/port/unwind/%.c) \ 1159 $(FPOBJS:%.o=$(LIBCDIR)/$(MACH)/fp/%.c) \ 1160 $(LIBCBASE)/crt/_ftou.c \ 1161 $(LIBCBASE)/gen/_xregs_clrptr.c \ 1162 $(LIBCBASE)/gen/byteorder.c \ 1163 $(LIBCBASE)/gen/ecvt.c \ 1164 $(LIBCBASE)/gen/getctxt.c \ 1165 $(LIBCBASE)/gen/lmul.c \ 1166 $(LIBCBASE)/gen/makectxt.c \ 1167 $(LIBCBASE)/gen/siginfolst.c \ 1168 $(LIBCBASE)/gen/siglongjmp.c \ 1169 $(LIBCBASE)/gen/swapctxt.c \ 1170 $(LIBCBASE)/sys/ptrace.c \ 1171 $(LIBCBASE)/sys/uadmin.c 1172 1173 # conditional assignments 1174 $(DYNLIB) := CRTI = crti.o 1175 $(DYNLIB) := CRTN = crtn.o 1176 1177 # Files which need the threads .il inline template 1178 TIL= \ 1179 aio.o \ 1180 alloc.o \ 1181 assfail.o \ 1182 atexit.o \ 1183 atfork.o \ 1184 cancel.o \ 1185 door_calls.o \ 1186 err.o \ 1187 errno.o \ 1188 getctxt.o \ 1189 lwp.o \ 1190 ma.o \ 1191 machdep.o \ 1192 posix_aio.o \ 1193 pthr_attr.o \ 1194 pthr_barrier.o \ 1195 pthr_cond.o \ 1196 pthr_mutex.o \ 1197 pthr_rwlock.o \ 1198 pthread.o \ 1199 rand.o \ 1200 rwlock.o \ 1201 scalls.o \ 1202 sched.o \ 1203 sema.o \ 1204 sigaction.o \ 1205 sigev_thread.o \ 1206 spawn.o \ 1207 stack.o \ 1208 swapctxt.o \ 1209 synch.o \ 1210 tdb_agent.o \ 1211 thr.o \ 1212 thread_interface.o \ 1213 thread_pool.o \ 1214 tls.o \ 1215 tsd.o \ 1216 unwind.o 1217 1218 $(TIL:%=pics/%) := CFLAGS += $(LIBCBASE)/threads/sparc.il 1219 1220 # special kludge for inlines with 'cas': 1221 pics/rwlock.o pics/synch.o pics/lwp.o pics/door_calls.o := \ 1222 sparc_CFLAGS += -_gcc=-Wa,-xarch=v8plus 1223 1224 # Files in port/fp subdirectory that need base.il inline template 1225 IL= \ 1226 __flt_decim.o \ 1227 decimal_bin.o 1228 1229 $(IL:%=pics/%) := CFLAGS += $(LIBCBASE)/fp/base.il 1230 1231 # Files in fp subdirectory which need __quad.il inline template 1232 QIL= \ 1233 _Q_add.o \ 1234 _Q_cmp.o \ 1235 _Q_cmpe.o \ 1236 _Q_div.o \ 1237 _Q_dtoq.o \ 1238 _Q_fcc.o \ 1239 _Q_mul.o \ 1240 _Q_qtod.o \ 1241 _Q_qtoi.o \ 1242 _Q_qtos.o \ 1243 _Q_qtou.o \ 1244 _Q_sqrt.o \ 1245 _Q_stoq.o \ 1246 _Q_sub.o 1247 1248 $(QIL:%=pics/%) := CFLAGS += $(LIBCDIR)/$(MACH)/fp/__quad.il 1249 pics/_Q%.o := sparc_COPTFLAG = -xO4 -dalign 1250 pics/__quad%.o := sparc_COPTFLAG = -xO4 -dalign 1251 1252 # large-file-aware components that should be built large 1253 1254 $(COMSYSOBJS64:%=pics/%) := \ 1255 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1256 1257 $(SYSOBJS64:%=pics/%) := \ 1258 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1259 1260 $(PORTGEN64:%=pics/%) := \ 1261 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1262 1263 $(PORTSTDIO64:%=pics/%) := \ 1264 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1265 1266 $(PORTSYS64:%=pics/%) := \ 1267 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1268 1269 $(PORTSTDIO_W:%=pics/%) := \ 1270 CPPFLAGS += -D_WIDE 1271 1272 $(PORTPRINT_W:%=pics/%) := \ 1273 CPPFLAGS += -D_WIDE 1274 1275 # printf/scanf functions to support c89-sized intmax_t variables 1276 $(PORTPRINT_C89:%=pics/%) := \ 1277 CPPFLAGS += -D_C89_INTMAX32 1278 1279 $(PORTSTDIO_C89:%=pics/%) := \ 1280 CPPFLAGS += -D_C89_INTMAX32 1281 1282 $(PORTI18N_COND:%=pics/%) := \ 1283 CPPFLAGS += -D_WCS_LONGLONG 1284 1285 # Files which need extra optimization 1286 pics/getenv.o := sparc_COPTFLAG = -xO4 1287 1288 .KEEP_STATE: 1289 1290 all: $(LIBS) $(LIB_PIC) 1291 1292 lint := CPPFLAGS += -I$(LIBCDIR)/$(MACH)/fp 1293 lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99 1294 lint := LINTFLAGS += -mn 1295 1296 lint: 1297 @echo $(LINT.c) ... $(LDLIBS) 1298 @$(LINT.c) $(SRCS) $(LDLIBS) 1299 1300 $(LINTLIB):= SRCS=$(LIBCDIR)/port/llib-lc 1301 $(LINTLIB):= CPPFLAGS += -D_MSE_INT_H 1302 $(LINTLIB):= LINTFLAGS=-nvx 1303 1304 # object files that depend on inline template 1305 $(TIL:%=pics/%): $(LIBCBASE)/threads/sparc.il 1306 $(IL:%=pics/%): $(LIBCBASE)/fp/base.il 1307 $(QIL:%=pics/%): $(LIBCDIR)/$(MACH)/fp/__quad.il 1308 1309 # include common libc targets 1310 include $(LIBCDIR)/Makefile.targ 1311 1312 # We need to strip out all CTF and DOF data from the static library 1313 $(LIB_PIC) := DIR = pics 1314 $(LIB_PIC): pics $$(PICS) 1315 $(BUILD.AR) 1316 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1317 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1318 $(AR) -ts $@ > /dev/null 1319 $(POST_PROCESS_A) 1320 1321 # special cases 1322 $(STRETS:%=pics/%): $(LIBCBASE)/crt/stret.s 1323 $(AS) $(ASFLAGS) -DSTRET$(@F:stret%.o=%) $(LIBCBASE)/crt/stret.s -o $@ 1324 $(POST_PROCESS_O) 1325 1326 $(LIBCBASE)/crt/_rtbootld.s: $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.c 1327 $(CC) $(CPPFLAGS) $(CTF_FLAGS) -O -S -K pic \ 1328 $(LIBCBASE)/crt/_rtld.c -o $(LIBCBASE)/crt/_rtld.s 1329 $(CAT) $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.s > $@ 1330 $(RM) $(LIBCBASE)/crt/_rtld.s 1331 1332 # partially built from C source 1333 pics/_rtbootld.o: $(LIBCBASE)/crt/_rtbootld.s 1334 $(AS) $(ASFLAGS) $(LIBCBASE)/crt/_rtbootld.s -o $@ 1335 $(CTFCONVERT_O) 1336 1337 ASSYMDEP_OBJS= \ 1338 _lwp_mutex_unlock.o \ 1339 _stack_grow.o \ 1340 asm_subr.o \ 1341 setjmp.o \ 1342 smt_pause.o \ 1343 tls_get_addr.o \ 1344 unwind_frame.o \ 1345 vforkx.o 1346 1347 $(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1348 1349 $(ASSYMDEP_OBJS:%=pics/%): assym.h 1350 1351 # assym.h build rules 1352 1353 assym.h := CFLAGS += -g 1354 1355 GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c 1356 1357 genassym: $(GENASSYM_C) 1358 $(NATIVECC) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \ 1359 $(CPPFLAGS.native) -o $@ $(GENASSYM_C) 1360 1361 OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1362 1363 assym.h: $(OFFSETS) genassym 1364 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1365 ./genassym >>$@ 1366 1367 # derived C source and related explicit dependencies 1368 $(LIBCDIR)/port/gen/errlst.c + \ 1369 $(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk 1370 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist 1371 1372 pics/errlst.o: $(LIBCDIR)/port/gen/errlst.c 1373 1374 pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c