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 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 putmsg.o \ 272 putpmsg.o \ 273 pwrite.o \ 274 pwritev.o \ 275 read.o \ 276 readv.o \ 277 resolvepath.o \ 278 seteguid.o \ 279 setgid.o \ 280 setgroups.o \ 281 setitimer.o \ 282 setreid.o \ 283 setrlimit.o \ 284 setuid.o \ 285 sigaltstk.o \ 286 sigprocmsk.o \ 287 sigsendset.o \ 288 sigsuspend.o \ 289 statfs.o \ 290 statvfs.o \ 291 stty.o \ 292 sync.o \ 293 sysconfig.o \ 294 sysfs.o \ 295 sysinfo.o \ 296 syslwp.o \ 297 times.o \ 298 ulimit.o \ 299 umask.o \ 300 umount2.o \ 301 utssys.o \ 302 uucopy.o \ 303 vhangup.o \ 304 waitid.o \ 305 write.o \ 306 writev.o \ 307 yield.o 308 309SYSOBJS= \ 310 __clock_gettime.o \ 311 __getcontext.o \ 312 __uadmin.o \ 313 _lwp_mutex_unlock.o \ 314 _stack_grow.o \ 315 door.o \ 316 forkx.o \ 317 forkallx.o \ 318 gettimeofday.o \ 319 sparc_utrap_install.o \ 320 syscall.o \ 321 tls_get_addr.o \ 322 uadmin.o \ 323 umount.o \ 324 uname.o \ 325 vforkx.o 326 327# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 328# This macro should ALWAYS be empty; native APIs are already 'large file'. 329PORTGEN64= 330 331# objects from source under $(LIBCDIR)/port 332PORTFP= \ 333 __flt_decim.o \ 334 __flt_rounds.o \ 335 __tbl_10_b.o \ 336 __tbl_10_h.o \ 337 __tbl_10_s.o \ 338 __tbl_2_b.o \ 339 __tbl_2_h.o \ 340 __tbl_2_s.o \ 341 __tbl_fdq.o \ 342 __tbl_tens.o \ 343 __x_power.o \ 344 _base_sup.o \ 345 aconvert.o \ 346 decimal_bin.o \ 347 double_decim.o \ 348 econvert.o \ 349 fconvert.o \ 350 file_decim.o \ 351 finite.o \ 352 fp_data.o \ 353 func_decim.o \ 354 gconvert.o \ 355 hex_bin.o \ 356 ieee_globals.o \ 357 pack_float.o \ 358 sigfpe.o \ 359 string_decim.o 360 361PORTGEN= \ 362 _env_data.o \ 363 _xftw.o \ 364 a64l.o \ 365 abort.o \ 366 addsev.o \ 367 ascii_strncasecmp.o \ 368 assert.o \ 369 attrat.o \ 370 atof.o \ 371 atoi.o \ 372 atol.o \ 373 atoll.o \ 374 attropen.o \ 375 atexit.o \ 376 atfork.o \ 377 basename.o \ 378 calloc.o \ 379 catgets.o \ 380 catopen.o \ 381 cfgetispeed.o \ 382 cfgetospeed.o \ 383 cfree.o \ 384 cfsetispeed.o \ 385 cfsetospeed.o \ 386 cftime.o \ 387 clock.o \ 388 closedir.o \ 389 closefrom.o \ 390 confstr.o \ 391 crypt.o \ 392 csetlen.o \ 393 ctime.o \ 394 ctime_r.o \ 395 daemon.o \ 396 deflt.o \ 397 directio.o \ 398 dirname.o \ 399 div.o \ 400 drand48.o \ 401 dup.o \ 402 env_data.o \ 403 err.o \ 404 errno.o \ 405 euclen.o \ 406 event_port.o \ 407 execvp.o \ 408 explicit_bzero.o \ 409 fattach.o \ 410 fdetach.o \ 411 fdopendir.o \ 412 ffs.o \ 413 fls.o \ 414 fmtmsg.o \ 415 ftime.o \ 416 ftok.o \ 417 ftw.o \ 418 gcvt.o \ 419 getauxv.o \ 420 getcwd.o \ 421 getdate_err.o \ 422 getdtblsize.o \ 423 getentropy.o \ 424 getenv.o \ 425 getexecname.o \ 426 getgrnam.o \ 427 getgrnam_r.o \ 428 gethostid.o \ 429 gethostname.o \ 430 gethz.o \ 431 getisax.o \ 432 getloadavg.o \ 433 getlogin.o \ 434 getmntent.o \ 435 getnetgrent.o \ 436 get_nprocs.o \ 437 getopt.o \ 438 getopt_long.o \ 439 getpagesize.o \ 440 getpw.o \ 441 getpwnam.o \ 442 getpwnam_r.o \ 443 getrusage.o \ 444 getspent.o \ 445 getspent_r.o \ 446 getsubopt.o \ 447 gettxt.o \ 448 getusershell.o \ 449 getut.o \ 450 getutx.o \ 451 getvfsent.o \ 452 getwd.o \ 453 getwidth.o \ 454 getxby_door.o \ 455 gtxt.o \ 456 hsearch.o \ 457 iconv.o \ 458 imaxabs.o \ 459 imaxdiv.o \ 460 index.o \ 461 initgroups.o \ 462 insque.o \ 463 isaexec.o \ 464 isastream.o \ 465 isatty.o \ 466 killpg.o \ 467 klpdlib.o \ 468 l64a.o \ 469 lckpwdf.o \ 470 lconstants.o \ 471 ldivide.o \ 472 lexp10.o \ 473 lfind.o \ 474 lfmt.o \ 475 lfmt_log.o \ 476 lldiv.o \ 477 llog10.o \ 478 lltostr.o \ 479 lmath.o \ 480 localtime.o \ 481 lsearch.o \ 482 madvise.o \ 483 malloc.o \ 484 memalign.o \ 485 memmem.o \ 486 mkdev.o \ 487 mkdtemp.o \ 488 mkfifo.o \ 489 mkstemp.o \ 490 mktemp.o \ 491 mlock.o \ 492 mlockall.o \ 493 mon.o \ 494 msync.o \ 495 munlock.o \ 496 munlockall.o \ 497 ndbm.o \ 498 nftw.o \ 499 nlspath_checks.o \ 500 nsparse.o \ 501 nss_common.o \ 502 nss_dbdefs.o \ 503 nss_deffinder.o \ 504 opendir.o \ 505 opt_data.o \ 506 perror.o \ 507 pfmt.o \ 508 pfmt_data.o \ 509 pfmt_print.o \ 510 pipe.o \ 511 plock.o \ 512 poll.o \ 513 posix_fadvise.o \ 514 posix_fallocate.o \ 515 posix_madvise.o \ 516 posix_memalign.o \ 517 priocntl.o \ 518 privlib.o \ 519 priv_str_xlate.o \ 520 psiginfo.o \ 521 psignal.o \ 522 pt.o \ 523 putpwent.o \ 524 putspent.o \ 525 raise.o \ 526 rand.o \ 527 random.o \ 528 rctlops.o \ 529 readdir.o \ 530 readdir_r.o \ 531 realpath.o \ 532 reboot.o \ 533 regexpr.o \ 534 remove.o \ 535 rewinddir.o \ 536 rindex.o \ 537 scandir.o \ 538 seekdir.o \ 539 select.o \ 540 setlabel.o \ 541 setpriority.o \ 542 settimeofday.o \ 543 sh_locks.o \ 544 sigflag.o \ 545 siglist.o \ 546 sigsend.o \ 547 sigsetops.o \ 548 ssignal.o \ 549 stack.o \ 550 stpcpy.o \ 551 stpncpy.o \ 552 str2sig.o \ 553 strcase_charmap.o \ 554 strcat.o \ 555 strchrnul.o \ 556 strcspn.o \ 557 strdup.o \ 558 strerror.o \ 559 strlcat.o \ 560 strncat.o \ 561 strndup.o \ 562 strpbrk.o \ 563 strrchr.o \ 564 strsep.o \ 565 strsignal.o \ 566 strspn.o \ 567 strstr.o \ 568 strtod.o \ 569 strtoimax.o \ 570 strtok.o \ 571 strtok_r.o \ 572 strtoumax.o \ 573 swab.o \ 574 swapctl.o \ 575 sysconf.o \ 576 syslog.o \ 577 tcdrain.o \ 578 tcflow.o \ 579 tcflush.o \ 580 tcgetattr.o \ 581 tcgetpgrp.o \ 582 tcgetsid.o \ 583 tcsendbreak.o \ 584 tcsetattr.o \ 585 tcsetpgrp.o \ 586 tell.o \ 587 telldir.o \ 588 tfind.o \ 589 time_data.o \ 590 time_gdata.o \ 591 timespec_get.o \ 592 tls_data.o \ 593 truncate.o \ 594 tsdalloc.o \ 595 tsearch.o \ 596 ttyname.o \ 597 ttyslot.o \ 598 ualarm.o \ 599 ucred.o \ 600 valloc.o \ 601 vlfmt.o \ 602 vpfmt.o \ 603 waitpid.o \ 604 walkstack.o \ 605 wdata.o \ 606 xgetwidth.o \ 607 xpg4.o \ 608 xpg6.o 609 610PORTPRINT_W= \ 611 doprnt_w.o 612 613PORTPRINT= \ 614 asprintf.o \ 615 doprnt.o \ 616 fprintf.o \ 617 printf.o \ 618 snprintf.o \ 619 sprintf.o \ 620 vfprintf.o \ 621 vprintf.o \ 622 vsnprintf.o \ 623 vsprintf.o \ 624 vwprintf.o \ 625 wprintf.o 626 627# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 628# This macro should ALWAYS be empty; native APIs are already 'large file'. 629PORTSTDIO64= 630 631PORTSTDIO_W= \ 632 doscan_w.o 633 634PORTSTDIO= \ 635 __extensions.o \ 636 _endopen.o \ 637 _filbuf.o \ 638 _findbuf.o \ 639 _flsbuf.o \ 640 _wrtchk.o \ 641 clearerr.o \ 642 ctermid.o \ 643 ctermid_r.o \ 644 cuserid.o \ 645 data.o \ 646 doscan.o \ 647 fdopen.o \ 648 feof.o \ 649 ferror.o \ 650 fgetc.o \ 651 fgets.o \ 652 fileno.o \ 653 flockf.o \ 654 flush.o \ 655 fopen.o \ 656 fpos.o \ 657 fputc.o \ 658 fputs.o \ 659 fread.o \ 660 fseek.o \ 661 fseeko.o \ 662 ftell.o \ 663 ftello.o \ 664 fwrite.o \ 665 getc.o \ 666 getchar.o \ 667 getline.o \ 668 getpass.o \ 669 gets.o \ 670 getw.o \ 671 popen.o \ 672 putc.o \ 673 putchar.o \ 674 puts.o \ 675 putw.o \ 676 rewind.o \ 677 scanf.o \ 678 setbuf.o \ 679 setbuffer.o \ 680 setvbuf.o \ 681 system.o \ 682 tempnam.o \ 683 tmpfile.o \ 684 tmpnam_r.o \ 685 ungetc.o \ 686 mse.o \ 687 vscanf.o \ 688 vwscanf.o \ 689 wscanf.o 690 691PORTI18N= \ 692 getwchar.o \ 693 putwchar.o \ 694 putws.o \ 695 strtows.o \ 696 wcsnlen.o \ 697 wcstoimax.o \ 698 wcstol.o \ 699 wcstoul.o \ 700 wcswcs.o \ 701 wscat.o \ 702 wschr.o \ 703 wscmp.o \ 704 wscpy.o \ 705 wscspn.o \ 706 wsdup.o \ 707 wslen.o \ 708 wsncat.o \ 709 wsncmp.o \ 710 wsncpy.o \ 711 wspbrk.o \ 712 wsprintf.o \ 713 wsrchr.o \ 714 wsscanf.o \ 715 wsspn.o \ 716 wstod.o \ 717 wstok.o \ 718 wstol.o \ 719 wstoll.o \ 720 wsxfrm.o \ 721 wmemchr.o \ 722 wmemcmp.o \ 723 wmemcpy.o \ 724 wmemmove.o \ 725 wmemset.o \ 726 wcsstr.o \ 727 gettext.o \ 728 gettext_real.o \ 729 gettext_util.o \ 730 gettext_gnu.o \ 731 plural_parser.o \ 732 wdresolve.o \ 733 _ctype.o \ 734 isascii.o \ 735 toascii.o 736 737PORTI18N_COND= \ 738 wcstol_longlong.o \ 739 wcstoul_longlong.o 740 741PORTLOCALE= \ 742 big5.o \ 743 btowc.o \ 744 collate.o \ 745 collcmp.o \ 746 euc.o \ 747 fnmatch.o \ 748 fgetwc.o \ 749 fgetws.o \ 750 fix_grouping.o \ 751 fputwc.o \ 752 fputws.o \ 753 fwide.o \ 754 gb18030.o \ 755 gb2312.o \ 756 gbk.o \ 757 getdate.o \ 758 isdigit.o \ 759 iswctype.o \ 760 ldpart.o \ 761 lmessages.o \ 762 lnumeric.o \ 763 lmonetary.o \ 764 localeconv.o \ 765 localeimpl.o \ 766 mbftowc.o \ 767 mblen.o \ 768 mbrlen.o \ 769 mbrtowc.o \ 770 mbsinit.o \ 771 mbsnrtowcs.o \ 772 mbsrtowcs.o \ 773 mbstowcs.o \ 774 mbtowc.o \ 775 mskanji.o \ 776 nextwctype.o \ 777 nl_langinfo.o \ 778 none.o \ 779 regcomp.o \ 780 regfree.o \ 781 regerror.o \ 782 regexec.o \ 783 rune.o \ 784 runetype.o \ 785 setlocale.o \ 786 setrunelocale.o \ 787 strcasecmp.o \ 788 strcasestr.o \ 789 strcoll.o \ 790 strfmon.o \ 791 strftime.o \ 792 strncasecmp.o \ 793 strptime.o \ 794 strxfrm.o \ 795 table.o \ 796 timelocal.o \ 797 tolower.o \ 798 towlower.o \ 799 ungetwc.o \ 800 utf8.o \ 801 wcrtomb.o \ 802 wcscasecmp.o \ 803 wcscoll.o \ 804 wcsftime.o \ 805 wcsnrtombs.o \ 806 wcsrtombs.o \ 807 wcstombs.o \ 808 wcswidth.o \ 809 wcsxfrm.o \ 810 wctob.o \ 811 wctomb.o \ 812 wctrans.o \ 813 wctype.o \ 814 wcwidth.o \ 815 wscol.o 816 817AIOOBJS= \ 818 aio.o \ 819 aio_alloc.o \ 820 posix_aio.o 821 822RTOBJS= \ 823 clock_timer.o \ 824 mqueue.o \ 825 pos4obj.o \ 826 sched.o \ 827 sem.o \ 828 shm.o \ 829 sigev_thread.o 830 831TPOOLOBJS= \ 832 thread_pool.o 833 834THREADSOBJS= \ 835 alloc.o \ 836 assfail.o \ 837 c11_thr.o \ 838 cancel.o \ 839 door_calls.o \ 840 tmem.o \ 841 pthr_attr.o \ 842 pthr_barrier.o \ 843 pthr_cond.o \ 844 pthr_mutex.o \ 845 pthr_rwlock.o \ 846 pthread.o \ 847 rwlock.o \ 848 scalls.o \ 849 sema.o \ 850 sigaction.o \ 851 spawn.o \ 852 synch.o \ 853 tdb_agent.o \ 854 thr.o \ 855 thread_interface.o \ 856 tls.o \ 857 tsd.o 858 859THREADSMACHOBJS= \ 860 machdep.o 861 862THREADSASMOBJS= \ 863 asm_subr.o 864 865UNICODEOBJS= \ 866 u8_textprep.o \ 867 uconv.o 868 869UNWINDMACHOBJS= \ 870 unwind.o 871 872UNWINDASMOBJS= \ 873 unwind_frame.o 874 875# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 876# This macro should ALWAYS be empty; native APIs are already 'large file'. 877PORTSYS64= 878 879PORTSYS= \ 880 _autofssys.o \ 881 access.o \ 882 acctctl.o \ 883 bsd_signal.o \ 884 chmod.o \ 885 chown.o \ 886 corectl.o \ 887 exacctsys.o \ 888 execl.o \ 889 execle.o \ 890 execv.o \ 891 fcntl.o \ 892 getpagesizes.o \ 893 getpeerucred.o \ 894 inst_sync.o \ 895 issetugid.o \ 896 label.o \ 897 link.o \ 898 lockf.o \ 899 lwp.o \ 900 lwp_cond.o \ 901 lwp_rwlock.o \ 902 lwp_sigmask.o \ 903 meminfosys.o \ 904 mkdir.o \ 905 mknod.o \ 906 msgsys.o \ 907 nfssys.o \ 908 open.o \ 909 pgrpsys.o \ 910 posix_sigwait.o \ 911 ppriv.o \ 912 psetsys.o \ 913 rctlsys.o \ 914 readlink.o \ 915 rename.o \ 916 sbrk.o \ 917 semsys.o \ 918 set_errno.o \ 919 sharefs.o \ 920 shmsys.o \ 921 sidsys.o \ 922 siginterrupt.o \ 923 signal.o \ 924 sigpending.o \ 925 sigstack.o \ 926 stat.o \ 927 symlink.o \ 928 tasksys.o \ 929 time.o \ 930 time_util.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/endian.c \ 1117 $(LIBCBASE)/gen/ecvt.c \ 1118 $(LIBCBASE)/gen/getctxt.c \ 1119 $(LIBCBASE)/gen/makectxt.c \ 1120 $(LIBCBASE)/gen/siginfolst.c \ 1121 $(LIBCBASE)/gen/siglongjmp.c \ 1122 $(LIBCBASE)/gen/swapctxt.c 1123 1124# conditional assignments 1125$(DYNLIB) := CRTI = crti.o 1126$(DYNLIB) := CRTN = crtn.o 1127 1128# Files which need the threads .il inline template 1129TIL= \ 1130 aio.o \ 1131 alloc.o \ 1132 assfail.o \ 1133 atexit.o \ 1134 atfork.o \ 1135 cancel.o \ 1136 door_calls.o \ 1137 err.o \ 1138 errno.o \ 1139 getctxt.o \ 1140 lwp.o \ 1141 ma.o \ 1142 machdep.o \ 1143 posix_aio.o \ 1144 pthr_attr.o \ 1145 pthr_barrier.o \ 1146 pthr_cond.o \ 1147 pthr_mutex.o \ 1148 pthr_rwlock.o \ 1149 pthread.o \ 1150 rand.o \ 1151 rwlock.o \ 1152 scalls.o \ 1153 sched.o \ 1154 sema.o \ 1155 sigaction.o \ 1156 sigev_thread.o \ 1157 spawn.o \ 1158 stack.o \ 1159 swapctxt.o \ 1160 synch.o \ 1161 tdb_agent.o \ 1162 thr.o \ 1163 thread_interface.o \ 1164 thread_pool.o \ 1165 tls.o \ 1166 tsd.o \ 1167 unwind.o 1168 1169$(TIL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/threads/sparcv9.il 1170 1171# Files in fp, port/fp subdirectories that need base.il inline template 1172IL= \ 1173 __flt_decim.o \ 1174 decimal_bin.o 1175 1176$(IL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/fp/base.il 1177 1178# Files in fp subdirectory which need __quad.il inline template 1179QIL= \ 1180 _Q_add.o \ 1181 _Q_cmp.o \ 1182 _Q_cmpe.o \ 1183 _Q_div.o \ 1184 _Q_dtoq.o \ 1185 _Q_fcc.o \ 1186 _Q_mul.o \ 1187 _Q_qtod.o \ 1188 _Q_qtoi.o \ 1189 _Q_qtos.o \ 1190 _Q_qtou.o \ 1191 _Q_sqrt.o \ 1192 _Q_stoq.o \ 1193 _Q_sub.o \ 1194 _Qp_qtox.o \ 1195 _Qp_qtoux.o 1196 1197$(QIL:%=pics/%) := CFLAGS64 += $(LIBCDIR)/$(MACH)/fp/__quad.il 1198pics/_Qp%.o := CFLAGS64 += -I$(LIBCDIR)/$(MACH)/fp 1199pics/_Q%.o := sparcv9_COPTFLAG = -xO4 -xchip=ultra 1200 1201# Files in crt subdirectory which need muldiv64.il inline template 1202#CIL= mul64.o divrem64.o 1203#$(CIL:%=pics/%) := CFLAGS += $(LIBCBASE)/crt/mul64.il 1204 1205# large-file-aware components that should be built large 1206 1207#$(COMSYSOBJS64:%=pics/%) := \ 1208# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1209 1210#$(SYSOBJS64:%=pics/%) := \ 1211# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1212 1213#$(PORTGEN64:%=pics/%) := \ 1214# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1215 1216#$(PORTSTDIO64:%=pics/%) := \ 1217# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1218 1219#$(PORTSYS64:%=pics/%) := \ 1220# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1221 1222$(PORTSTDIO_W:%=pics/%) := \ 1223 CPPFLAGS += -D_WIDE 1224 1225$(PORTPRINT_W:%=pics/%) := \ 1226 CPPFLAGS += -D_WIDE 1227 1228$(PORTI18N_COND:%=pics/%) := \ 1229 CPPFLAGS += -D_WCS_LONGLONG 1230 1231pics/arc4random.o := CPPFLAGS += -I$(SRC)/common/crypto/chacha 1232 1233# Files which need extra optimization 1234pics/getenv.o := sparcv9_COPTFLAG = -xO4 1235 1236.KEEP_STATE: 1237 1238all: $(LIBS) $(LIB_PIC) 1239 1240lint := CPPFLAGS += -I$(LIBCDIR)/$(MACH)/fp 1241lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99 1242lint := LINTFLAGS64 += -mn 1243 1244lint: 1245 @echo $(LINT.c) ... $(LDLIBS) 1246 @$(LINT.c) $(SRCS) $(LDLIBS) 1247 1248$(LINTLIB):= SRCS=$(LIBCDIR)/port/llib-lc 1249$(LINTLIB):= CPPFLAGS += -D_MSE_INT_H 1250$(LINTLIB):= LINTFLAGS64=-nvx -m64 1251 1252# object files that depend on inline template 1253$(TIL:%=pics/%): $(LIBCBASE)/threads/sparcv9.il 1254$(IL:%=pics/%): $(LIBCBASE)/fp/base.il 1255$(QIL:%=pics/%): $(LIBCDIR)/$(MACH)/fp/__quad.il 1256#$(CIL:%=pics/%): $(LIBCBASE)/crt/muldiv64.il 1257 1258# include common libc targets 1259include $(LIBCDIR)/Makefile.targ 1260 1261# We need to strip out all CTF and DOF data from the static library 1262$(LIB_PIC) := DIR = pics 1263$(LIB_PIC): pics $$(PICS) 1264 $(BUILD.AR) 1265 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1266 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1267 $(AR) -ts $@ > /dev/null 1268 $(POST_PROCESS_A) 1269 1270# special cases 1271#$(STRETS:%=pics/%): crt/stret.s 1272# $(AS) $(ASFLAGS) -DSTRET$(@F:stret%.o=%) crt/stret.s -o $@ 1273# $(POST_PROCESS_O) 1274 1275#crt/_rtbootld.s: crt/_rtboot.s crt/_rtld.c 1276# $(CC) $(CPPFLAGS) -O -S -K pic crt/_rtld.c -o crt/_rtld.s 1277# $(CAT) crt/_rtboot.s crt/_rtld.s > $@ 1278# $(RM) crt/_rtld.s 1279 1280ASSYMDEP_OBJS= \ 1281 _lwp_mutex_unlock.o \ 1282 _stack_grow.o \ 1283 asm_subr.o \ 1284 setjmp.o \ 1285 smt_pause.o \ 1286 tls_get_addr.o \ 1287 unwind_frame.o \ 1288 vforkx.o 1289 1290$(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1291 1292$(ASSYMDEP_OBJS:%=pics/%): assym.h 1293 1294# assym.h build rules 1295 1296assym.h := CFLAGS64 += -g 1297 1298GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c 1299 1300genassym: $(GENASSYM_C) 1301 $(NATIVECC) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \ 1302 $(CPPFLAGS.native) -o $@ $(GENASSYM_C) 1303 1304OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1305 1306assym.h: $(OFFSETS) genassym 1307 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1308 ./genassym >>$@ 1309 1310# derived C source and related explicit dependencies 1311$(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk 1312 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist 1313 1314pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c 1315