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