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