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