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