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