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