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 32 LIBCDIR= $(SRC)/lib/libc 33 LIB_PIC= libc_pic.a 34 VERS= .1 35 CPP= /usr/lib/cpp 36 TARGET_ARCH= sparc 37 38 # objects are grouped by source directory 39 40 # Symbol capabilities objects. 41 EXTPICS= \ 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 50 STRETS= \ 51 stret1.o \ 52 stret2.o \ 53 stret4.o 54 55 CRTOBJS= \ 56 _ftou.o \ 57 cerror.o \ 58 cerror64.o \ 59 hwmuldiv.o 60 61 DYNOBJS= \ 62 _rtbootld.o 63 64 FPOBJS= \ 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 104 FPASMOBJS= \ 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 116 ATOMICOBJS= \ 117 atomic.o 118 119 CHACHAOBJS= \ 120 chacha.o 121 122 XATTROBJS= \ 123 xattr_common.o 124 125 COMOBJS= \ 126 bcmp.o \ 127 bcopy.o \ 128 bzero.o \ 129 bsearch.o \ 130 memccpy.o \ 131 qsort.o \ 132 strtol.o \ 133 strtoul.o \ 134 strtoll.o \ 135 strtoull.o 136 137 DTRACEOBJS= \ 138 dtrace_data.o 139 140 SECFLAGSOBJS= \ 141 secflags.o 142 143 GENOBJS= \ 144 _getsp.o \ 145 _xregs_clrptr.o \ 146 abs.o \ 147 alloca.o \ 148 arc4random.o \ 149 arc4random_uniform.o \ 150 ascii_strcasecmp.o \ 151 byteorder.o \ 152 cuexit.o \ 153 ecvt.o \ 154 endian.o \ 155 errlst.o \ 156 getctxt.o \ 157 ladd.o \ 158 lmul.o \ 159 lock.o \ 160 lshiftl.o \ 161 lsign.o \ 162 lsub.o \ 163 makectxt.o \ 164 memchr.o \ 165 memcmp.o \ 166 new_list.o \ 167 setjmp.o \ 168 siginfolst.o \ 169 siglongjmp.o \ 170 smt_pause.o \ 171 sparc_data.o \ 172 strchr.o \ 173 strcmp.o \ 174 strlcpy.o \ 175 strncmp.o \ 176 strncpy.o \ 177 strnlen.o \ 178 swapctxt.o \ 179 sync_instruction_memory.o 180 181 # sysobjs that contain large-file interfaces 182 COMSYSOBJS64= \ 183 fstatvfs64.o \ 184 getdents64.o \ 185 getrlimit64.o \ 186 lseek64.o \ 187 mmap64.o \ 188 pread64.o \ 189 preadv64.o \ 190 pwrite64.o \ 191 pwritev64.o \ 192 setrlimit64.o \ 193 statvfs64.o 194 195 SYSOBJS64= 196 197 COMSYSOBJS= \ 198 __clock_timer.o \ 199 __getloadavg.o \ 200 __rusagesys.o \ 201 __signotify.o \ 202 __sigrt.o \ 203 __time.o \ 204 _lgrp_home_fast.o \ 205 _lgrpsys.o \ 206 _nfssys.o \ 207 _portfs.o \ 208 _pset.o \ 209 _rpcsys.o \ 210 _sigaction.o \ 211 _so_accept.o \ 212 _so_bind.o \ 213 _so_connect.o \ 214 _so_getpeername.o \ 215 _so_getsockname.o \ 216 _so_getsockopt.o \ 217 _so_listen.o \ 218 _so_recv.o \ 219 _so_recvfrom.o \ 220 _so_recvmsg.o \ 221 _so_send.o \ 222 _so_sendmsg.o \ 223 _so_sendto.o \ 224 _so_setsockopt.o \ 225 _so_shutdown.o \ 226 _so_socket.o \ 227 _so_socketpair.o \ 228 _sockconfig.o \ 229 acct.o \ 230 acl.o \ 231 adjtime.o \ 232 alarm.o \ 233 brk.o \ 234 chdir.o \ 235 chroot.o \ 236 cladm.o \ 237 close.o \ 238 execve.o \ 239 exit.o \ 240 facl.o \ 241 fchdir.o \ 242 fchroot.o \ 243 fdsync.o \ 244 fpathconf.o \ 245 fstatfs.o \ 246 fstatvfs.o \ 247 getcpuid.o \ 248 getdents.o \ 249 getegid.o \ 250 geteuid.o \ 251 getgid.o \ 252 getgroups.o \ 253 gethrtime.o \ 254 getitimer.o \ 255 getmsg.o \ 256 getpid.o \ 257 getpmsg.o \ 258 getppid.o \ 259 getrandom.o \ 260 getrlimit.o \ 261 getuid.o \ 262 gtty.o \ 263 install_utrap.o \ 264 ioctl.o \ 265 kaio.o \ 266 kill.o \ 267 llseek.o \ 268 lseek.o \ 269 memcntl.o \ 270 mincore.o \ 271 mmap.o \ 272 mmapobjsys.o \ 273 modctl.o \ 274 mount.o \ 275 mprotect.o \ 276 munmap.o \ 277 nice.o \ 278 ntp_adjtime.o \ 279 ntp_gettime.o \ 280 p_online.o \ 281 pathconf.o \ 282 pause.o \ 283 pcsample.o \ 284 pipe2.o \ 285 pollsys.o \ 286 pread.o \ 287 preadv.o \ 288 priocntlset.o \ 289 processor_bind.o \ 290 processor_info.o \ 291 profil.o \ 292 psecflagsset.o \ 293 putmsg.o \ 294 putpmsg.o \ 295 pwrite.o \ 296 pwritev.o \ 297 read.o \ 298 readv.o \ 299 resolvepath.o \ 300 seteguid.o \ 301 setgid.o \ 302 setgroups.o \ 303 setitimer.o \ 304 setreid.o \ 305 setrlimit.o \ 306 setuid.o \ 307 sigaltstk.o \ 308 sigprocmsk.o \ 309 sigsendset.o \ 310 sigsuspend.o \ 311 statfs.o \ 312 statvfs.o \ 313 stty.o \ 314 sync.o \ 315 sysconfig.o \ 316 sysfs.o \ 317 sysinfo.o \ 318 syslwp.o \ 319 times.o \ 320 ulimit.o \ 321 umask.o \ 322 umount2.o \ 323 utssys.o \ 324 uucopy.o \ 325 vhangup.o \ 326 waitid.o \ 327 write.o \ 328 writev.o \ 329 yield.o 330 331 SYSOBJS= \ 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 350 PORTGEN64= \ 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 361 PORTFP= \ 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 405 PORTGEN= \ 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 cfmakeraw.o \ 428 cfree.o \ 429 cfsetspeed.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 freezero.o \ 461 ftime.o \ 462 ftok.o \ 463 fts.o \ 464 ftw.o \ 465 gcvt.o \ 466 get_nprocs.o \ 467 getauxv.o \ 468 getcwd.o \ 469 getdate_err.o \ 470 getdtblsize.o \ 471 getentropy.o \ 472 getenv.o \ 473 getexecname.o \ 474 getgrnam.o \ 475 getgrnam_r.o \ 476 gethostid.o \ 477 gethostname.o \ 478 gethz.o \ 479 getisax.o \ 480 getloadavg.o \ 481 getlogin.o \ 482 getmntent.o \ 483 getnetgrent.o \ 484 getopt.o \ 485 getopt_long.o \ 486 getpagesize.o \ 487 getpw.o \ 488 getpwnam.o \ 489 getpwnam_r.o \ 490 getrusage.o \ 491 getspent.o \ 492 getspent_r.o \ 493 getsubopt.o \ 494 gettxt.o \ 495 getusershell.o \ 496 getut.o \ 497 getutx.o \ 498 getvfsent.o \ 499 getwd.o \ 500 getwidth.o \ 501 getxby_door.o \ 502 gtxt.o \ 503 hsearch.o \ 504 iconv.o \ 505 imaxabs.o \ 506 imaxdiv.o \ 507 index.o \ 508 initgroups.o \ 509 insque.o \ 510 isaexec.o \ 511 isastream.o \ 512 isatty.o \ 513 killpg.o \ 514 klpdlib.o \ 515 l64a.o \ 516 lckpwdf.o \ 517 lconstants.o \ 518 ldivide.o \ 519 lexp10.o \ 520 lfind.o \ 521 lfmt.o \ 522 lfmt_log.o \ 523 llabs.o \ 524 lldiv.o \ 525 llog10.o \ 526 lltostr.o \ 527 localtime.o \ 528 lsearch.o \ 529 madvise.o \ 530 malloc.o \ 531 memalign.o \ 532 memmem.o \ 533 memset_s.o \ 534 mkdev.o \ 535 mkdtemp.o \ 536 mkfifo.o \ 537 mkstemp.o \ 538 mktemp.o \ 539 mlock.o \ 540 mlockall.o \ 541 mon.o \ 542 msync.o \ 543 munlock.o \ 544 munlockall.o \ 545 ndbm.o \ 546 nftw.o \ 547 nlspath_checks.o \ 548 nsparse.o \ 549 nss_common.o \ 550 nss_dbdefs.o \ 551 nss_deffinder.o \ 552 opendir.o \ 553 opt_data.o \ 554 perror.o \ 555 pfmt.o \ 556 pfmt_data.o \ 557 pfmt_print.o \ 558 pipe.o \ 559 plock.o \ 560 poll.o \ 561 posix_fadvise.o \ 562 posix_fallocate.o \ 563 posix_madvise.o \ 564 posix_memalign.o \ 565 priocntl.o \ 566 priv_str_xlate.o \ 567 privlib.o \ 568 psecflags.o \ 569 psiginfo.o \ 570 psignal.o \ 571 pt.o \ 572 putpwent.o \ 573 putspent.o \ 574 raise.o \ 575 rand.o \ 576 random.o \ 577 rctlops.o \ 578 readdir.o \ 579 readdir_r.o \ 580 reallocarray.o \ 581 reallocf.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 664 PORTINET= \ 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 672 PORTPRINT_W= \ 673 doprnt_w.o 674 675 PORTPRINT= \ 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) 690 PORTPRINT_C89= \ 691 vfprintf_c89.o \ 692 vprintf_c89.o \ 693 vsnprintf_c89.o \ 694 vsprintf_c89.o \ 695 vwprintf_c89.o 696 697 PORTSTDIO_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. 703 PORTSTDIO64= \ 704 fopen64.o \ 705 fpos64.o 706 707 PORTSTDIO_W= \ 708 doscan_w.o 709 710 PORTSTDIO= \ 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 767 PORTI18N= \ 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 813 PORTI18N_COND= \ 814 wcstol_longlong.o \ 815 wcstoul_longlong.o 816 817 PORTLOCALE= \ 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 889 AIOOBJS= \ 890 aio.o \ 891 aio_alloc.o \ 892 posix_aio.o 893 894 RTOBJS= \ 895 clock_timer.o \ 896 mqueue.o \ 897 pos4obj.o \ 898 sched.o \ 899 sem.o \ 900 shm.o \ 901 sigev_thread.o 902 903 TPOOLOBJS= \ 904 thread_pool.o 905 906 THREADSOBJS= \ 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 931 THREADSMACHOBJS= \ 932 machdep.o 933 934 THREADSASMOBJS= \ 935 asm_subr.o 936 937 UNICODEOBJS= \ 938 u8_textprep.o \ 939 uconv.o 940 941 UNWINDMACHOBJS= \ 942 unwind.o 943 944 UNWINDASMOBJS= \ 945 unwind_frame.o 946 947 # objects that implement the transitional large file API 948 PORTSYS64= \ 949 lockf64.o \ 950 stat64.o 951 952 PORTSYS= \ 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 1014 PORTREGEX= \ 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 1024 PORTREGEX64= \ 1025 glob64.o 1026 1027 VALUES= values-Xa.o 1028 1029 MOSTOBJS= \ 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 1076 TRACEOBJS= \ 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. 1088 OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 1089 CRTSRCS= ../../crt/sparc 1090 1091 # include common library definitions 1092 include $(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) 1096 SONAME = libc.so.1 1097 1098 CFLAGS += $(CCVERBOSE) 1099 1100 # This is necessary to avoid problems with calling _ex_unwind(). 1101 # We probably don't want any inlining anyway. 1102 CFLAGS += -xinline= 1103 1104 CERRWARN += -_gcc=-Wno-parentheses 1105 CERRWARN += -_gcc=-Wno-switch 1106 CERRWARN += $(CNOWARN_UNINIT) 1107 CERRWARN += -_gcc=-Wno-unused-value 1108 CERRWARN += -_gcc=-Wno-unused-label 1109 CERRWARN += -_gcc=-Wno-unused-variable 1110 CERRWARN += -_gcc=-Wno-type-limits 1111 CERRWARN += -_gcc=-Wno-char-subscripts 1112 CERRWARN += -_gcc=-Wno-clobbered 1113 CERRWARN += -_gcc=-Wno-unused-function 1114 CERRWARN += -_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. 1119 THREAD_DEBUG = 1120 $(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 1121 1122 # Make string literals read-only to save memory. 1123 CFLAGS += $(XSTRCONST) 1124 1125 ALTPICS= $(TRACEOBJS:%=pics/%) 1126 1127 $(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS) 1128 1129 MAPFILES = $(LIBCDIR)/port/mapfile-vers 1130 1131 CFLAGS += $(EXTN_CFLAGS) 1132 CPPFLAGS= -D_REENTRANT -Dsparc $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \ 1133 -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master) 1134 ASFLAGS= $(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 1139 CPPFLAGS += -D_RETAIN_OLD_SYSCALLS 1140 1141 # Inform the run-time linker about libc specialized initialization 1142 RTLDINFO = -z rtldinfo=tls_rtldinfo 1143 DYNFLAGS += $(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). 1148 DYNFLAGS += -znow 1149 1150 DYNFLAGS += -e __rtboot 1151 DYNFLAGS += $(EXTN_DYNFLAGS) 1152 1153 # Inform the kernel about the initial DTrace area (in case 1154 # libc is being used as the interpreter / runtime linker). 1155 DTRACE_DATA = -zdtrace=dtrace_data 1156 DYNFLAGS += $(DTRACE_DATA) 1157 1158 # DTrace needs an executable data segment. 1159 MAPFILE.NED= 1160 1161 BUILD.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. 1166 CSTD= $(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. 1171 BUILD.AR= $(RM) $@ ; \ 1172 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)` 1173 1174 # extra files for the clean target 1175 CLEANFILES= \ 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 1187 CLOBBERFILES += $(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 1194 TIL= \ 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': 1237 pics/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 1241 IL= \ 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 1248 QIL= \ 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 1265 pics/_Q%.o := sparc_COPTFLAG = -xO4 -dalign 1266 pics/__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 1304 pics/arc4random.o := CPPFLAGS += -I$(SRC)/common/crypto/chacha 1305 1306 # Files which need extra optimization 1307 pics/getenv.o := sparc_COPTFLAG = -xO4 1308 1309 .KEEP_STATE: 1310 1311 all: $(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 1319 include $(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_S_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 1342 pics/_rtbootld.o: $(LIBCBASE)/crt/_rtbootld.s 1343 $(AS) $(ASFLAGS) $(LIBCBASE)/crt/_rtbootld.s -o $@ 1344 $(CTFCONVERT_O) 1345 1346 ASSYMDEP_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 1362 assym.h := CFLAGS += $(CCGDEBUG) 1363 1364 GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c 1365 1366 genassym: $(GENASSYM_C) 1367 $(NATIVECC) $(NATIVE_CFLAGS) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \ 1368 $(CPPFLAGS.native) -o $@ $(GENASSYM_C) 1369 1370 OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1371 1372 assym.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 1381 pics/errlst.o: $(LIBCDIR)/port/gen/errlst.c 1382 1383 pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c