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