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 2014 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 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 __quad.o \ 106 fpgetmask.o \ 107 fpgetrnd.o \ 108 fpgetsticky.o \ 109 fpsetmask.o \ 110 fpsetrnd.o \ 111 fpsetsticky.o 112 113ATOMICOBJS= \ 114 atomic.o 115 116CHACHAOBJS= \ 117 chacha.o 118 119XATTROBJS= \ 120 xattr_common.o 121 122COMOBJS= \ 123 bcmp.o \ 124 bcopy.o \ 125 bzero.o \ 126 bsearch.o \ 127 explicit_bzero.o \ 128 memccpy.o \ 129 memmem.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 execvex.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 upanic.o \ 323 utssys.o \ 324 uucopy.o \ 325 vhangup.o \ 326 waitid.o \ 327 write.o \ 328 writev.o \ 329 yield.o 330 331SYSOBJS= \ 332 __clock_gettime.o \ 333 __getcontext.o \ 334 _lwp_mutex_unlock.o \ 335 _stack_grow.o \ 336 __uadmin.o \ 337 door.o \ 338 forkx.o \ 339 forkallx.o \ 340 gettimeofday.o \ 341 ptrace.o \ 342 syscall.o \ 343 tls_get_addr.o \ 344 uadmin.o \ 345 umount.o \ 346 uname.o \ 347 vforkx.o 348 349# objects under $(LIBCDIR)/port which contain transitional large file interfaces 350PORTGEN64= \ 351 _xftw64.o \ 352 attropen64.o \ 353 fts64.o \ 354 ftw64.o \ 355 mkstemp64.o \ 356 nftw64.o \ 357 tell64.o \ 358 truncate64.o 359 360# objects from source under $(LIBCDIR)/port 361PORTFP= \ 362 __flt_decim.o \ 363 __flt_rounds.o \ 364 __tbl_10_b.o \ 365 __tbl_10_h.o \ 366 __tbl_10_s.o \ 367 __tbl_2_b.o \ 368 __tbl_2_h.o \ 369 __tbl_2_s.o \ 370 __tbl_fdq.o \ 371 __tbl_tens.o \ 372 __x_power.o \ 373 _base_sup.o \ 374 aconvert.o \ 375 decimal_bin.o \ 376 double_decim.o \ 377 econvert.o \ 378 fconvert.o \ 379 file_decim.o \ 380 finite.o \ 381 fp_data.o \ 382 func_decim.o \ 383 gconvert.o \ 384 hex_bin.o \ 385 ieee_globals.o \ 386 pack_float.o \ 387 sigfpe.o \ 388 string_decim.o \ 389 ashldi3.o \ 390 ashrdi3.o \ 391 cmpdi2.o \ 392 divdi3.o \ 393 floatdidf.o \ 394 floatdisf.o \ 395 floatundidf.o \ 396 floatundisf.o \ 397 lshrdi3.o \ 398 moddi3.o \ 399 muldi3.o \ 400 qdivrem.o \ 401 ucmpdi2.o \ 402 udivdi3.o \ 403 umoddi3.o 404 405PORTGEN= \ 406 _env_data.o \ 407 _ftoll.o \ 408 _ftoull.o \ 409 _xftw.o \ 410 a64l.o \ 411 abort.o \ 412 addsev.o \ 413 ascii_strncasecmp.o \ 414 assert.o \ 415 atexit.o \ 416 atfork.o \ 417 atof.o \ 418 atoi.o \ 419 atol.o \ 420 atoll.o \ 421 attrat.o \ 422 attropen.o \ 423 basename.o \ 424 calloc.o \ 425 catgets.o \ 426 catopen.o \ 427 cfgetispeed.o \ 428 cfgetospeed.o \ 429 cfree.o \ 430 cfsetispeed.o \ 431 cfsetospeed.o \ 432 cftime.o \ 433 clock.o \ 434 closedir.o \ 435 closefrom.o \ 436 confstr.o \ 437 crypt.o \ 438 csetlen.o \ 439 ctime.o \ 440 ctime_r.o \ 441 daemon.o \ 442 deflt.o \ 443 directio.o \ 444 dirname.o \ 445 div.o \ 446 drand48.o \ 447 dup.o \ 448 env_data.o \ 449 err.o \ 450 errno.o \ 451 euclen.o \ 452 event_port.o \ 453 execvp.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 memrchr.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 reallocf.o \ 583 recallocarray.o \ 584 realpath.o \ 585 reboot.o \ 586 regexpr.o \ 587 remove.o \ 588 rewinddir.o \ 589 rindex.o \ 590 scandir.o \ 591 seekdir.o \ 592 select.o \ 593 set_constraint_handler_s.o \ 594 setlabel.o \ 595 setpriority.o \ 596 settimeofday.o \ 597 sh_locks.o \ 598 sigflag.o \ 599 siglist.o \ 600 sigsend.o \ 601 sigsetops.o \ 602 ssignal.o \ 603 ssp.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 execve.o \ 977 fcntl.o \ 978 fexecve.o \ 979 getpagesizes.o \ 980 getpeerucred.o \ 981 inst_sync.o \ 982 issetugid.o \ 983 label.o \ 984 link.o \ 985 lockf.o \ 986 lwp.o \ 987 lwp_cond.o \ 988 lwp_rwlock.o \ 989 lwp_sigmask.o \ 990 meminfosys.o \ 991 mkdir.o \ 992 mknod.o \ 993 msgsys.o \ 994 nfssys.o \ 995 open.o \ 996 pgrpsys.o \ 997 posix_sigwait.o \ 998 ppriv.o \ 999 psetsys.o \ 1000 rctlsys.o \ 1001 readlink.o \ 1002 rename.o \ 1003 sbrk.o \ 1004 semsys.o \ 1005 set_errno.o \ 1006 sharefs.o \ 1007 shmsys.o \ 1008 sidsys.o \ 1009 siginterrupt.o \ 1010 signal.o \ 1011 signalfd.o \ 1012 sigpending.o \ 1013 sigstack.o \ 1014 stat.o \ 1015 symlink.o \ 1016 tasksys.o \ 1017 time.o \ 1018 time_util.o \ 1019 timerfd.o \ 1020 ucontext.o \ 1021 unlink.o \ 1022 ustat.o \ 1023 utimesys.o \ 1024 zone.o 1025 1026PORTREGEX= \ 1027 glob.o \ 1028 regcmp.o \ 1029 regcomp.o \ 1030 regerror.o \ 1031 regex.o \ 1032 regexec.o \ 1033 regfree.o \ 1034 wordexp.o 1035 1036PORTREGEX64= \ 1037 glob64.o 1038 1039VALUES= values-Xa.o 1040 1041MOSTOBJS= \ 1042 $(STRETS) \ 1043 $(CRTOBJS) \ 1044 $(DYNOBJS) \ 1045 $(FPOBJS) \ 1046 $(FPASMOBJS) \ 1047 $(ATOMICOBJS) \ 1048 $(CHACHAOBJS) \ 1049 $(XATTROBJS) \ 1050 $(COMOBJS) \ 1051 $(DTRACEOBJS) \ 1052 $(GENOBJS) \ 1053 $(PRFOBJS) \ 1054 $(PORTFP) \ 1055 $(PORTGEN) \ 1056 $(PORTGEN64) \ 1057 $(PORTI18N) \ 1058 $(PORTI18N_COND) \ 1059 $(PORTINET) \ 1060 $(PORTLOCALE) \ 1061 $(PORTPRINT) \ 1062 $(PORTPRINT_C89) \ 1063 $(PORTPRINT_W) \ 1064 $(PORTREGEX) \ 1065 $(PORTREGEX64) \ 1066 $(PORTSTDIO) \ 1067 $(PORTSTDIO64) \ 1068 $(PORTSTDIO_C89) \ 1069 $(PORTSTDIO_W) \ 1070 $(PORTSYS) \ 1071 $(PORTSYS64) \ 1072 $(AIOOBJS) \ 1073 $(RTOBJS) \ 1074 $(SECFLAGSOBJS) \ 1075 $(TPOOLOBJS) \ 1076 $(THREADSOBJS) \ 1077 $(THREADSMACHOBJS) \ 1078 $(THREADSASMOBJS) \ 1079 $(UNICODEOBJS) \ 1080 $(UNWINDMACHOBJS) \ 1081 $(UNWINDASMOBJS) \ 1082 $(COMSYSOBJS) \ 1083 $(SYSOBJS) \ 1084 $(COMSYSOBJS64) \ 1085 $(SYSOBJS64) \ 1086 $(VALUES) 1087 1088TRACEOBJS= \ 1089 plockstat.o 1090 1091# NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 1092# modules whose source is provided in the $(SRC)/lib/crt directory. 1093# This must be done because otherwise the Sun C compiler would insert 1094# its own versions of these modules and those versions contain code 1095# to call out to C++ initialization functions. Such C++ initialization 1096# functions can call back into libc before thread initialization is 1097# complete and this leads to segmentation violations and other problems. 1098# Since libc contains no C++ code, linking with the minimal crti.o and 1099# crtn.o modules is safe and avoids the problems described above. 1100OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 1101CRTSRCS= ../../crt/sparc 1102 1103# include common library definitions 1104include $(SRC)/lib/Makefile.lib 1105 1106# we need to override the default SONAME here because we might 1107# be building a variant object (still libc.so.1, but different filename) 1108SONAME = libc.so.1 1109 1110CFLAGS += $(CCVERBOSE) 1111 1112CERRWARN += -_gcc=-Wno-parentheses 1113CERRWARN += -_gcc=-Wno-switch 1114CERRWARN += $(CNOWARN_UNINIT) 1115CERRWARN += -_gcc=-Wno-unused-value 1116CERRWARN += -_gcc=-Wno-unused-label 1117CERRWARN += -_gcc=-Wno-unused-variable 1118CERRWARN += -_gcc=-Wno-type-limits 1119CERRWARN += -_gcc=-Wno-char-subscripts 1120CERRWARN += -_gcc=-Wno-clobbered 1121CERRWARN += -_gcc=-Wno-unused-function 1122CERRWARN += -_gcc=-Wno-address 1123 1124# Setting THREAD_DEBUG = -DDEBUG (make THREAD_DEBUG=-DDEBUG ...) 1125# enables ASSERT() checking in the library. 1126# This is automatically enabled for DEBUG builds, not for non-debug builds. 1127THREAD_DEBUG = 1128$(NOT_RELEASE_BUILD)THREAD_DEBUG = -DDEBUG 1129 1130ALTPICS= $(TRACEOBJS:%=pics/%) 1131 1132$(DYNLIB) := BUILD.SO = $(LD) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS) 1133 1134MAPFILES = $(LIBCDIR)/port/mapfile-vers 1135 1136CFLAGS += $(EXTN_CFLAGS) 1137CPPFLAGS= -D_REENTRANT -Dsparc $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \ 1138 -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master) 1139ASFLAGS= $(EXTN_ASFLAGS) $(AS_WITH_CPP) -D__STDC__ \ 1140 -D_ASM $(CPPFLAGS) $(sparc_XARCH) 1141 1142# As a favor to the dtrace syscall provider, libc still calls the 1143# old syscall traps that have been obsoleted by the *at() interfaces. 1144# Delete this to compile libc using only the new *at() system call traps 1145CPPFLAGS += -D_RETAIN_OLD_SYSCALLS 1146 1147# Inform the run-time linker about libc specialized initialization 1148RTLDINFO = -z rtldinfo=tls_rtldinfo 1149DYNFLAGS += $(RTLDINFO) 1150 1151# Force libc's internal references to be resolved immediately upon loading 1152# in order to avoid critical region problems. Since almost all libc symbols 1153# are marked 'protected' in the mapfiles, this is a minimal set (15 to 20). 1154DYNFLAGS += -znow 1155 1156DYNFLAGS += -e __rtboot 1157DYNFLAGS += $(EXTN_DYNFLAGS) 1158 1159# Inform the kernel about the initial DTrace area (in case 1160# libc is being used as the interpreter / runtime linker). 1161DTRACE_DATA = -zdtrace=dtrace_data 1162DYNFLAGS += $(DTRACE_DATA) 1163 1164# DTrace needs an executable data segment. 1165MAPFILE.NED= 1166 1167BUILD.s= $(AS) $(ASFLAGS) $< -c -o $@ 1168 1169# Override this top level flag so the compiler builds in its native 1170# C99 mode. This has been enabled to support the complex arithmetic 1171# added to libc. 1172CSTD= $(CSTD_GNU99) 1173 1174# libc method of building an archive 1175# The "$(GREP) -v ' L '" part is necessary only until 1176# lorder is fixed to ignore thread-local variables. 1177BUILD.AR= $(RM) $@ ; \ 1178 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)` 1179 1180# extra files for the clean target 1181CLEANFILES= \ 1182 $(LIBCDIR)/port/gen/errlst.c \ 1183 $(LIBCDIR)/port/gen/new_list.c \ 1184 assym.h \ 1185 genassym \ 1186 $(LIBCBASE)/crt/_rtld.s \ 1187 $(LIBCBASE)/crt/_rtbootld.s \ 1188 pics/_rtbootld.o \ 1189 pics/crti.o \ 1190 pics/crtn.o \ 1191 $(ALTPICS) 1192 1193CLOBBERFILES += $(LIB_PIC) 1194 1195# conditional assignments 1196$(DYNLIB) := CRTI = crti.o 1197$(DYNLIB) := CRTN = crtn.o 1198 1199# special kludge for inlines with 'cas': 1200pics/rwlock.o pics/synch.o pics/lwp.o pics/door_calls.o := \ 1201 sparc_CFLAGS += -_gcc=-Wa,-xarch=v8plus 1202 1203pics/_Q%.o := sparc_COPTFLAG = -xO4 1204pics/__quad%.o := sparc_COPTFLAG = -xO4 1205 1206# large-file-aware components that should be built large 1207 1208$(COMSYSOBJS64:%=pics/%) := \ 1209 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1210 1211$(SYSOBJS64:%=pics/%) := \ 1212 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1213 1214$(PORTGEN64:%=pics/%) := \ 1215 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1216 1217$(PORTREGEX64:%=pics/%) := \ 1218 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1219 1220$(PORTSTDIO64:%=pics/%) := \ 1221 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1222 1223$(PORTSYS64:%=pics/%) := \ 1224 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1225 1226$(PORTSTDIO_W:%=pics/%) := \ 1227 CPPFLAGS += -D_WIDE 1228 1229$(PORTPRINT_W:%=pics/%) := \ 1230 CPPFLAGS += -D_WIDE 1231 1232# printf/scanf functions to support c89-sized intmax_t variables 1233$(PORTPRINT_C89:%=pics/%) := \ 1234 CPPFLAGS += -D_C89_INTMAX32 1235 1236$(PORTSTDIO_C89:%=pics/%) := \ 1237 CPPFLAGS += -D_C89_INTMAX32 1238 1239$(PORTI18N_COND:%=pics/%) := \ 1240 CPPFLAGS += -D_WCS_LONGLONG 1241 1242pics/arc4random.o := CPPFLAGS += -I$(SRC)/common/crypto/chacha 1243 1244# Files which need extra optimization 1245pics/getenv.o := sparc_COPTFLAG = -xO4 1246 1247# 1248# Disable the stack protector due to issues with bootstrapping rtld. See 1249# cmd/sgs/rtld/Makefile.com for more information. 1250# 1251STACKPROTECT = none 1252 1253.KEEP_STATE: 1254 1255all: $(LIBS) $(LIB_PIC) 1256 1257# include common libc targets 1258include $(LIBCDIR)/Makefile.targ 1259 1260# We need to strip out all CTF and DOF data from the static library 1261$(LIB_PIC) := DIR = pics 1262$(LIB_PIC): pics $$(PICS) 1263 $(BUILD.AR) 1264 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1265 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1266 $(AR) -ts $@ > /dev/null 1267 $(POST_PROCESS_A) 1268 1269# special cases 1270$(STRETS:%=pics/%): $(LIBCBASE)/crt/stret.s 1271 $(AS) $(ASFLAGS) -DSTRET$(@F:stret%.o=%) $(LIBCBASE)/crt/stret.s -o $@ 1272 $(POST_PROCESS_S_O) 1273 1274$(LIBCBASE)/crt/_rtbootld.S: $(LIBCBASE)/crt/_rtboot.S $(LIBCBASE)/crt/_rtld.c 1275 $(CC) $(CPPFLAGS) $(CTF_FLAGS) -O -S $(C_PICFLAGS) \ 1276 $(LIBCBASE)/crt/_rtld.c -o $(LIBCBASE)/crt/_rtld.s 1277 $(CAT) $(LIBCBASE)/crt/_rtboot.S $(LIBCBASE)/crt/_rtld.s > $@ 1278 $(RM) $(LIBCBASE)/crt/_rtld.s 1279 1280# partially built from C source 1281pics/_rtbootld.o: $(LIBCBASE)/crt/_rtbootld.S 1282 $(AS) $(ASFLAGS) $(LIBCBASE)/crt/_rtbootld.S -o $@ 1283 $(CTFCONVERT_O) 1284 1285ASSYMDEP_OBJS= \ 1286 _lwp_mutex_unlock.o \ 1287 _stack_grow.o \ 1288 asm_subr.o \ 1289 setjmp.o \ 1290 smt_pause.o \ 1291 tls_get_addr.o \ 1292 unwind_frame.o \ 1293 vforkx.o 1294 1295$(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1296 1297$(ASSYMDEP_OBJS:%=pics/%): assym.h 1298 1299# assym.h build rules 1300 1301assym.h := CFLAGS += $(CCGDEBUG) 1302 1303GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c 1304LDFLAGS.native = $(LDASSERTS) $(BDIRECT) 1305 1306genassym := NATIVE_LIBS += libc.so 1307 1308genassym: $(GENASSYM_C) 1309 $(NATIVECC) $(NATIVE_CFLAGS) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \ 1310 $(CPPFLAGS.native) $(LDFLAGS.native) -o $@ $(GENASSYM_C) 1311 1312OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1313 1314assym.h: $(OFFSETS) genassym 1315 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1316 ./genassym >>$@ 1317 1318# derived C source and related explicit dependencies 1319$(LIBCDIR)/port/gen/errlst.c + \ 1320$(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk 1321 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist 1322 1323pics/errlst.o: $(LIBCDIR)/port/gen/errlst.c 1324 1325pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c 1326