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 cfmakeraw.o \ 414 cftime.o \ 415 clock.o \ 416 closedir.o \ 417 closefrom.o \ 418 confstr.o \ 419 crypt.o \ 420 csetlen.o \ 421 ctime.o \ 422 ctime_r.o \ 423 daemon.o \ 424 deflt.o \ 425 directio.o \ 426 dirname.o \ 427 div.o \ 428 drand48.o \ 429 dup.o \ 430 env_data.o \ 431 err.o \ 432 errno.o \ 433 euclen.o \ 434 event_port.o \ 435 execvp.o \ 436 fattach.o \ 437 fdetach.o \ 438 fdopendir.o \ 439 ffs.o \ 440 fls.o \ 441 fmtmsg.o \ 442 ftime.o \ 443 ftok.o \ 444 ftw.o \ 445 gcvt.o \ 446 getauxv.o \ 447 getcwd.o \ 448 getdate_err.o \ 449 getdtblsize.o \ 450 getenv.o \ 451 getexecname.o \ 452 getgrnam.o \ 453 getgrnam_r.o \ 454 gethostid.o \ 455 gethostname.o \ 456 gethz.o \ 457 getisax.o \ 458 getloadavg.o \ 459 getlogin.o \ 460 getmntent.o \ 461 getnetgrent.o \ 462 get_nprocs.o \ 463 getopt.o \ 464 getopt_long.o \ 465 getpagesize.o \ 466 getpw.o \ 467 getpwnam.o \ 468 getpwnam_r.o \ 469 getrusage.o \ 470 getspent.o \ 471 getspent_r.o \ 472 getsubopt.o \ 473 gettxt.o \ 474 getusershell.o \ 475 getut.o \ 476 getutx.o \ 477 getvfsent.o \ 478 getwd.o \ 479 getwidth.o \ 480 getxby_door.o \ 481 gtxt.o \ 482 hsearch.o \ 483 iconv.o \ 484 imaxabs.o \ 485 imaxdiv.o \ 486 index.o \ 487 initgroups.o \ 488 insque.o \ 489 isaexec.o \ 490 isastream.o \ 491 isatty.o \ 492 killpg.o \ 493 klpdlib.o \ 494 l64a.o \ 495 lckpwdf.o \ 496 lconstants.o \ 497 ldivide.o \ 498 lexp10.o \ 499 lfind.o \ 500 lfmt.o \ 501 lfmt_log.o \ 502 llabs.o \ 503 lldiv.o \ 504 llog10.o \ 505 lltostr.o \ 506 localtime.o \ 507 lsearch.o \ 508 madvise.o \ 509 malloc.o \ 510 memalign.o \ 511 memmem.o \ 512 mkdev.o \ 513 mkdtemp.o \ 514 mkfifo.o \ 515 mkstemp.o \ 516 mktemp.o \ 517 mlock.o \ 518 mlockall.o \ 519 mon.o \ 520 msync.o \ 521 munlock.o \ 522 munlockall.o \ 523 ndbm.o \ 524 nftw.o \ 525 nlspath_checks.o \ 526 nsparse.o \ 527 nss_common.o \ 528 nss_dbdefs.o \ 529 nss_deffinder.o \ 530 opendir.o \ 531 opt_data.o \ 532 perror.o \ 533 pfmt.o \ 534 pfmt_data.o \ 535 pfmt_print.o \ 536 pipe.o \ 537 plock.o \ 538 poll.o \ 539 posix_fadvise.o \ 540 posix_fallocate.o \ 541 posix_madvise.o \ 542 posix_memalign.o \ 543 priocntl.o \ 544 privlib.o \ 545 priv_str_xlate.o \ 546 psiginfo.o \ 547 psignal.o \ 548 pt.o \ 549 putpwent.o \ 550 putspent.o \ 551 raise.o \ 552 rand.o \ 553 random.o \ 554 rctlops.o \ 555 readdir.o \ 556 readdir_r.o \ 557 realpath.o \ 558 reboot.o \ 559 regexpr.o \ 560 remove.o \ 561 rewinddir.o \ 562 rindex.o \ 563 scandir.o \ 564 seekdir.o \ 565 select.o \ 566 select_large_fdset.o \ 567 setlabel.o \ 568 setpriority.o \ 569 settimeofday.o \ 570 sh_locks.o \ 571 sigflag.o \ 572 siglist.o \ 573 sigsend.o \ 574 sigsetops.o \ 575 ssignal.o \ 576 stack.o \ 577 stpcpy.o \ 578 stpncpy.o \ 579 str2sig.o \ 580 strcase_charmap.o \ 581 strcat.o \ 582 strchrnul.o \ 583 strcspn.o \ 584 strdup.o \ 585 strerror.o \ 586 strlcat.o \ 587 strncat.o \ 588 strndup.o \ 589 strpbrk.o \ 590 strrchr.o \ 591 strsep.o \ 592 strsignal.o \ 593 strspn.o \ 594 strstr.o \ 595 strtod.o \ 596 strtoimax.o \ 597 strtok.o \ 598 strtok_r.o \ 599 strtoumax.o \ 600 swab.o \ 601 swapctl.o \ 602 sysconf.o \ 603 syslog.o \ 604 tcdrain.o \ 605 tcflow.o \ 606 tcflush.o \ 607 tcgetattr.o \ 608 tcgetpgrp.o \ 609 tcgetsid.o \ 610 tcsendbreak.o \ 611 tcsetattr.o \ 612 tcsetpgrp.o \ 613 tell.o \ 614 telldir.o \ 615 tfind.o \ 616 time_data.o \ 617 time_gdata.o \ 618 tls_data.o \ 619 truncate.o \ 620 tsdalloc.o \ 621 tsearch.o \ 622 ttyname.o \ 623 ttyslot.o \ 624 ualarm.o \ 625 ucred.o \ 626 valloc.o \ 627 vlfmt.o \ 628 vpfmt.o \ 629 waitpid.o \ 630 walkstack.o \ 631 wdata.o \ 632 xgetwidth.o \ 633 xpg4.o \ 634 xpg6.o 635 636 PORTPRINT_W= \ 637 doprnt_w.o 638 639 PORTPRINT= \ 640 asprintf.o \ 641 doprnt.o \ 642 fprintf.o \ 643 printf.o \ 644 snprintf.o \ 645 sprintf.o \ 646 vfprintf.o \ 647 vprintf.o \ 648 vsnprintf.o \ 649 vsprintf.o \ 650 vwprintf.o \ 651 wprintf.o 652 653 # c89 variants to support 32-bit size of c89 u/intmax_t (32-bit libc only) 654 PORTPRINT_C89= \ 655 vfprintf_c89.o \ 656 vprintf_c89.o \ 657 vsnprintf_c89.o \ 658 vsprintf_c89.o \ 659 vwprintf_c89.o 660 661 PORTSTDIO_C89= \ 662 vscanf_c89.o \ 663 vwscanf_c89.o 664 665 # portable stdio objects that contain large file interfaces. 666 # Note: fopen64 is a special case, as we build it small. 667 PORTSTDIO64= \ 668 fopen64.o \ 669 fpos64.o 670 671 PORTSTDIO_W= \ 672 doscan_w.o 673 674 PORTSTDIO= \ 675 __extensions.o \ 676 _endopen.o \ 677 _filbuf.o \ 678 _findbuf.o \ 679 _flsbuf.o \ 680 _wrtchk.o \ 681 clearerr.o \ 682 ctermid.o \ 683 ctermid_r.o \ 684 cuserid.o \ 685 data.o \ 686 doscan.o \ 687 fdopen.o \ 688 feof.o \ 689 ferror.o \ 690 fgetc.o \ 691 fgets.o \ 692 fileno.o \ 693 flockf.o \ 694 flush.o \ 695 fopen.o \ 696 fpos.o \ 697 fputc.o \ 698 fputs.o \ 699 fread.o \ 700 fseek.o \ 701 fseeko.o \ 702 ftell.o \ 703 ftello.o \ 704 fwrite.o \ 705 getc.o \ 706 getchar.o \ 707 getline.o \ 708 getpass.o \ 709 gets.o \ 710 getw.o \ 711 popen.o \ 712 putc.o \ 713 putchar.o \ 714 puts.o \ 715 putw.o \ 716 rewind.o \ 717 scanf.o \ 718 setbuf.o \ 719 setbuffer.o \ 720 setvbuf.o \ 721 system.o \ 722 tempnam.o \ 723 tmpfile.o \ 724 tmpnam_r.o \ 725 ungetc.o \ 726 mse.o \ 727 vscanf.o \ 728 vwscanf.o \ 729 wscanf.o 730 731 PORTI18N= \ 732 getwchar.o \ 733 putwchar.o \ 734 putws.o \ 735 strcasecmp.o \ 736 strcasestr.o \ 737 strncasecmp.o \ 738 strtows.o \ 739 wcsnlen.o \ 740 wcstoimax.o \ 741 wcstol.o \ 742 wcstoul.o \ 743 wcswcs.o \ 744 wscasecmp.o \ 745 wscat.o \ 746 wschr.o \ 747 wscmp.o \ 748 wscpy.o \ 749 wscspn.o \ 750 wsdup.o \ 751 wslen.o \ 752 wsncasecmp.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 isdigit.o \ 781 toascii.o 782 783 PORTI18N_COND= \ 784 wcstol_longlong.o \ 785 wcstoul_longlong.o 786 787 PORTLOCALE= \ 788 big5.o \ 789 btowc.o \ 790 collate.o \ 791 collcmp.o \ 792 euc.o \ 793 fnmatch.o \ 794 fgetwc.o \ 795 fgetws.o \ 796 fix_grouping.o \ 797 fputwc.o \ 798 fputws.o \ 799 fwide.o \ 800 gb18030.o \ 801 gb2312.o \ 802 gbk.o \ 803 getdate.o \ 804 iswctype.o \ 805 ldpart.o \ 806 lmessages.o \ 807 lnumeric.o \ 808 lmonetary.o \ 809 localeconv.o \ 810 mbftowc.o \ 811 mblen.o \ 812 mbrlen.o \ 813 mbrtowc.o \ 814 mbsinit.o \ 815 mbsnrtowcs.o \ 816 mbsrtowcs.o \ 817 mbstowcs.o \ 818 mbtowc.o \ 819 mskanji.o \ 820 nextwctype.o \ 821 nl_langinfo.o \ 822 none.o \ 823 regcomp.o \ 824 regfree.o \ 825 regerror.o \ 826 regexec.o \ 827 rune.o \ 828 runetype.o \ 829 setlocale.o \ 830 setrunelocale.o \ 831 strcoll.o \ 832 strfmon.o \ 833 strftime.o \ 834 strptime.o \ 835 strxfrm.o \ 836 table.o \ 837 timelocal.o \ 838 tolower.o \ 839 towlower.o \ 840 ungetwc.o \ 841 utf8.o \ 842 wcrtomb.o \ 843 wcscoll.o \ 844 wcsftime.o \ 845 wcsnrtombs.o \ 846 wcsrtombs.o \ 847 wcstombs.o \ 848 wcswidth.o \ 849 wcsxfrm.o \ 850 wctob.o \ 851 wctomb.o \ 852 wctrans.o \ 853 wctype.o \ 854 wcwidth.o \ 855 wscol.o 856 857 AIOOBJS= \ 858 aio.o \ 859 aio_alloc.o \ 860 posix_aio.o 861 862 RTOBJS= \ 863 clock_timer.o \ 864 mqueue.o \ 865 pos4obj.o \ 866 sched.o \ 867 sem.o \ 868 shm.o \ 869 sigev_thread.o 870 871 TPOOLOBJS= \ 872 thread_pool.o 873 874 THREADSOBJS= \ 875 alloc.o \ 876 assfail.o \ 877 cancel.o \ 878 door_calls.o \ 879 pthr_attr.o \ 880 pthr_barrier.o \ 881 pthr_cond.o \ 882 pthr_mutex.o \ 883 pthr_rwlock.o \ 884 pthread.o \ 885 rwlock.o \ 886 scalls.o \ 887 sema.o \ 888 sigaction.o \ 889 spawn.o \ 890 synch.o \ 891 tdb_agent.o \ 892 thr.o \ 893 thread_interface.o \ 894 tls.o \ 895 tsd.o 896 897 THREADSMACHOBJS= \ 898 machdep.o 899 900 THREADSASMOBJS= \ 901 asm_subr.o 902 903 UNICODEOBJS= \ 904 u8_textprep.o \ 905 uconv.o 906 907 UNWINDMACHOBJS= \ 908 unwind.o 909 910 UNWINDASMOBJS= \ 911 unwind_frame.o 912 913 # objects that implement the transitional large file API 914 PORTSYS64= \ 915 lockf64.o \ 916 stat64.o 917 918 PORTSYS= \ 919 _autofssys.o \ 920 access.o \ 921 acctctl.o \ 922 bsd_signal.o \ 923 chmod.o \ 924 chown.o \ 925 corectl.o \ 926 exacctsys.o \ 927 execl.o \ 928 execle.o \ 929 execv.o \ 930 fcntl.o \ 931 getpagesizes.o \ 932 getpeerucred.o \ 933 inst_sync.o \ 934 issetugid.o \ 935 label.o \ 936 link.o \ 937 lockf.o \ 938 lwp.o \ 939 lwp_cond.o \ 940 lwp_rwlock.o \ 941 lwp_sigmask.o \ 942 meminfosys.o \ 943 mkdir.o \ 944 mknod.o \ 945 msgsys.o \ 946 nfssys.o \ 947 open.o \ 948 pgrpsys.o \ 949 posix_sigwait.o \ 950 ppriv.o \ 951 psetsys.o \ 952 rctlsys.o \ 953 readlink.o \ 954 rename.o \ 955 sbrk.o \ 956 semsys.o \ 957 set_errno.o \ 958 sharefs.o \ 959 shmsys.o \ 960 sidsys.o \ 961 siginterrupt.o \ 962 signal.o \ 963 sigpending.o \ 964 sigstack.o \ 965 stat.o \ 966 symlink.o \ 967 tasksys.o \ 968 time.o \ 969 time_util.o \ 970 ucontext.o \ 971 unlink.o \ 972 ustat.o \ 973 utimesys.o \ 974 zone.o 975 976 PORTREGEX= \ 977 glob.o \ 978 regcmp.o \ 979 regex.o \ 980 wordexp.o 981 982 VALUES= values-Xa.o 983 984 MOSTOBJS= \ 985 $(STRETS) \ 986 $(CRTOBJS) \ 987 $(DYNOBJS) \ 988 $(FPOBJS) \ 989 $(FPASMOBJS) \ 990 $(ATOMICOBJS) \ 991 $(XATTROBJS) \ 992 $(COMOBJS) \ 993 $(DTRACEOBJS) \ 994 $(GENOBJS) \ 995 $(PRFOBJS) \ 996 $(PORTFP) \ 997 $(PORTGEN) \ 998 $(PORTGEN64) \ 999 $(PORTI18N) \ 1000 $(PORTI18N_COND) \ 1001 $(PORTLOCALE) \ 1002 $(PORTPRINT) \ 1003 $(PORTPRINT_C89) \ 1004 $(PORTPRINT_W) \ 1005 $(PORTREGEX) \ 1006 $(PORTSTDIO) \ 1007 $(PORTSTDIO64) \ 1008 $(PORTSTDIO_C89) \ 1009 $(PORTSTDIO_W) \ 1010 $(PORTSYS) \ 1011 $(PORTSYS64) \ 1012 $(AIOOBJS) \ 1013 $(RTOBJS) \ 1014 $(TPOOLOBJS) \ 1015 $(THREADSOBJS) \ 1016 $(THREADSMACHOBJS) \ 1017 $(THREADSASMOBJS) \ 1018 $(UNICODEOBJS) \ 1019 $(UNWINDMACHOBJS) \ 1020 $(UNWINDASMOBJS) \ 1021 $(COMSYSOBJS) \ 1022 $(SYSOBJS) \ 1023 $(COMSYSOBJS64) \ 1024 $(SYSOBJS64) \ 1025 $(VALUES) 1026 1027 TRACEOBJS= \ 1028 plockstat.o 1029 1030 # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 1031 # modules whose source is provided in the $(SRC)/lib/common directory. 1032 # This must be done because otherwise the Sun C compiler would insert 1033 # its own versions of these modules and those versions contain code 1034 # to call out to C++ initialization functions. Such C++ initialization 1035 # functions can call back into libc before thread initialization is 1036 # complete and this leads to segmentation violations and other problems. 1037 # Since libc contains no C++ code, linking with the minimal crti.o and 1038 # crtn.o modules is safe and avoids the problems described above. 1039 OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 1040 CRTSRCS= ../../common/sparc 1041 1042 # include common library definitions 1043 include $(SRC)/lib/Makefile.lib 1044 1045 # we need to override the default SONAME here because we might 1046 # be building a variant object (still libc.so.1, but different filename) 1047 SONAME = libc.so.1 1048 1049 CFLAGS += $(CCVERBOSE) 1050 1051 # This is necessary to avoid problems with calling _ex_unwind(). 1052 # We probably don't want any inlining anyway. 1053 CFLAGS += -xinline= 1054 1055 CERRWARN += -_gcc=-Wno-parentheses 1056 CERRWARN += -_gcc=-Wno-switch 1057 CERRWARN += -_gcc=-Wno-uninitialized 1058 CERRWARN += -_gcc=-Wno-unused-value 1059 CERRWARN += -_gcc=-Wno-unused-label 1060 CERRWARN += -_gcc=-Wno-unused-variable 1061 CERRWARN += -_gcc=-Wno-type-limits 1062 CERRWARN += -_gcc=-Wno-char-subscripts 1063 CERRWARN += -_gcc=-Wno-clobbered 1064 CERRWARN += -_gcc=-Wno-unused-function 1065 CERRWARN += -_gcc=-Wno-address 1066 1067 # Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) 1068 # enables ASSERT() checking in the threads portion of the library. 1069 # This is automatically enabled for DEBUG builds, not for non-debug builds. 1070 THREAD_DEBUG = 1071 $(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 1072 1073 # Make string literals read-only to save memory. 1074 CFLAGS += $(XSTRCONST) 1075 1076 ALTPICS= $(TRACEOBJS:%=pics/%) 1077 1078 $(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS) 1079 1080 MAPFILES = $(LIBCDIR)/port/mapfile-vers 1081 1082 CFLAGS += $(EXTN_CFLAGS) 1083 CPPFLAGS= -D_REENTRANT -Dsparc $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \ 1084 -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master) 1085 ASFLAGS= $(EXTN_ASFLAGS) -K pic -P -D__STDC__ -D_ASM $(CPPFLAGS) $(sparc_AS_XARCH) 1086 1087 # As a favor to the dtrace syscall provider, libc still calls the 1088 # old syscall traps that have been obsoleted by the *at() interfaces. 1089 # Delete this to compile libc using only the new *at() system call traps 1090 CPPFLAGS += -D_RETAIN_OLD_SYSCALLS 1091 1092 # Inform the run-time linker about libc specialized initialization 1093 RTLDINFO = -z rtldinfo=tls_rtldinfo 1094 DYNFLAGS += $(RTLDINFO) 1095 1096 # Force libc's internal references to be resolved immediately upon loading 1097 # in order to avoid critical region problems. Since almost all libc symbols 1098 # are marked 'protected' in the mapfiles, this is a minimal set (15 to 20). 1099 DYNFLAGS += -znow 1100 1101 DYNFLAGS += -e __rtboot 1102 DYNFLAGS += $(EXTN_DYNFLAGS) 1103 1104 # Inform the kernel about the initial DTrace area (in case 1105 # libc is being used as the interpreter / runtime linker). 1106 DTRACE_DATA = -zdtrace=dtrace_data 1107 DYNFLAGS += $(DTRACE_DATA) 1108 1109 # DTrace needs an executable data segment. 1110 MAPFILE.NED= 1111 1112 BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 1113 1114 # Override this top level flag so the compiler builds in its native 1115 # C99 mode. This has been enabled to support the complex arithmetic 1116 # added to libc. 1117 C99MODE= $(C99_ENABLE) 1118 1119 # libc method of building an archive 1120 # The "$(GREP) -v ' L '" part is necessary only until 1121 # lorder is fixed to ignore thread-local variables. 1122 BUILD.AR= $(RM) $@ ; \ 1123 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)` 1124 1125 # extra files for the clean target 1126 CLEANFILES= \ 1127 $(LIBCDIR)/port/gen/errlst.c \ 1128 $(LIBCDIR)/port/gen/new_list.c \ 1129 assym.h \ 1130 genassym \ 1131 $(LIBCBASE)/crt/_rtld.s \ 1132 $(LIBCBASE)/crt/_rtbootld.s \ 1133 pics/_rtbootld.o \ 1134 pics/crti.o \ 1135 pics/crtn.o \ 1136 $(ALTPICS) 1137 1138 CLOBBERFILES += $(LIB_PIC) 1139 1140 # list of C source for lint 1141 SRCS= \ 1142 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \ 1143 $(XATTROBJS:%.o=$(SRC)/common/xattr/%.c) \ 1144 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \ 1145 $(DTRACEOBJS:%.o=$(SRC)/common/dtrace/%.c) \ 1146 $(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c) \ 1147 $(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c) \ 1148 $(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c) \ 1149 $(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c) \ 1150 $(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c) \ 1151 $(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c) \ 1152 $(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c) \ 1153 $(PORTSYS:%.o=$(LIBCDIR)/port/sys/%.c) \ 1154 $(AIOOBJS:%.o=$(LIBCDIR)/port/aio/%.c) \ 1155 $(RTOBJS:%.o=$(LIBCDIR)/port/rt/%.c) \ 1156 $(TPOOLOBJS:%.o=$(LIBCDIR)/port/tpool/%.c) \ 1157 $(THREADSOBJS:%.o=$(LIBCDIR)/port/threads/%.c) \ 1158 $(THREADSMACHOBJS:%.o=$(LIBCDIR)/$(MACH)/threads/%.c) \ 1159 $(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c) \ 1160 $(UNWINDMACHOBJS:%.o=$(LIBCDIR)/port/unwind/%.c) \ 1161 $(FPOBJS:%.o=$(LIBCDIR)/$(MACH)/fp/%.c) \ 1162 $(LIBCBASE)/crt/_ftou.c \ 1163 $(LIBCBASE)/gen/_xregs_clrptr.c \ 1164 $(LIBCBASE)/gen/byteorder.c \ 1165 $(LIBCBASE)/gen/ecvt.c \ 1166 $(LIBCBASE)/gen/getctxt.c \ 1167 $(LIBCBASE)/gen/lmul.c \ 1168 $(LIBCBASE)/gen/makectxt.c \ 1169 $(LIBCBASE)/gen/siginfolst.c \ 1170 $(LIBCBASE)/gen/siglongjmp.c \ 1171 $(LIBCBASE)/gen/swapctxt.c \ 1172 $(LIBCBASE)/sys/ptrace.c \ 1173 $(LIBCBASE)/sys/uadmin.c 1174 1175 # conditional assignments 1176 $(DYNLIB) := CRTI = crti.o 1177 $(DYNLIB) := CRTN = crtn.o 1178 1179 # Files which need the threads .il inline template 1180 TIL= \ 1181 aio.o \ 1182 alloc.o \ 1183 assfail.o \ 1184 atexit.o \ 1185 atfork.o \ 1186 cancel.o \ 1187 door_calls.o \ 1188 err.o \ 1189 errno.o \ 1190 getctxt.o \ 1191 lwp.o \ 1192 ma.o \ 1193 machdep.o \ 1194 posix_aio.o \ 1195 pthr_attr.o \ 1196 pthr_barrier.o \ 1197 pthr_cond.o \ 1198 pthr_mutex.o \ 1199 pthr_rwlock.o \ 1200 pthread.o \ 1201 rand.o \ 1202 rwlock.o \ 1203 scalls.o \ 1204 sched.o \ 1205 sema.o \ 1206 sigaction.o \ 1207 sigev_thread.o \ 1208 spawn.o \ 1209 stack.o \ 1210 swapctxt.o \ 1211 synch.o \ 1212 tdb_agent.o \ 1213 thr.o \ 1214 thread_interface.o \ 1215 thread_pool.o \ 1216 tls.o \ 1217 tsd.o \ 1218 unwind.o 1219 1220 $(TIL:%=pics/%) := CFLAGS += $(LIBCBASE)/threads/sparc.il 1221 1222 # special kludge for inlines with 'cas': 1223 pics/rwlock.o pics/synch.o pics/lwp.o pics/door_calls.o := \ 1224 sparc_CFLAGS += -_gcc=-Wa,-xarch=v8plus 1225 1226 # Files in port/fp subdirectory that need base.il inline template 1227 IL= \ 1228 __flt_decim.o \ 1229 decimal_bin.o 1230 1231 $(IL:%=pics/%) := CFLAGS += $(LIBCBASE)/fp/base.il 1232 1233 # Files in fp subdirectory which need __quad.il inline template 1234 QIL= \ 1235 _Q_add.o \ 1236 _Q_cmp.o \ 1237 _Q_cmpe.o \ 1238 _Q_div.o \ 1239 _Q_dtoq.o \ 1240 _Q_fcc.o \ 1241 _Q_mul.o \ 1242 _Q_qtod.o \ 1243 _Q_qtoi.o \ 1244 _Q_qtos.o \ 1245 _Q_qtou.o \ 1246 _Q_sqrt.o \ 1247 _Q_stoq.o \ 1248 _Q_sub.o 1249 1250 $(QIL:%=pics/%) := CFLAGS += $(LIBCDIR)/$(MACH)/fp/__quad.il 1251 pics/_Q%.o := sparc_COPTFLAG = -xO4 -dalign 1252 pics/__quad%.o := sparc_COPTFLAG = -xO4 -dalign 1253 1254 # large-file-aware components that should be built large 1255 1256 $(COMSYSOBJS64:%=pics/%) := \ 1257 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1258 1259 $(SYSOBJS64:%=pics/%) := \ 1260 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1261 1262 $(PORTGEN64:%=pics/%) := \ 1263 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1264 1265 $(PORTSTDIO64:%=pics/%) := \ 1266 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1267 1268 $(PORTSYS64:%=pics/%) := \ 1269 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1270 1271 $(PORTSTDIO_W:%=pics/%) := \ 1272 CPPFLAGS += -D_WIDE 1273 1274 $(PORTPRINT_W:%=pics/%) := \ 1275 CPPFLAGS += -D_WIDE 1276 1277 # printf/scanf functions to support c89-sized intmax_t variables 1278 $(PORTPRINT_C89:%=pics/%) := \ 1279 CPPFLAGS += -D_C89_INTMAX32 1280 1281 $(PORTSTDIO_C89:%=pics/%) := \ 1282 CPPFLAGS += -D_C89_INTMAX32 1283 1284 $(PORTI18N_COND:%=pics/%) := \ 1285 CPPFLAGS += -D_WCS_LONGLONG 1286 1287 # Files which need extra optimization 1288 pics/getenv.o := sparc_COPTFLAG = -xO4 1289 1290 .KEEP_STATE: 1291 1292 all: $(LIBS) $(LIB_PIC) 1293 1294 lint := CPPFLAGS += -I$(LIBCDIR)/$(MACH)/fp 1295 lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99 1296 lint := LINTFLAGS += -mn 1297 1298 lint: 1299 @echo $(LINT.c) ... $(LDLIBS) 1300 @$(LINT.c) $(SRCS) $(LDLIBS) 1301 1302 $(LINTLIB):= SRCS=$(LIBCDIR)/port/llib-lc 1303 $(LINTLIB):= CPPFLAGS += -D_MSE_INT_H 1304 $(LINTLIB):= LINTFLAGS=-nvx 1305 1306 # object files that depend on inline template 1307 $(TIL:%=pics/%): $(LIBCBASE)/threads/sparc.il 1308 $(IL:%=pics/%): $(LIBCBASE)/fp/base.il 1309 $(QIL:%=pics/%): $(LIBCDIR)/$(MACH)/fp/__quad.il 1310 1311 # include common libc targets 1312 include $(LIBCDIR)/Makefile.targ 1313 1314 # We need to strip out all CTF and DOF data from the static library 1315 $(LIB_PIC) := DIR = pics 1316 $(LIB_PIC): pics $$(PICS) 1317 $(BUILD.AR) 1318 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1319 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1320 $(AR) -ts $@ > /dev/null 1321 $(POST_PROCESS_A) 1322 1323 # special cases 1324 $(STRETS:%=pics/%): $(LIBCBASE)/crt/stret.s 1325 $(AS) $(ASFLAGS) -DSTRET$(@F:stret%.o=%) $(LIBCBASE)/crt/stret.s -o $@ 1326 $(POST_PROCESS_O) 1327 1328 $(LIBCBASE)/crt/_rtbootld.s: $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.c 1329 $(CC) $(CPPFLAGS) $(CTF_FLAGS) -O -S -K pic \ 1330 $(LIBCBASE)/crt/_rtld.c -o $(LIBCBASE)/crt/_rtld.s 1331 $(CAT) $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.s > $@ 1332 $(RM) $(LIBCBASE)/crt/_rtld.s 1333 1334 # partially built from C source 1335 pics/_rtbootld.o: $(LIBCBASE)/crt/_rtbootld.s 1336 $(AS) $(ASFLAGS) $(LIBCBASE)/crt/_rtbootld.s -o $@ 1337 $(CTFCONVERT_O) 1338 1339 ASSYMDEP_OBJS= \ 1340 _lwp_mutex_unlock.o \ 1341 _stack_grow.o \ 1342 asm_subr.o \ 1343 setjmp.o \ 1344 smt_pause.o \ 1345 tls_get_addr.o \ 1346 unwind_frame.o \ 1347 vforkx.o 1348 1349 $(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1350 1351 $(ASSYMDEP_OBJS:%=pics/%): assym.h 1352 1353 # assym.h build rules 1354 1355 assym.h := CFLAGS += -g 1356 1357 GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c 1358 1359 genassym: $(GENASSYM_C) 1360 $(NATIVECC) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \ 1361 $(CPPFLAGS.native) -o $@ $(GENASSYM_C) 1362 1363 OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1364 1365 assym.h: $(OFFSETS) genassym 1366 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1367 ./genassym >>$@ 1368 1369 # derived C source and related explicit dependencies 1370 $(LIBCDIR)/port/gen/errlst.c + \ 1371 $(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk 1372 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist 1373 1374 pics/errlst.o: $(LIBCDIR)/port/gen/errlst.c 1375 1376 pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c