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 eventfd.o \ 885 epoll.o \ 886 exacctsys.o \ 887 execl.o \ 888 execle.o \ 889 execv.o \ 890 fcntl.o \ 891 getpagesizes.o \ 892 getpeerucred.o \ 893 inst_sync.o \ 894 issetugid.o \ 895 label.o \ 896 link.o \ 897 lockf.o \ 898 lwp.o \ 899 lwp_cond.o \ 900 lwp_rwlock.o \ 901 lwp_sigmask.o \ 902 meminfosys.o \ 903 mkdir.o \ 904 mknod.o \ 905 msgsys.o \ 906 nfssys.o \ 907 open.o \ 908 pgrpsys.o \ 909 posix_sigwait.o \ 910 ppriv.o \ 911 psetsys.o \ 912 rctlsys.o \ 913 readlink.o \ 914 rename.o \ 915 sbrk.o \ 916 semsys.o \ 917 set_errno.o \ 918 sharefs.o \ 919 shmsys.o \ 920 sidsys.o \ 921 siginterrupt.o \ 922 signal.o \ 923 sigpending.o \ 924 sigstack.o \ 925 stat.o \ 926 symlink.o \ 927 tasksys.o \ 928 time.o \ 929 time_util.o \ 930 timerfd.o \ 931 ucontext.o \ 932 unlink.o \ 933 ustat.o \ 934 utimesys.o \ 935 zone.o 936 937PORTREGEX= \ 938 glob.o \ 939 regcmp.o \ 940 regex.o \ 941 wordexp.o 942 943VALUES= values-Xa.o 944 945MOSTOBJS= \ 946 $(STRETS) \ 947 $(CRTOBJS) \ 948 $(DYNOBJS) \ 949 $(FPOBJS) \ 950 $(FPOBJS64) \ 951 $(FPASMOBJS) \ 952 $(ATOMICOBJS) \ 953 $(CHACHAOBJS) \ 954 $(XATTROBJS) \ 955 $(COMOBJS) \ 956 $(GENOBJS) \ 957 $(PRFOBJS) \ 958 $(PORTFP) \ 959 $(PORTGEN) \ 960 $(PORTGEN64) \ 961 $(PORTI18N) \ 962 $(PORTI18N_COND) \ 963 $(PORTLOCALE) \ 964 $(PORTPRINT) \ 965 $(PORTPRINT_W) \ 966 $(PORTREGEX) \ 967 $(PORTSTDIO) \ 968 $(PORTSTDIO64) \ 969 $(PORTSTDIO_W) \ 970 $(PORTSYS) \ 971 $(PORTSYS64) \ 972 $(AIOOBJS) \ 973 $(RTOBJS) \ 974 $(TPOOLOBJS) \ 975 $(THREADSOBJS) \ 976 $(THREADSMACHOBJS) \ 977 $(THREADSASMOBJS) \ 978 $(UNICODEOBJS) \ 979 $(UNWINDMACHOBJS) \ 980 $(UNWINDASMOBJS) \ 981 $(COMSYSOBJS) \ 982 $(SYSOBJS) \ 983 $(COMSYSOBJS64) \ 984 $(SYSOBJS64) \ 985 $(VALUES) 986 987TRACEOBJS= \ 988 plockstat.o 989 990# NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 991# modules whose source is provided in the $(SRC)/lib/common directory. 992# This must be done because otherwise the Sun C compiler would insert 993# its own versions of these modules and those versions contain code 994# to call out to C++ initialization functions. Such C++ initialization 995# functions can call back into libc before thread initialization is 996# complete and this leads to segmentation violations and other problems. 997# Since libc contains no C++ code, linking with the minimal crti.o and 998# crtn.o modules is safe and avoids the problems described above. 999OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 1000CRTSRCS= ../../common/sparcv9 1001 1002# include common library definitions 1003include $(SRC)/lib/Makefile.lib 1004include $(SRC)/lib/Makefile.lib.64 1005 1006# we need to override the default SONAME here because we might 1007# be building a variant object (still libc.so.1, but different filename) 1008SONAME = libc.so.1 1009 1010CFLAGS64 += $(CCVERBOSE) 1011 1012# This is necessary to avoid problems with calling _ex_unwind(). 1013# We probably don't want any inlining anyway. 1014CFLAGS64 += -xinline= 1015 1016CERRWARN += -_gcc=-Wno-parentheses 1017CERRWARN += -_gcc=-Wno-switch 1018CERRWARN += -_gcc=-Wno-uninitialized 1019CERRWARN += -_gcc=-Wno-unused-value 1020CERRWARN += -_gcc=-Wno-unused-label 1021CERRWARN += -_gcc=-Wno-unused-variable 1022CERRWARN += -_gcc=-Wno-type-limits 1023CERRWARN += -_gcc=-Wno-char-subscripts 1024CERRWARN += -_gcc=-Wno-clobbered 1025CERRWARN += -_gcc=-Wno-unused-function 1026CERRWARN += -_gcc=-Wno-address 1027 1028# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) 1029# enables ASSERT() checking in the threads portion of the library. 1030# This is automatically enabled for DEBUG builds, not for non-debug builds. 1031THREAD_DEBUG = 1032$(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 1033 1034# Make string literals read-only to save memory. 1035CFLAGS64 += $(XSTRCONST) 1036 1037ALTPICS= $(TRACEOBJS:%=pics/%) 1038 1039$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS) 1040 1041MAPFILES = $(LIBCDIR)/port/mapfile-vers 1042 1043sparcv9_C_PICFLAGS= -K PIC 1044CFLAGS64 += $(EXTN_CFLAGS) 1045CPPFLAGS= -D_REENTRANT -Dsparc $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \ 1046 -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master) 1047ASFLAGS= $(EXTN_ASFLAGS) -K PIC -P -D__STDC__ -D_ASM -D__sparcv9 $(CPPFLAGS) \ 1048 $(sparcv9_AS_XARCH) 1049 1050# As a favor to the dtrace syscall provider, libc still calls the 1051# old syscall traps that have been obsoleted by the *at() interfaces. 1052# Delete this to compile libc using only the new *at() system call traps 1053CPPFLAGS += -D_RETAIN_OLD_SYSCALLS 1054 1055# Inform the run-time linker about libc specialized initialization 1056RTLDINFO = -z rtldinfo=tls_rtldinfo 1057DYNFLAGS += $(RTLDINFO) 1058 1059# Force libc's internal references to be resolved immediately upon loading 1060# in order to avoid critical region problems. Since almost all libc symbols 1061# are marked 'protected' in the mapfiles, this is a minimal set (15 to 20). 1062DYNFLAGS += -znow 1063 1064DYNFLAGS += $(EXTN_DYNFLAGS) 1065 1066BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 1067 1068# Override this top level flag so the compiler builds in its native 1069# C99 mode. This has been enabled to support the complex arithmetic 1070# added to libc. 1071C99MODE= $(C99_ENABLE) 1072 1073# libc method of building an archive 1074# The "$(GREP) -v ' L '" part is necessary only until 1075# lorder is fixed to ignore thread-local variables. 1076BUILD.AR= $(RM) $@ ; \ 1077 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)` 1078 1079# extra files for the clean target 1080CLEANFILES= \ 1081 $(LIBCDIR)/port/gen/errlst.c \ 1082 $(LIBCDIR)/port/gen/new_list.c \ 1083 assym.h \ 1084 genassym \ 1085 pics/crti.o \ 1086 pics/crtn.o \ 1087 $(ALTPICS) 1088 1089CLOBBERFILES += $(LIB_PIC) 1090 1091# list of C source for lint 1092SRCS= \ 1093 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \ 1094 $(XATTROBJS:%.o=$(SRC)/common/xattr/%.c) \ 1095 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \ 1096 $(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c) \ 1097 $(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c) \ 1098 $(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c) \ 1099 $(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c) \ 1100 $(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c) \ 1101 $(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c) \ 1102 $(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c) \ 1103 $(PORTSYS:%.o=$(LIBCDIR)/port/sys/%.c) \ 1104 $(AIOOBJS:%.o=$(LIBCDIR)/port/aio/%.c) \ 1105 $(RTOBJS:%.o=$(LIBCDIR)/port/rt/%.c) \ 1106 $(TPOOLOBJS:%.o=$(LIBCDIR)/port/tpool/%.c) \ 1107 $(THREADSOBJS:%.o=$(LIBCDIR)/port/threads/%.c) \ 1108 $(THREADSMACHOBJS:%.o=$(LIBCDIR)/$(MACH)/threads/%.c) \ 1109 $(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c) \ 1110 $(UNWINDMACHOBJS:%.o=$(LIBCDIR)/port/unwind/%.c) \ 1111 $(FPOBJS:%.o=$(LIBCDIR)/$(MACH)/fp/%.c) \ 1112 $(FPOBJS64:%.o=$(LIBCBASE)/fp/%.c) \ 1113 $(LIBCBASE)/crt/_ftou.c \ 1114 $(LIBCBASE)/gen/_xregs_clrptr.c \ 1115 $(LIBCBASE)/gen/byteorder.c \ 1116 $(LIBCBASE)/gen/ecvt.c \ 1117 $(LIBCBASE)/gen/getctxt.c \ 1118 $(LIBCBASE)/gen/makectxt.c \ 1119 $(LIBCBASE)/gen/siginfolst.c \ 1120 $(LIBCBASE)/gen/siglongjmp.c \ 1121 $(LIBCBASE)/gen/swapctxt.c 1122 1123# conditional assignments 1124$(DYNLIB) := CRTI = crti.o 1125$(DYNLIB) := CRTN = crtn.o 1126 1127# Files which need the threads .il inline template 1128TIL= \ 1129 aio.o \ 1130 alloc.o \ 1131 assfail.o \ 1132 atexit.o \ 1133 atfork.o \ 1134 cancel.o \ 1135 door_calls.o \ 1136 err.o \ 1137 errno.o \ 1138 getctxt.o \ 1139 lwp.o \ 1140 ma.o \ 1141 machdep.o \ 1142 posix_aio.o \ 1143 pthr_attr.o \ 1144 pthr_barrier.o \ 1145 pthr_cond.o \ 1146 pthr_mutex.o \ 1147 pthr_rwlock.o \ 1148 pthread.o \ 1149 rand.o \ 1150 rwlock.o \ 1151 scalls.o \ 1152 sched.o \ 1153 sema.o \ 1154 sigaction.o \ 1155 sigev_thread.o \ 1156 spawn.o \ 1157 stack.o \ 1158 swapctxt.o \ 1159 synch.o \ 1160 tdb_agent.o \ 1161 thr.o \ 1162 thread_interface.o \ 1163 thread_pool.o \ 1164 tls.o \ 1165 tsd.o \ 1166 unwind.o 1167 1168$(TIL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/threads/sparcv9.il 1169 1170# Files in fp, port/fp subdirectories that need base.il inline template 1171IL= \ 1172 __flt_decim.o \ 1173 decimal_bin.o 1174 1175$(IL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/fp/base.il 1176 1177# Files in fp subdirectory which need __quad.il inline template 1178QIL= \ 1179 _Q_add.o \ 1180 _Q_cmp.o \ 1181 _Q_cmpe.o \ 1182 _Q_div.o \ 1183 _Q_dtoq.o \ 1184 _Q_fcc.o \ 1185 _Q_mul.o \ 1186 _Q_qtod.o \ 1187 _Q_qtoi.o \ 1188 _Q_qtos.o \ 1189 _Q_qtou.o \ 1190 _Q_sqrt.o \ 1191 _Q_stoq.o \ 1192 _Q_sub.o \ 1193 _Qp_qtox.o \ 1194 _Qp_qtoux.o 1195 1196$(QIL:%=pics/%) := CFLAGS64 += $(LIBCDIR)/$(MACH)/fp/__quad.il 1197pics/_Qp%.o := CFLAGS64 += -I$(LIBCDIR)/$(MACH)/fp 1198pics/_Q%.o := sparcv9_COPTFLAG = -xO4 -xchip=ultra 1199 1200# Files in crt subdirectory which need muldiv64.il inline template 1201#CIL= mul64.o divrem64.o 1202#$(CIL:%=pics/%) := CFLAGS += $(LIBCBASE)/crt/mul64.il 1203 1204# large-file-aware components that should be built large 1205 1206#$(COMSYSOBJS64:%=pics/%) := \ 1207# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1208 1209#$(SYSOBJS64:%=pics/%) := \ 1210# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1211 1212#$(PORTGEN64:%=pics/%) := \ 1213# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1214 1215#$(PORTSTDIO64:%=pics/%) := \ 1216# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1217 1218#$(PORTSYS64:%=pics/%) := \ 1219# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1220 1221$(PORTSTDIO_W:%=pics/%) := \ 1222 CPPFLAGS += -D_WIDE 1223 1224$(PORTPRINT_W:%=pics/%) := \ 1225 CPPFLAGS += -D_WIDE 1226 1227$(PORTI18N_COND:%=pics/%) := \ 1228 CPPFLAGS += -D_WCS_LONGLONG 1229 1230pics/arc4random.o := CPPFLAGS += -I$(SRC)/common/crypto/chacha 1231 1232# Files which need extra optimization 1233pics/getenv.o := sparcv9_COPTFLAG = -xO4 1234 1235.KEEP_STATE: 1236 1237all: $(LIBS) $(LIB_PIC) 1238 1239lint := CPPFLAGS += -I$(LIBCDIR)/$(MACH)/fp 1240lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99 1241lint := LINTFLAGS64 += -mn 1242 1243lint: 1244 @echo $(LINT.c) ... $(LDLIBS) 1245 @$(LINT.c) $(SRCS) $(LDLIBS) 1246 1247$(LINTLIB):= SRCS=$(LIBCDIR)/port/llib-lc 1248$(LINTLIB):= CPPFLAGS += -D_MSE_INT_H 1249$(LINTLIB):= LINTFLAGS64=-nvx -m64 1250 1251# object files that depend on inline template 1252$(TIL:%=pics/%): $(LIBCBASE)/threads/sparcv9.il 1253$(IL:%=pics/%): $(LIBCBASE)/fp/base.il 1254$(QIL:%=pics/%): $(LIBCDIR)/$(MACH)/fp/__quad.il 1255#$(CIL:%=pics/%): $(LIBCBASE)/crt/muldiv64.il 1256 1257# include common libc targets 1258include $(LIBCDIR)/Makefile.targ 1259 1260# We need to strip out all CTF and DOF data from the static library 1261$(LIB_PIC) := DIR = pics 1262$(LIB_PIC): pics $$(PICS) 1263 $(BUILD.AR) 1264 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1265 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1266 $(AR) -ts $@ > /dev/null 1267 $(POST_PROCESS_A) 1268 1269# special cases 1270#$(STRETS:%=pics/%): crt/stret.s 1271# $(AS) $(ASFLAGS) -DSTRET$(@F:stret%.o=%) crt/stret.s -o $@ 1272# $(POST_PROCESS_O) 1273 1274#crt/_rtbootld.s: crt/_rtboot.s crt/_rtld.c 1275# $(CC) $(CPPFLAGS) -O -S -K pic crt/_rtld.c -o crt/_rtld.s 1276# $(CAT) crt/_rtboot.s crt/_rtld.s > $@ 1277# $(RM) crt/_rtld.s 1278 1279ASSYMDEP_OBJS= \ 1280 _lwp_mutex_unlock.o \ 1281 _stack_grow.o \ 1282 asm_subr.o \ 1283 setjmp.o \ 1284 smt_pause.o \ 1285 tls_get_addr.o \ 1286 unwind_frame.o \ 1287 vforkx.o 1288 1289$(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1290 1291$(ASSYMDEP_OBJS:%=pics/%): assym.h 1292 1293# assym.h build rules 1294 1295assym.h := CFLAGS64 += -g 1296 1297GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c 1298 1299genassym: $(GENASSYM_C) 1300 $(NATIVECC) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \ 1301 $(CPPFLAGS.native) -o $@ $(GENASSYM_C) 1302 1303OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1304 1305assym.h: $(OFFSETS) genassym 1306 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1307 ./genassym >>$@ 1308 1309# derived C source and related explicit dependencies 1310$(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk 1311 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist 1312 1313pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c 1314