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