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