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