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