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