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 36TARGET_ARCH= sparc 37 38# objects are grouped by source directory 39 40# Symbol capabilities objects. 41EXTPICS= \ 42 $(LIBCDIR)/capabilities/sun4u/sparcv9/pics/symcap.o \ 43 $(LIBCDIR)/capabilities/sun4u-opl/sparcv9/pics/symcap.o \ 44 $(LIBCDIR)/capabilities/sun4u-us3-hwcap1/sparcv9/pics/symcap.o \ 45 $(LIBCDIR)/capabilities/sun4u-us3-hwcap2/sparcv9/pics/symcap.o \ 46 $(LIBCDIR)/capabilities/sun4v-hwcap1/sparcv9/pics/symcap.o \ 47 $(LIBCDIR)/capabilities/sun4v-hwcap2/sparcv9/pics/symcap.o 48 49# local objects 50STRETS= 51 52CRTOBJS= \ 53 __align_cpy_2.o \ 54 __align_cpy_4.o \ 55 __align_cpy_8.o \ 56 _ftou.o \ 57 cerror.o 58 59DYNOBJS= 60 61FPOBJS= \ 62 _D_cplx_div.o \ 63 _D_cplx_div_ix.o \ 64 _D_cplx_div_rx.o \ 65 _D_cplx_mul.o \ 66 _F_cplx_div.o \ 67 _F_cplx_div_ix.o \ 68 _F_cplx_div_rx.o \ 69 _F_cplx_mul.o \ 70 _Q_add.o \ 71 _Q_cmp.o \ 72 _Q_cmpe.o \ 73 _Q_cplx_div.o \ 74 _Q_cplx_div_ix.o \ 75 _Q_cplx_div_rx.o \ 76 _Q_cplx_lr_div.o \ 77 _Q_cplx_lr_div_ix.o \ 78 _Q_cplx_lr_div_rx.o \ 79 _Q_cplx_lr_mul.o \ 80 _Q_cplx_mul.o \ 81 _Q_div.o \ 82 _Q_dtoq.o \ 83 _Q_fcc.o \ 84 _Q_itoq.o \ 85 _Q_mul.o \ 86 _Q_neg.o \ 87 _Q_qtod.o \ 88 _Q_qtoi.o \ 89 _Q_qtos.o \ 90 _Q_qtou.o \ 91 _Q_scl.o \ 92 _Q_sqrt.o \ 93 _Q_stoq.o \ 94 _Q_sub.o \ 95 _Q_utoq.o 96 97FPOBJS64= \ 98 _Qp_qtox.o \ 99 _Qp_qtoux.o \ 100 _Qp_xtoq.o \ 101 _Qp_uxtoq.o \ 102 __dtoul.o \ 103 __ftoul.o 104 105FPASMOBJS= \ 106 _Q_get_rp_rd.o \ 107 __quad.o \ 108 __quad_mag64.o \ 109 fpgetmask.o \ 110 fpgetrnd.o \ 111 fpgetsticky.o \ 112 fpsetmask.o \ 113 fpsetrnd.o \ 114 fpsetsticky.o 115 116ATOMICOBJS= \ 117 atomic.o 118 119CHACHAOBJS= \ 120 chacha.o 121 122XATTROBJS= \ 123 xattr_common.o 124 125COMOBJS= \ 126 bcmp.o \ 127 bcopy.o \ 128 bsearch.o \ 129 bzero.o \ 130 explicit_bzero.o \ 131 memccpy.o \ 132 memmem.o \ 133 qsort.o \ 134 strtol.o \ 135 strtoul.o \ 136 strtoll.o \ 137 strtoull.o \ 138 multi3.o 139 140GENOBJS= \ 141 _getsp.o \ 142 _xregs_clrptr.o \ 143 abs.o \ 144 alloca.o \ 145 arc4random.o \ 146 arc4random_uniform.o \ 147 ascii_strcasecmp.o \ 148 byteorder.o \ 149 cuexit.o \ 150 ecvt.o \ 151 endian.o \ 152 getctxt.o \ 153 lock.o \ 154 makectxt.o \ 155 memchr.o \ 156 memcmp.o \ 157 new_list.o \ 158 setjmp.o \ 159 siginfolst.o \ 160 siglongjmp.o \ 161 smt_pause.o \ 162 sparc_data.o \ 163 strchr.o \ 164 strcmp.o \ 165 strlcpy.o \ 166 strncmp.o \ 167 strncpy.o \ 168 strnlen.o \ 169 swapctxt.o \ 170 sync_instruction_memory.o 171 172# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 173# This macro should ALWAYS be empty; native APIs are already 'large file'. 174COMSYSOBJS64= 175 176SYSOBJS64= 177 178COMSYSOBJS= \ 179 __clock_timer.o \ 180 __getloadavg.o \ 181 __rusagesys.o \ 182 __signotify.o \ 183 __sigrt.o \ 184 __time.o \ 185 _lgrp_home_fast.o \ 186 _lgrpsys.o \ 187 _nfssys.o \ 188 _portfs.o \ 189 _pset.o \ 190 _rpcsys.o \ 191 _sigaction.o \ 192 _so_accept.o \ 193 _so_bind.o \ 194 _so_connect.o \ 195 _so_getpeername.o \ 196 _so_getsockname.o \ 197 _so_getsockopt.o \ 198 _so_listen.o \ 199 _so_recv.o \ 200 _so_recvfrom.o \ 201 _so_recvmsg.o \ 202 _so_send.o \ 203 _so_sendmsg.o \ 204 _so_sendto.o \ 205 _so_setsockopt.o \ 206 _so_shutdown.o \ 207 _so_socket.o \ 208 _so_socketpair.o \ 209 _sockconfig.o \ 210 acct.o \ 211 acl.o \ 212 adjtime.o \ 213 alarm.o \ 214 brk.o \ 215 chdir.o \ 216 chroot.o \ 217 cladm.o \ 218 close.o \ 219 execve.o \ 220 exit.o \ 221 facl.o \ 222 fchdir.o \ 223 fchroot.o \ 224 fdsync.o \ 225 fpathconf.o \ 226 fstatfs.o \ 227 fstatvfs.o \ 228 getcpuid.o \ 229 getdents.o \ 230 getegid.o \ 231 geteuid.o \ 232 getgid.o \ 233 getgroups.o \ 234 gethrtime.o \ 235 getitimer.o \ 236 getmsg.o \ 237 getpid.o \ 238 getpmsg.o \ 239 getppid.o \ 240 getrandom.o \ 241 getrlimit.o \ 242 getuid.o \ 243 gtty.o \ 244 install_utrap.o \ 245 ioctl.o \ 246 kaio.o \ 247 kill.o \ 248 llseek.o \ 249 lseek.o \ 250 memcntl.o \ 251 mincore.o \ 252 mmap.o \ 253 mmapobjsys.o \ 254 modctl.o \ 255 mount.o \ 256 mprotect.o \ 257 munmap.o \ 258 nice.o \ 259 ntp_adjtime.o \ 260 ntp_gettime.o \ 261 p_online.o \ 262 pathconf.o \ 263 pause.o \ 264 pcsample.o \ 265 pipe2.o \ 266 pollsys.o \ 267 pread.o \ 268 preadv.o \ 269 priocntlset.o \ 270 processor_bind.o \ 271 processor_info.o \ 272 profil.o \ 273 psecflagsset.o \ 274 putmsg.o \ 275 putpmsg.o \ 276 pwrite.o \ 277 pwritev.o \ 278 read.o \ 279 readv.o \ 280 resolvepath.o \ 281 seteguid.o \ 282 setgid.o \ 283 setgroups.o \ 284 setitimer.o \ 285 setreid.o \ 286 setrlimit.o \ 287 setuid.o \ 288 sigaltstk.o \ 289 sigprocmsk.o \ 290 sigsendset.o \ 291 sigsuspend.o \ 292 statfs.o \ 293 statvfs.o \ 294 stty.o \ 295 sync.o \ 296 sysconfig.o \ 297 sysfs.o \ 298 sysinfo.o \ 299 syslwp.o \ 300 times.o \ 301 ulimit.o \ 302 umask.o \ 303 umount2.o \ 304 upanic.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 fattach.o \ 413 fdetach.o \ 414 fdopendir.o \ 415 ffs.o \ 416 flock.o \ 417 fls.o \ 418 fmtmsg.o \ 419 freezero.o \ 420 ftime.o \ 421 ftok.o \ 422 fts.o \ 423 ftw.o \ 424 gcvt.o \ 425 get_nprocs.o \ 426 getauxv.o \ 427 getcwd.o \ 428 getdate_err.o \ 429 getdtblsize.o \ 430 getentropy.o \ 431 getenv.o \ 432 getexecname.o \ 433 getgrnam.o \ 434 getgrnam_r.o \ 435 gethostid.o \ 436 gethostname.o \ 437 gethz.o \ 438 getisax.o \ 439 getloadavg.o \ 440 getlogin.o \ 441 getmntent.o \ 442 getnetgrent.o \ 443 getopt.o \ 444 getopt_long.o \ 445 getpagesize.o \ 446 getpw.o \ 447 getpwnam.o \ 448 getpwnam_r.o \ 449 getrusage.o \ 450 getspent.o \ 451 getspent_r.o \ 452 getsubopt.o \ 453 gettxt.o \ 454 getusershell.o \ 455 getut.o \ 456 getutx.o \ 457 getvfsent.o \ 458 getwd.o \ 459 getwidth.o \ 460 getxby_door.o \ 461 gtxt.o \ 462 hsearch.o \ 463 iconv.o \ 464 imaxabs.o \ 465 imaxdiv.o \ 466 index.o \ 467 initgroups.o \ 468 insque.o \ 469 isaexec.o \ 470 isastream.o \ 471 isatty.o \ 472 killpg.o \ 473 klpdlib.o \ 474 l64a.o \ 475 lckpwdf.o \ 476 lconstants.o \ 477 ldivide.o \ 478 lexp10.o \ 479 lfind.o \ 480 lfmt.o \ 481 lfmt_log.o \ 482 lldiv.o \ 483 llog10.o \ 484 lltostr.o \ 485 lmath.o \ 486 localtime.o \ 487 lsearch.o \ 488 madvise.o \ 489 malloc.o \ 490 memalign.o \ 491 memrchr.o \ 492 memset_s.o \ 493 mkdev.o \ 494 mkdtemp.o \ 495 mkfifo.o \ 496 mkstemp.o \ 497 mktemp.o \ 498 mlock.o \ 499 mlockall.o \ 500 mon.o \ 501 msync.o \ 502 munlock.o \ 503 munlockall.o \ 504 ndbm.o \ 505 nftw.o \ 506 nlspath_checks.o \ 507 nsparse.o \ 508 nss_common.o \ 509 nss_dbdefs.o \ 510 nss_deffinder.o \ 511 opendir.o \ 512 opt_data.o \ 513 perror.o \ 514 pfmt.o \ 515 pfmt_data.o \ 516 pfmt_print.o \ 517 pipe.o \ 518 plock.o \ 519 poll.o \ 520 posix_fadvise.o \ 521 posix_fallocate.o \ 522 posix_madvise.o \ 523 posix_memalign.o \ 524 priocntl.o \ 525 priv_str_xlate.o \ 526 privlib.o \ 527 psecflags.o \ 528 psiginfo.o \ 529 psignal.o \ 530 pt.o \ 531 putpwent.o \ 532 putspent.o \ 533 raise.o \ 534 rand.o \ 535 random.o \ 536 rctlops.o \ 537 readdir.o \ 538 readdir_r.o \ 539 reallocarray.o \ 540 reallocf.o \ 541 recallocarray.o \ 542 realpath.o \ 543 reboot.o \ 544 regexpr.o \ 545 remove.o \ 546 rewinddir.o \ 547 rindex.o \ 548 scandir.o \ 549 seekdir.o \ 550 select.o \ 551 set_constraint_handler_s.o \ 552 setlabel.o \ 553 setpriority.o \ 554 settimeofday.o \ 555 sh_locks.o \ 556 sigflag.o \ 557 siglist.o \ 558 sigsend.o \ 559 sigsetops.o \ 560 ssignal.o \ 561 ssp.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 $@ $(GSHARED) $(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) -D__STDC__ \ 1087 -D_ASM -D__sparcv9 $(CPPFLAGS) $(sparcv9_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) $< -c -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 1134pics/_Qp%.o := CFLAGS64 += -I$(LIBCDIR)/$(MACH)/fp 1135pics/_Q%.o := sparcv9_COPTFLAG = -xO4 -xchip=ultra 1136 1137# large-file-aware components that should be built large 1138 1139#$(COMSYSOBJS64:%=pics/%) := \ 1140# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1141 1142#$(SYSOBJS64:%=pics/%) := \ 1143# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1144 1145#$(PORTGEN64:%=pics/%) := \ 1146# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1147 1148#$(PORTSTDIO64:%=pics/%) := \ 1149# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1150 1151#$(PORTSYS64:%=pics/%) := \ 1152# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1153 1154$(PORTSTDIO_W:%=pics/%) := \ 1155 CPPFLAGS += -D_WIDE 1156 1157$(PORTPRINT_W:%=pics/%) := \ 1158 CPPFLAGS += -D_WIDE 1159 1160$(PORTI18N_COND:%=pics/%) := \ 1161 CPPFLAGS += -D_WCS_LONGLONG 1162 1163pics/arc4random.o := CPPFLAGS += -I$(SRC)/common/crypto/chacha 1164 1165# Files which need extra optimization 1166pics/getenv.o := sparcv9_COPTFLAG = -xO4 1167 1168# 1169# Disable the stack protector due to issues with bootstrapping rtld. See 1170# cmd/sgs/rtld/Makefile.com for more information. 1171# 1172STACKPROTECT = none 1173 1174.KEEP_STATE: 1175 1176all: $(LIBS) $(LIB_PIC) 1177 1178# include common libc targets 1179include $(LIBCDIR)/Makefile.targ 1180 1181# We need to strip out all CTF and DOF data from the static library 1182$(LIB_PIC) := DIR = pics 1183$(LIB_PIC): pics $$(PICS) 1184 $(BUILD.AR) 1185 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1186 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1187 $(AR) -ts $@ > /dev/null 1188 $(POST_PROCESS_A) 1189 1190# special cases 1191#$(STRETS:%=pics/%): crt/stret.s 1192# $(AS) $(ASFLAGS) -DSTRET$(@F:stret%.o=%) crt/stret.s -o $@ 1193# $(POST_PROCESS_S_O) 1194 1195#crt/_rtbootld.s: crt/_rtboot.s crt/_rtld.c 1196# $(CC) $(CPPFLAGS) -O -S -K pic crt/_rtld.c -o crt/_rtld.s 1197# $(CAT) crt/_rtboot.s crt/_rtld.s > $@ 1198# $(RM) crt/_rtld.s 1199 1200ASSYMDEP_OBJS= \ 1201 _lwp_mutex_unlock.o \ 1202 _stack_grow.o \ 1203 asm_subr.o \ 1204 setjmp.o \ 1205 smt_pause.o \ 1206 tls_get_addr.o \ 1207 unwind_frame.o \ 1208 vforkx.o 1209 1210$(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1211 1212$(ASSYMDEP_OBJS:%=pics/%): assym.h 1213 1214# assym.h build rules 1215 1216assym.h := CFLAGS64 += $(CCGDEBUG) 1217 1218GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c 1219LDFLAGS.native = $(LDASSERTS) $(BDIRECT) 1220 1221genassym := NATIVE_LIBS += libc.so 1222 1223genassym: $(GENASSYM_C) 1224 $(NATIVECC) $(NATIVE_CFLAGS) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \ 1225 $(CPPFLAGS.native) $(LDFLAGS.native) -o $@ $(GENASSYM_C) 1226 1227OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1228 1229assym.h: $(OFFSETS) genassym 1230 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1231 ./genassym >>$@ 1232 1233# derived C source and related explicit dependencies 1234$(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk 1235 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist 1236 1237pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c 1238