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 byteorder.o \ 125 cuexit.o \ 126 ecvt.o \ 127 errlst.o \ 128 getctxt.o \ 129 ladd.o \ 130 lexp10.o \ 131 llog10.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 __fcntl.o \ 182 __getloadavg.o \ 183 __rusagesys.o \ 184 __signotify.o \ 185 __sigrt.o \ 186 __time.o \ 187 _lgrp_home_fast.o \ 188 _lgrpsys.o \ 189 _nfssys.o \ 190 _portfs.o \ 191 _pset.o \ 192 _rename.o \ 193 _rpcsys.o \ 194 _sigaction.o \ 195 _so_accept.o \ 196 _so_bind.o \ 197 _so_connect.o \ 198 _so_getpeername.o \ 199 _so_getsockname.o \ 200 _so_getsockopt.o \ 201 _so_listen.o \ 202 _so_recv.o \ 203 _so_recvfrom.o \ 204 _so_recvmsg.o \ 205 _so_send.o \ 206 _so_sendmsg.o \ 207 _so_sendto.o \ 208 _so_setsockopt.o \ 209 _so_shutdown.o \ 210 _so_socket.o \ 211 _so_socketpair.o \ 212 _sockconfig.o \ 213 access.o \ 214 acct.o \ 215 acl.o \ 216 adjtime.o \ 217 alarm.o \ 218 brk.o \ 219 chdir.o \ 220 chmod.o \ 221 chown.o \ 222 chroot.o \ 223 cladm.o \ 224 close.o \ 225 creat.o \ 226 dup.o \ 227 execve.o \ 228 exit.o \ 229 facl.o \ 230 fchdir.o \ 231 fchmod.o \ 232 fchown.o \ 233 fchroot.o \ 234 fdsync.o \ 235 fpathconf.o \ 236 fstat.o \ 237 fstatfs.o \ 238 fstatvfs.o \ 239 getcpuid.o \ 240 getdents.o \ 241 getegid.o \ 242 geteuid.o \ 243 getgid.o \ 244 getgroups.o \ 245 gethrtime.o \ 246 getitimer.o \ 247 getmsg.o \ 248 getpagesizes.o \ 249 getpid.o \ 250 getpmsg.o \ 251 getppid.o \ 252 getrlimit.o \ 253 getuid.o \ 254 gtty.o \ 255 install_utrap.o \ 256 ioctl.o \ 257 kaio.o \ 258 kill.o \ 259 lchown.o \ 260 link.o \ 261 llseek.o \ 262 lseek.o \ 263 lstat.o \ 264 memcntl.o \ 265 mincore.o \ 266 mkdir.o \ 267 mknod.o \ 268 mmap.o \ 269 modctl.o \ 270 mount.o \ 271 mprotect.o \ 272 munmap.o \ 273 nice.o \ 274 ntp_adjtime.o \ 275 ntp_gettime.o \ 276 open.o \ 277 p_online.o \ 278 pathconf.o \ 279 pause.o \ 280 pcsample.o \ 281 pollsys.o \ 282 pread.o \ 283 priocntlset.o \ 284 processor_bind.o \ 285 processor_info.o \ 286 profil.o \ 287 putmsg.o \ 288 putpmsg.o \ 289 pwrite.o \ 290 read.o \ 291 readlink.o \ 292 readv.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 syssun.o \ 344 tls_get_addr.o \ 345 uadmin.o \ 346 umount.o \ 347 uname.o \ 348 vforkx.o 349 350# objects under ../port which contain transitional large file interfaces 351PORTGEN64= \ 352 _xftw64.o \ 353 attropen64.o \ 354 ftw64.o \ 355 mkstemp64.o \ 356 nftw64.o \ 357 tell64.o \ 358 truncate64.o 359 360# objects from source under ../port 361PORTFP= \ 362 __flt_decim.o \ 363 __flt_rounds.o \ 364 __tbl_10_b.o \ 365 __tbl_10_h.o \ 366 __tbl_10_s.o \ 367 __tbl_2_b.o \ 368 __tbl_2_h.o \ 369 __tbl_2_s.o \ 370 __tbl_fdq.o \ 371 __tbl_tens.o \ 372 __x_power.o \ 373 _base_sup.o \ 374 aconvert.o \ 375 decimal_bin.o \ 376 double_decim.o \ 377 econvert.o \ 378 fconvert.o \ 379 file_decim.o \ 380 finite.o \ 381 fp_data.o \ 382 func_decim.o \ 383 gconvert.o \ 384 hex_bin.o \ 385 ieee_globals.o \ 386 pack_float.o \ 387 sigfpe.o \ 388 string_decim.o \ 389 ashldi3.o \ 390 ashrdi3.o \ 391 cmpdi2.o \ 392 divdi3.o \ 393 floatdidf.o \ 394 floatdisf.o \ 395 lshrdi3.o \ 396 moddi3.o \ 397 muldi3.o \ 398 qdivrem.o \ 399 ucmpdi2.o \ 400 udivdi3.o \ 401 umoddi3.o 402 403PORTGEN= \ 404 _env_data.o \ 405 _ftoll.o \ 406 _ftoull.o \ 407 _xftw.o \ 408 a64l.o \ 409 abort.o \ 410 addsev.o \ 411 assert.o \ 412 atof.o \ 413 atoi.o \ 414 atol.o \ 415 atoll.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 l64a.o \ 504 lckpwdf.o \ 505 lconstants.o \ 506 ldivide.o \ 507 lfind.o \ 508 lfmt.o \ 509 lfmt_log.o \ 510 llabs.o \ 511 lldiv.o \ 512 lltostr.o \ 513 localtime.o \ 514 lsearch.o \ 515 madvise.o \ 516 malloc.o \ 517 memalign.o \ 518 mkdev.o \ 519 mkdtemp.o \ 520 mkfifo.o \ 521 mkstemp.o \ 522 mktemp.o \ 523 mlock.o \ 524 mlockall.o \ 525 mon.o \ 526 msync.o \ 527 munlock.o \ 528 munlockall.o \ 529 ndbm.o \ 530 nftw.o \ 531 nlspath_checks.o \ 532 nsparse.o \ 533 nss_common.o \ 534 nss_dbdefs.o \ 535 nss_deffinder.o \ 536 opendir.o \ 537 opt_data.o \ 538 perror.o \ 539 pfmt.o \ 540 pfmt_data.o \ 541 pfmt_print.o \ 542 plock.o \ 543 poll.o \ 544 priocntl.o \ 545 privlib.o \ 546 priv_str_xlate.o \ 547 psiginfo.o \ 548 psignal.o \ 549 pt.o \ 550 putpwent.o \ 551 putspent.o \ 552 raise.o \ 553 rand.o \ 554 random.o \ 555 rctlops.o \ 556 readdir.o \ 557 readdir_r.o \ 558 realpath.o \ 559 reboot.o \ 560 regexpr.o \ 561 rename.o \ 562 rewinddir.o \ 563 rindex.o \ 564 scandir.o \ 565 seekdir.o \ 566 select.o \ 567 select_large_fdset.o \ 568 setlabel.o \ 569 setpriority.o \ 570 settimeofday.o \ 571 sh_locks.o \ 572 sigflag.o \ 573 siglist.o \ 574 sigsend.o \ 575 sigsetops.o \ 576 ssignal.o \ 577 stack.o \ 578 str2sig.o \ 579 strcase_charmap.o \ 580 strcat.o \ 581 strcspn.o \ 582 strdup.o \ 583 strerror.o \ 584 strncat.o \ 585 strlcat.o \ 586 strncasecmp.o \ 587 strpbrk.o \ 588 strrchr.o \ 589 strsignal.o \ 590 strspn.o \ 591 strstr.o \ 592 strtod.o \ 593 strtoimax.o \ 594 strtok.o \ 595 strtok_r.o \ 596 strtoll.o \ 597 strtoull.o \ 598 strtoumax.o \ 599 swab.o \ 600 swapctl.o \ 601 sysconf.o \ 602 syslog.o \ 603 tcdrain.o \ 604 tcflow.o \ 605 tcflush.o \ 606 tcgetattr.o \ 607 tcgetpgrp.o \ 608 tcgetsid.o \ 609 tcsendbreak.o \ 610 tcsetattr.o \ 611 tcsetpgrp.o \ 612 tell.o \ 613 telldir.o \ 614 tfind.o \ 615 time_data.o \ 616 time_gdata.o \ 617 truncate.o \ 618 tsdalloc.o \ 619 tsearch.o \ 620 ttyname.o \ 621 ttyslot.o \ 622 ualarm.o \ 623 ucred.o \ 624 valloc.o \ 625 vlfmt.o \ 626 vpfmt.o \ 627 wait3.o \ 628 wait4.o \ 629 waitpid.o \ 630 walkstack.o \ 631 wdata.o \ 632 xgetwidth.o \ 633 xpg4.o \ 634 xpg6.o 635 636PORTPRINT_W= \ 637 doprnt_w.o 638 639PORTPRINT= \ 640 doprnt.o \ 641 fprintf.o \ 642 printf.o \ 643 snprintf.o \ 644 sprintf.o \ 645 vfprintf.o \ 646 vprintf.o \ 647 vsnprintf.o \ 648 vsprintf.o \ 649 vwprintf.o \ 650 wprintf.o 651 652# c89 variants to support 32-bit size of c89 u/intmax_t (32-bit libc only) 653PORTPRINT_C89= \ 654 vfprintf_c89.o \ 655 vprintf_c89.o \ 656 vsnprintf_c89.o \ 657 vsprintf_c89.o \ 658 vwprintf_c89.o 659 660PORTSTDIO_C89= \ 661 vscanf_c89.o \ 662 vwscanf_c89.o 663 664# portable stdio objects that contain large file interfaces. 665# Note: fopen64 is a special case, as we build it small. 666PORTSTDIO64= \ 667 fopen64.o \ 668 fpos64.o 669 670PORTSTDIO_W= \ 671 doscan_w.o 672 673PORTSTDIO= \ 674 __extensions.o \ 675 _endopen.o \ 676 _filbuf.o \ 677 _findbuf.o \ 678 _flsbuf.o \ 679 _wrtchk.o \ 680 clearerr.o \ 681 ctermid.o \ 682 ctermid_r.o \ 683 cuserid.o \ 684 data.o \ 685 doscan.o \ 686 fdopen.o \ 687 feof.o \ 688 ferror.o \ 689 fgetc.o \ 690 fgets.o \ 691 fileno.o \ 692 flockf.o \ 693 flush.o \ 694 fopen.o \ 695 fpos.o \ 696 fputc.o \ 697 fputs.o \ 698 fread.o \ 699 fseek.o \ 700 fseeko.o \ 701 ftell.o \ 702 ftello.o \ 703 fwrite.o \ 704 getc.o \ 705 getchar.o \ 706 getpass.o \ 707 gets.o \ 708 getw.o \ 709 popen.o \ 710 putc.o \ 711 putchar.o \ 712 puts.o \ 713 putw.o \ 714 rewind.o \ 715 scanf.o \ 716 setbuf.o \ 717 setbuffer.o \ 718 setvbuf.o \ 719 system.o \ 720 tempnam.o \ 721 tmpfile.o \ 722 tmpnam_r.o \ 723 ungetc.o \ 724 mse.o \ 725 vscanf.o \ 726 vwscanf.o \ 727 wscanf.o 728 729PORTI18N= \ 730 __fgetwc_xpg5.o \ 731 __fgetws_xpg5.o \ 732 __fputwc_xpg5.o \ 733 __fputws_xpg5.o \ 734 __ungetwc_xpg5.o \ 735 getwchar.o \ 736 putwchar.o \ 737 putws.o \ 738 strtows.o \ 739 wcstoimax.o \ 740 wcstol.o \ 741 wcstoul.o \ 742 wcswcs.o \ 743 wscasecmp.o \ 744 wscat.o \ 745 wschr.o \ 746 wscmp.o \ 747 wscpy.o \ 748 wscspn.o \ 749 wsdup.o \ 750 wslen.o \ 751 wsncasecmp.o \ 752 wsncat.o \ 753 wsncmp.o \ 754 wsncpy.o \ 755 wspbrk.o \ 756 wsprintf.o \ 757 wsrchr.o \ 758 wsscanf.o \ 759 wsspn.o \ 760 wstod.o \ 761 wstok.o \ 762 wstol.o \ 763 wstoll.o \ 764 wsxfrm.o \ 765 wmemchr.o \ 766 wmemcmp.o \ 767 wmemcpy.o \ 768 wmemmove.o \ 769 wmemset.o \ 770 wcsstr.o \ 771 gettext.o \ 772 gettext_real.o \ 773 gettext_util.o \ 774 gettext_gnu.o \ 775 plural_parser.o \ 776 wdresolve.o \ 777 _ctype.o \ 778 isascii.o \ 779 toascii.o 780 781PORTI18N_COND= \ 782 wcstol_longlong.o \ 783 wcstoul_longlong.o 784 785AIOOBJS= \ 786 aio.o \ 787 aio_alloc.o \ 788 posix_aio.o 789 790RTOBJS= \ 791 clock_timer.o \ 792 fallocate.o \ 793 mqueue.o \ 794 pos4obj.o \ 795 sched.o \ 796 sem.o \ 797 shm.o \ 798 sigev_thread.o 799 800TPOOLOBJS= \ 801 thread_pool.o 802 803THREADSOBJS= \ 804 alloc.o \ 805 assfail.o \ 806 cancel.o \ 807 door_calls.o \ 808 pthr_attr.o \ 809 pthr_barrier.o \ 810 pthr_cond.o \ 811 pthr_mutex.o \ 812 pthr_rwlock.o \ 813 pthread.o \ 814 rtsched.o \ 815 rwlock.o \ 816 scalls.o \ 817 sema.o \ 818 sigaction.o \ 819 spawn.o \ 820 synch.o \ 821 tdb_agent.o \ 822 thr.o \ 823 thread_interface.o \ 824 tls.o \ 825 tsd.o 826 827THREADSMACHOBJS= \ 828 machdep.o 829 830THREADSASMOBJS= \ 831 asm_subr.o 832 833UNICODEOBJS= \ 834 u8_textprep.o \ 835 uconv.o 836 837UNWINDMACHOBJS= \ 838 unwind.o 839 840UNWINDASMOBJS= \ 841 unwind_frame.o 842 843# objects that implement the transitional large file API 844PORTSYS64= \ 845 fstatat64.o \ 846 lockf64.o \ 847 openat64.o 848 849PORTSYS= \ 850 _autofssys.o \ 851 acctctl.o \ 852 bsd_signal.o \ 853 corectl.o \ 854 exacctsys.o \ 855 execl.o \ 856 execle.o \ 857 execv.o \ 858 faccessat.o \ 859 fcntl.o \ 860 fsmisc.o \ 861 fstatat.o \ 862 fsync.o \ 863 getpeerucred.o \ 864 inst_sync.o \ 865 issetugid.o \ 866 label.o \ 867 libc_link.o \ 868 libc_open.o \ 869 lockf.o \ 870 lwp.o \ 871 lwp_cond.o \ 872 lwp_rwlock.o \ 873 lwp_sigmask.o \ 874 meminfosys.o \ 875 msgsys.o \ 876 nfssys.o \ 877 openat.o \ 878 pgrpsys.o \ 879 posix_sigwait.o \ 880 ppriv.o \ 881 psetsys.o \ 882 rctlsys.o \ 883 sbrk.o \ 884 semsys.o \ 885 set_errno.o \ 886 sharefs.o \ 887 shmsys.o \ 888 sidsys.o \ 889 siginterrupt.o \ 890 signal.o \ 891 sigpending.o \ 892 sigstack.o \ 893 tasksys.o \ 894 time.o \ 895 time_util.o \ 896 ucontext.o \ 897 ustat.o \ 898 zone.o 899 900PORTREGEX= \ 901 glob.o \ 902 regcmp.o \ 903 regex.o \ 904 wordexp.o 905 906VALUES= values-Xa.o 907 908MOSTOBJS= \ 909 $(STRETS) \ 910 $(CRTOBJS) \ 911 $(DYNOBJS) \ 912 $(FPOBJS) \ 913 $(FPASMOBJS) \ 914 $(ATOMICOBJS) \ 915 $(COMOBJS) \ 916 $(DTRACEOBJS) \ 917 $(GENOBJS) \ 918 $(PORTFP) \ 919 $(PORTGEN) \ 920 $(PORTGEN64) \ 921 $(PORTI18N) \ 922 $(PORTI18N_COND) \ 923 $(PORTPRINT) \ 924 $(PORTPRINT_C89) \ 925 $(PORTPRINT_W) \ 926 $(PORTREGEX) \ 927 $(PORTSTDIO) \ 928 $(PORTSTDIO64) \ 929 $(PORTSTDIO_C89) \ 930 $(PORTSTDIO_W) \ 931 $(PORTSYS) \ 932 $(PORTSYS64) \ 933 $(AIOOBJS) \ 934 $(RTOBJS) \ 935 $(TPOOLOBJS) \ 936 $(THREADSOBJS) \ 937 $(THREADSMACHOBJS) \ 938 $(THREADSASMOBJS) \ 939 $(UNICODEOBJS) \ 940 $(UNWINDMACHOBJS) \ 941 $(UNWINDASMOBJS) \ 942 $(COMSYSOBJS) \ 943 $(SYSOBJS) \ 944 $(COMSYSOBJS64) \ 945 $(SYSOBJS64) \ 946 $(VALUES) 947 948TRACEOBJS= \ 949 plockstat.o 950 951# NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 952# modules whose source is provided in the $(SRC)/lib/common directory. 953# This must be done because otherwise the Sun C compiler would insert 954# its own versions of these modules and those versions contain code 955# to call out to C++ initialization functions. Such C++ initialization 956# functions can call back into libc before thread initialization is 957# complete and this leads to segmentation violations and other problems. 958# Since libc contains no C++ code, linking with the minimal crti.o and 959# crtn.o modules is safe and avoids the problems described above. 960OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 961CRTSRCS= ../../common/sparc 962 963# include common library definitions 964include ../../Makefile.lib 965 966# NOTE: libc_i18n.a will be part of libc.so.1. Therefore, the compilation 967# conditions such as the settings of CFLAGS and CPPFLAGS for the libc_i18n stuff 968# need to be compatible with the ones for the libc stuff. Whenever the changes 969# that affect the compilation conditions of libc happened, those for libc_i18n 970# also need to be updated. 971 972CFLAGS += $(CCVERBOSE) 973 974# This is necessary to avoid problems with calling _ex_unwind(). 975# We probably don't want any inlining anyway. 976CFLAGS += -xinline= 977 978# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) 979# enables ASSERT() checking in the threads portion of the library. 980# This is automatically enabled for DEBUG builds, not for non-debug builds. 981THREAD_DEBUG = 982$(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 983 984CFLAGS += $(THREAD_DEBUG) 985 986ALTPICS= $(TRACEOBJS:%=pics/%) 987 988$(DYNLIB) := PICS += $(ROOTFS_LIBDIR)/libc_i18n.a 989$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) 990 991MAPFILES = ../port/mapfile-vers mapfile-vers 992 993CFLAGS += $(EXTN_CFLAGS) 994CPPFLAGS= -D_REENTRANT -Dsparc $(EXTN_CPPFLAGS) \ 995 -I$(LIBCBASE)/inc -I../inc $(CPPFLAGS.master) 996ASFLAGS= -K pic -P -D__STDC__ -D_ASM $(CPPFLAGS) $(sparc_AS_XARCH) 997 998# Conditionally add support for making |wordexp()| check whether 999# /usr/bin/ksh is ksh93 or not 1000include ../../../Makefile.ksh93switch 1001CPPFLAGS += -DWORDEXP_KSH93=$(ON_BUILD_KSH93_AS_BINKSH) 1002 1003# Inform the run-time linker about libc specialized initialization 1004RTLDINFO = -z rtldinfo=tls_rtldinfo 1005DYNFLAGS += $(RTLDINFO) 1006 1007DYNFLAGS += -e __rtboot 1008DYNFLAGS += $(EXTN_DYNFLAGS) 1009 1010# Inform the kernel about the initial DTrace area (in case 1011# libc is being used as the interpreter / runtime linker). 1012DTRACE_DATA = -zdtrace=dtrace_data 1013DYNFLAGS += $(DTRACE_DATA) 1014 1015# DTrace needs an executable data segment. 1016MAPFILE.NED= 1017 1018BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 1019 1020# Override this top level flag so the compiler builds in its native 1021# C99 mode. This has been enabled to support the complex arithmetic 1022# added to libc. 1023C99MODE= $(C99_ENABLE) 1024 1025# libc method of building an archive 1026BUILD.AR= $(RM) $@ ; \ 1027 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%)| $(TSORT)` 1028 1029# extra files for the clean target 1030CLEANFILES= \ 1031 ../port/gen/errlst.c \ 1032 ../port/gen/new_list.c \ 1033 assym.h \ 1034 genassym \ 1035 crt/_rtld.s \ 1036 crt/_rtbootld.s \ 1037 pics/_rtbootld.o \ 1038 pics/crti.o \ 1039 pics/crtn.o \ 1040 $(ALTPICS) 1041 1042CLOBBERFILES += $(LIB_PIC) 1043 1044# list of C source for lint 1045SRCS= \ 1046 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \ 1047 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \ 1048 $(DTRACEOBJS:%.o=$(SRC)/common/dtrace/%.c) \ 1049 $(PORTFP:%.o=../port/fp/%.c) \ 1050 $(PORTGEN:%.o=../port/gen/%.c) \ 1051 $(PORTI18N:%.o=../port/i18n/%.c) \ 1052 $(PORTPRINT:%.o=../port/print/%.c) \ 1053 $(PORTREGEX:%.o=../port/regex/%.c) \ 1054 $(PORTSTDIO:%.o=../port/stdio/%.c) \ 1055 $(PORTSYS:%.o=../port/sys/%.c) \ 1056 $(AIOOBJS:%.o=../port/aio/%.c) \ 1057 $(RTOBJS:%.o=../port/rt/%.c) \ 1058 $(TPOOLOBJS:%.o=../port/tpool/%.c) \ 1059 $(THREADSOBJS:%.o=../port/threads/%.c) \ 1060 $(THREADSMACHOBJS:%.o=../$(MACH)/threads/%.c) \ 1061 $(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c) \ 1062 $(UNWINDMACHOBJS:%.o=../port/unwind/%.c) \ 1063 $(FPOBJS:%.o=../$(MACH)/fp/%.c) \ 1064 $(LIBCBASE)/crt/_ftou.c \ 1065 $(LIBCBASE)/gen/_xregs_clrptr.c \ 1066 $(LIBCBASE)/gen/byteorder.c \ 1067 $(LIBCBASE)/gen/ecvt.c \ 1068 $(LIBCBASE)/gen/getctxt.c \ 1069 $(LIBCBASE)/gen/lexp10.c \ 1070 $(LIBCBASE)/gen/llog10.c \ 1071 $(LIBCBASE)/gen/lmul.c \ 1072 $(LIBCBASE)/gen/makectxt.c \ 1073 $(LIBCBASE)/gen/siginfolst.c \ 1074 $(LIBCBASE)/gen/siglongjmp.c \ 1075 $(LIBCBASE)/gen/swapctxt.c \ 1076 $(LIBCBASE)/sys/ptrace.c 1077 1078# conditional assignments 1079$(DYNLIB) $(LIB_PIC) := DYNOBJS = _rtbootld.o 1080$(DYNLIB) := CRTI = crti.o 1081$(DYNLIB) := CRTN = crtn.o 1082 1083# Files which need the threads .il inline template 1084TIL= \ 1085 aio.o \ 1086 alloc.o \ 1087 assfail.o \ 1088 atexit.o \ 1089 atfork.o \ 1090 cancel.o \ 1091 door_calls.o \ 1092 errno.o \ 1093 getctxt.o \ 1094 lwp.o \ 1095 ma.o \ 1096 machdep.o \ 1097 posix_aio.o \ 1098 pthr_attr.o \ 1099 pthr_barrier.o \ 1100 pthr_cond.o \ 1101 pthr_mutex.o \ 1102 pthr_rwlock.o \ 1103 pthread.o \ 1104 rand.o \ 1105 rtsched.o \ 1106 rwlock.o \ 1107 scalls.o \ 1108 sema.o \ 1109 sigaction.o \ 1110 sigev_thread.o \ 1111 spawn.o \ 1112 stack.o \ 1113 swapctxt.o \ 1114 synch.o \ 1115 tdb_agent.o \ 1116 thr.o \ 1117 thread_interface.o \ 1118 thread_pool.o \ 1119 tls.o \ 1120 tsd.o \ 1121 unwind.o 1122 1123$(TIL:%=pics/%) := CFLAGS += $(LIBCBASE)/threads/sparc.il 1124 1125# special kludge for inlines with 'cas': 1126pics/rwlock.o pics/synch.o pics/lwp.o := sparc_CFLAGS += -_gcc=-Wa,-xarch=v8plus 1127 1128# Files in port/fp subdirectory that need base.il inline template 1129IL= \ 1130 __flt_decim.o \ 1131 decimal_bin.o 1132 1133$(IL:%=pics/%) := CFLAGS += $(LIBCBASE)/fp/base.il 1134 1135# Files in fp subdirectory which need __quad.il inline template 1136QIL= \ 1137 _Q_add.o \ 1138 _Q_cmp.o \ 1139 _Q_cmpe.o \ 1140 _Q_div.o \ 1141 _Q_dtoq.o \ 1142 _Q_fcc.o \ 1143 _Q_mul.o \ 1144 _Q_qtod.o \ 1145 _Q_qtoi.o \ 1146 _Q_qtos.o \ 1147 _Q_qtou.o \ 1148 _Q_sqrt.o \ 1149 _Q_stoq.o \ 1150 _Q_sub.o 1151 1152$(QIL:%=pics/%) := CFLAGS += ../$(MACH)/fp/__quad.il 1153pics/_Q%.o := sparc_COPTFLAG = -xO4 -dalign 1154pics/__quad%.o := sparc_COPTFLAG = -xO4 -dalign 1155 1156# large-file-aware components that should be built large 1157 1158$(COMSYSOBJS64:%=pics/%) := \ 1159 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1160 1161$(SYSOBJS64:%=pics/%) := \ 1162 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1163 1164$(PORTGEN64:%=pics/%) := \ 1165 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1166 1167$(PORTSTDIO64:%=pics/%) := \ 1168 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1169 1170$(PORTSYS64:%=pics/%) := \ 1171 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1172 1173$(PORTSTDIO_W:%=pics/%) := \ 1174 CPPFLAGS += -D_WIDE 1175 1176$(PORTPRINT_W:%=pics/%) := \ 1177 CPPFLAGS += -D_WIDE 1178 1179# printf/scanf functions to support c89-sized intmax_t variables 1180$(PORTPRINT_C89:%=pics/%) := \ 1181 CPPFLAGS += -D_C89_INTMAX32 1182 1183$(PORTSTDIO_C89:%=pics/%) := \ 1184 CPPFLAGS += -D_C89_INTMAX32 1185 1186$(PORTI18N_COND:%=pics/%) := \ 1187 CPPFLAGS += -D_WCS_LONGLONG 1188 1189# Files which need extra optimization 1190pics/getenv.o := sparc_COPTFLAG = -xO4 1191 1192.KEEP_STATE: 1193 1194all: $(LIBS) $(LIB_PIC) 1195 1196lint := CPPFLAGS += -I../$(MACH)/fp 1197lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99 1198lint := LINTFLAGS += -mn 1199 1200lint: 1201 @echo $(LINT.c) ... $(LDLIBS) 1202 @$(LINT.c) $(SRCS) $(LDLIBS) 1203 1204$(LINTLIB):= SRCS=../port/llib-lc 1205$(LINTLIB):= CPPFLAGS += -D_MSE_INT_H 1206$(LINTLIB):= LINTFLAGS=-nvx 1207 1208# object files that depend on inline template 1209$(TIL:%=pics/%): $(LIBCBASE)/threads/sparc.il 1210$(IL:%=pics/%): $(LIBCBASE)/fp/base.il 1211$(QIL:%=pics/%): ../$(MACH)/fp/__quad.il 1212 1213# include common libc targets 1214include ../Makefile.targ 1215 1216# We need to strip out all CTF and DOF data from the static library 1217$(LIB_PIC) := DIR = pics 1218$(LIB_PIC): pics $$(PICS) 1219 $(BUILD.AR) 1220 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1221 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1222 $(AR) -ts $@ > /dev/null 1223 $(POST_PROCESS_A) 1224 1225# special cases 1226$(STRETS:%=pics/%): crt/stret.s 1227 $(AS) $(ASFLAGS) -DSTRET$(@F:stret%.o=%) crt/stret.s -o $@ 1228 $(POST_PROCESS_O) 1229 1230crt/_rtbootld.s: crt/_rtboot.s crt/_rtld.c 1231 $(CC) $(CPPFLAGS) $(CTF_FLAGS) -O -S -K pic \ 1232 crt/_rtld.c -o crt/_rtld.s 1233 $(CAT) crt/_rtboot.s crt/_rtld.s > $@ 1234 $(RM) crt/_rtld.s 1235 1236# partially built from C source 1237pics/_rtbootld.o: crt/_rtbootld.s 1238 $(AS) $(ASFLAGS) crt/_rtbootld.s -o $@ 1239 $(CTFCONVERT_O) 1240 1241ASSYMDEP_OBJS= \ 1242 _lwp_mutex_unlock.o \ 1243 _stack_grow.o \ 1244 asm_subr.o \ 1245 tls_get_addr.o \ 1246 unwind_frame.o \ 1247 vforkx.o 1248 1249$(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1250 1251$(ASSYMDEP_OBJS:%=pics/%): assym.h 1252 1253# assym.h build rules 1254 1255GENASSYM_C = ../$(MACH)/genassym.c 1256 1257# XXX A hack. Perhaps this should be 'CPPFLAGS.native' and 1258# live in Makefile.master 1259 1260CPPFLAGS.genassym = \ 1261 $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) 1262 1263genassym: $(GENASSYM_C) 1264 $(NATIVECC) -I$(LIBCBASE)/inc -I../inc \ 1265 $(CPPFLAGS.genassym) -o $@ $(GENASSYM_C) 1266 1267OFFSETS = ../$(MACH)/offsets.in 1268 1269assym.h: $(OFFSETS) genassym 1270 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1271 ./genassym >>$@ 1272 1273# derived C source and related explicit dependencies 1274../port/gen/errlst.c + \ 1275../port/gen/new_list.c: ../port/gen/errlist ../port/gen/errlist.awk 1276 cd ../port/gen; pwd; $(AWK) -f errlist.awk < errlist 1277 1278pics/errlst.o: ../port/gen/errlst.c 1279 1280pics/new_list.o: ../port/gen/new_list.c 1281