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