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