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