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