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 fcntl.o \ 828 fsmisc.o \ 829 fstatat.o \ 830 fsync.o \ 831 getpeerucred.o \ 832 inst_sync.o \ 833 issetugid.o \ 834 label.o \ 835 libc_link.o \ 836 libc_open.o \ 837 lockf.o \ 838 lwp.o \ 839 lwp_cond.o \ 840 lwp_rwlock.o \ 841 lwp_sigmask.o \ 842 meminfosys.o \ 843 msgsys.o \ 844 nfssys.o \ 845 openat.o \ 846 pgrpsys.o \ 847 posix_sigwait.o \ 848 ppriv.o \ 849 psetsys.o \ 850 rctlsys.o \ 851 sbrk.o \ 852 semsys.o \ 853 set_errno.o \ 854 shmsys.o \ 855 siginterrupt.o \ 856 signal.o \ 857 sigpending.o \ 858 sigstack.o \ 859 tasksys.o \ 860 time.o \ 861 time_util.o \ 862 ucontext.o \ 863 ustat.o \ 864 zone.o 865 866PORTREGEX= \ 867 glob.o \ 868 regcmp.o \ 869 regex.o \ 870 wordexp.o 871 872MOSTOBJS= \ 873 $(STRETS) \ 874 $(CRTOBJS) \ 875 $(DYNOBJS) \ 876 $(FPOBJS) \ 877 $(FPASMOBJS) \ 878 $(ATOMICOBJS) \ 879 $(COMOBJS) \ 880 $(DTRACEOBJS) \ 881 $(GENOBJS) \ 882 $(PORTFP) \ 883 $(PORTGEN) \ 884 $(PORTGEN64) \ 885 $(PORTI18N) \ 886 $(PORTI18N_COND) \ 887 $(PORTPRINT) \ 888 $(PORTPRINT_C89) \ 889 $(PORTPRINT_W) \ 890 $(PORTREGEX) \ 891 $(PORTSTDIO) \ 892 $(PORTSTDIO64) \ 893 $(PORTSTDIO_C89) \ 894 $(PORTSTDIO_W) \ 895 $(PORTSYS) \ 896 $(PORTSYS64) \ 897 $(AIOOBJS) \ 898 $(RTOBJS) \ 899 $(TPOOLOBJS) \ 900 $(THREADSOBJS) \ 901 $(THREADSMACHOBJS) \ 902 $(THREADSASMOBJS) \ 903 $(UNWINDMACHOBJS) \ 904 $(UNWINDASMOBJS) \ 905 $(COMSYSOBJS) \ 906 $(SYSOBJS) \ 907 $(COMSYSOBJS64) \ 908 $(SYSOBJS64) \ 909 $(VALUES) 910 911TRACEOBJS= \ 912 plockstat.o 913 914# NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 915# modules whose source is provided in the $(SRC)/lib/common directory. 916# This must be done because otherwise the Sun C compiler would insert 917# its own versions of these modules and those versions contain code 918# to call out to C++ initialization functions. Such C++ initialization 919# functions can call back into libc before thread initialization is 920# complete and this leads to segmentation violations and other problems. 921# Since libc contains no C++ code, linking with the minimal crti.o and 922# crtn.o modules is safe and avoids the problems described above. 923OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 924CRTSRCS= ../../common/i386 925 926LDPASS_OFF= $(POUND_SIGN) 927 928# include common library definitions 929include ../../Makefile.lib 930 931# NOTE: libc_i18n.a will be part of libc.so.1. Therefore, the compilation 932# conditions such as the settings of CFLAGS and CPPFLAGS for the libc_i18n stuff 933# need to be compatible with the ones for the libc stuff. Whenever the changes 934# that affect the compilation conditions of libc happened, those for libc_i18n 935# also need to be updated. 936 937# we need to override the default SONAME here because we might 938# be building a variant object (still libc.so.1, but different filename) 939SONAME = libc.so.1 940 941CFLAGS += $(CCVERBOSE) $(CTF_FLAGS) 942 943# This is necessary to avoid problems with calling _ex_unwind(). 944# We probably don't want any inlining anyway. 945XINLINE = -xinline= 946CFLAGS += $(XINLINE) 947 948# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) 949# enables ASSERT() checking in the threads portion of the library. 950# This is automatically enabled for DEBUG builds, not for non-debug builds. 951THREAD_DEBUG = 952$(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 953 954CFLAGS += $(THREAD_DEBUG) 955 956ALTPICS= $(TRACEOBJS:%=pics/%) 957 958$(DYNLIB) := PICS += $(ROOTFS_LIBDIR)/libc_i18n.a 959$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(LDLIBS) 960 961MAPFILES = ../port/mapfile-vers ../i386/mapfile-vers 962 963# 964# EXTN_CPPFLAGS and EXTN_CFLAGS set in enclosing Makefile 965# 966CFLAGS += $(EXTN_CFLAGS) 967CPPFLAGS= -D_REENTRANT -Di386 $(EXTN_CPPFLAGS) \ 968 -I$(LIBCBASE)/inc -I../inc $(CPPFLAGS.master) 969ASFLAGS= $(AS_PICFLAGS) -P -D__STDC__ -D_ASM $(CPPFLAGS) $(i386_AS_XARCH) 970 971# Inform the run-time linker about libc specialized initialization 972RTLDINFO = -z rtldinfo=tls_rtldinfo 973DYNFLAGS += $(RTLDINFO) 974 975DYNFLAGS += -e __rtboot 976DYNFLAGS += $(EXTN_DYNFLAGS) 977 978# Inform the kernel about the initial DTrace area (in case 979# libc is being used as the interpreter / runtime linker). 980DTRACE_DATA = -zdtrace=dtrace_data 981DYNFLAGS += $(DTRACE_DATA) 982 983# DTrace needs an executable data segment. 984NX_MAP= 985 986BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 987 988# Override this top level flag so the compiler builds in its native 989# C99 mode. This has been enabled to support the complex arithmetic 990# added to libc. 991C99MODE= $(C99_ENABLE) 992 993# libc method of building an archive 994BUILD.AR= $(RM) $@ ; \ 995 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%)| $(TSORT)` 996 997# extra files for the clean target 998CLEANFILES= \ 999 ../port/gen/errlst.c \ 1000 ../port/gen/new_list.c \ 1001 assym.h \ 1002 genassym \ 1003 crt/_rtld.s \ 1004 crt/_rtbootld.s \ 1005 pics/_rtbootld.o \ 1006 pics/crti.o \ 1007 pics/crtn.o \ 1008 $(ALTPICS) 1009 1010CLOBBERFILES += $(LIB_PIC) 1011 1012# list of C source for lint 1013SRCS= \ 1014 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \ 1015 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \ 1016 $(DTRACEOBJS:%.o=$(SRC)/common/dtrace/%.c) \ 1017 $(PORTFP:%.o=../port/fp/%.c) \ 1018 $(PORTGEN:%.o=../port/gen/%.c) \ 1019 $(PORTI18N:%.o=../port/i18n/%.c) \ 1020 $(PORTPRINT:%.o=../port/print/%.c) \ 1021 $(PORTREGEX:%.o=../port/regex/%.c) \ 1022 $(PORTSTDIO:%.o=../port/stdio/%.c) \ 1023 $(PORTSYS:%.o=../port/sys/%.c) \ 1024 $(AIOOBJS:%.o=../port/aio/%.c) \ 1025 $(RTOBJS:%.o=../port/rt/%.c) \ 1026 $(TPOOLOBJS:%.o=../port/tpool/%.c) \ 1027 $(THREADSOBJS:%.o=../port/threads/%.c) \ 1028 $(THREADSMACHOBJS:%.o=../$(MACH)/threads/%.c) \ 1029 $(UNWINDMACHOBJS:%.o=../port/unwind/%.c) \ 1030 $(FPOBJS:%.o=../$(MACH)/fp/%.c) \ 1031 $(LIBCBASE)/gen/ecvt.c \ 1032 $(LIBCBASE)/gen/lexp10.c \ 1033 $(LIBCBASE)/gen/llog10.c \ 1034 $(LIBCBASE)/gen/ltostr.c \ 1035 $(LIBCBASE)/gen/makectxt.c \ 1036 $(LIBCBASE)/gen/siginfolst.c \ 1037 $(LIBCBASE)/gen/siglongjmp.c \ 1038 $(LIBCBASE)/gen/strcmp.c \ 1039 $(LIBCBASE)/gen/sync_instruction_memory.c \ 1040 $(LIBCBASE)/sys/ptrace.c \ 1041 $(LIBCBASE)/sys/uadmin.c 1042 1043# conditional assignments 1044$(DYNLIB) $(LIB_PIC) := DYNOBJS = _rtbootld.o 1045$(DYNLIB) := CRTI = crti.o 1046$(DYNLIB) := CRTN = crtn.o 1047 1048# Files which need the threads .il inline template 1049TIL= \ 1050 aio.o \ 1051 alloc.o \ 1052 assfail.o \ 1053 atexit.o \ 1054 atfork.o \ 1055 cancel.o \ 1056 door_calls.o \ 1057 errno.o \ 1058 lwp.o \ 1059 ma.o \ 1060 machdep.o \ 1061 posix_aio.o \ 1062 pthr_attr.o \ 1063 pthr_barrier.o \ 1064 pthr_cond.o \ 1065 pthr_mutex.o \ 1066 pthr_rwlock.o \ 1067 pthread.o \ 1068 rand.o \ 1069 rtsched.o \ 1070 rwlock.o \ 1071 scalls.o \ 1072 sema.o \ 1073 sigaction.o \ 1074 sigev_thread.o \ 1075 spawn.o \ 1076 stack.o \ 1077 synch.o \ 1078 tdb_agent.o \ 1079 thr.o \ 1080 thread_interface.o \ 1081 thread_pool.o \ 1082 tls.o \ 1083 tsd.o \ 1084 unwind.o 1085 1086THREADS_INLINES = $(LIBCBASE)/threads/i386.il 1087$(TIL:%=pics/%) := CFLAGS += $(THREADS_INLINES) 1088 1089# pics/mul64.o := CFLAGS += $(LIBCBASE)/crt/mul64.il 1090 1091# large-file-aware components that should be built large 1092 1093$(COMSYSOBJS64:%=pics/%) := \ 1094 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1095 1096$(SYSOBJS64:%=pics/%) := \ 1097 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1098 1099$(PORTGEN64:%=pics/%) := \ 1100 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1101 1102$(PORTSTDIO64:%=pics/%) := \ 1103 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1104 1105$(PORTSYS64:%=pics/%) := \ 1106 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1107 1108$(PORTSTDIO_W:%=pics/%) := \ 1109 CPPFLAGS += -D_WIDE 1110 1111$(PORTPRINT_W:%=pics/%) := \ 1112 CPPFLAGS += -D_WIDE 1113 1114$(PORTPRINT_C89:%=pics/%) := \ 1115 CPPFLAGS += -D_C89_INTMAX32 1116 1117$(PORTSTDIO_C89:%=pics/%) := \ 1118 CPPFLAGS += -D_C89_INTMAX32 1119 1120$(PORTI18N_COND:%=pics/%) := \ 1121 CPPFLAGS += -D_WCS_LONGLONG 1122 1123.KEEP_STATE: 1124 1125all: $(LIBS) $(LIB_PIC) 1126 1127lint := CPPFLAGS += -I../$(MACH)/fp 1128lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99 1129lint := LINTFLAGS += -mn -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED 1130 1131lint: 1132 @echo $(LINT.c) ... 1133 @$(LINT.c) $(SRCS) $(LDLIBS) 1134 1135$(LINTLIB):= SRCS=../port/llib-lc 1136$(LINTLIB):= CPPFLAGS += -D_MSE_INT_H 1137$(LINTLIB):= LINTFLAGS=-nvx 1138 1139# object files that depend on inline template 1140$(TIL:%=pics/%): $(LIBCBASE)/threads/i386.il 1141# pics/mul64.o: $(LIBCBASE)/crt/mul64.il 1142 1143# include common libc targets 1144include ../Makefile.targ 1145 1146# We need to strip out all CTF and DOF data from the static library 1147$(LIB_PIC) := DIR = pics 1148$(LIB_PIC): pics $$(PICS) 1149 $(BUILD.AR) 1150 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1151 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1152 $(AR) -ts $@ > /dev/null 1153 $(POST_PROCESS_A) 1154 1155$(LIBCBASE)/crt/_rtbootld.s: $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.c 1156 $(CC) $(CPPFLAGS) $(CTF_FLAGS) -O -S $(C_PICFLAGS) \ 1157 $(LIBCBASE)/crt/_rtld.c -o $(LIBCBASE)/crt/_rtld.s 1158 $(CAT) $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.s > $@ 1159 $(RM) $(LIBCBASE)/crt/_rtld.s 1160 1161# partially built from C source 1162pics/_rtbootld.o: $(LIBCBASE)/crt/_rtbootld.s 1163 $(AS) $(ASFLAGS) $(LIBCBASE)/crt/_rtbootld.s -o $@ 1164 $(CTFCONVERT_O) 1165 1166ASSYMDEP_OBJS= \ 1167 _lwp_mutex_unlock.o \ 1168 _stack_grow.o \ 1169 getcontext.o \ 1170 tls_get_addr.o \ 1171 vforkx.o 1172 1173$(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1174 1175$(ASSYMDEP_OBJS:%=pics/%): assym.h 1176 1177# assym.h build rules 1178 1179GENASSYM_C = ../$(MACH)/genassym.c 1180 1181# XXX A hack. Perhaps this should be 'CPPFLAGS.native' and 1182# live in Makefile.master 1183 1184CPPFLAGS.genassym = \ 1185 $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) 1186 1187genassym: $(GENASSYM_C) 1188 $(NATIVECC) -I$(LIBCBASE)/inc -I../inc \ 1189 -D__EXTENSIONS__ $(CPPFLAGS.genassym) -o $@ $(GENASSYM_C) 1190 1191OFFSETS = ../$(MACH)/offsets.in 1192 1193assym.h: $(OFFSETS) genassym 1194 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1195 ./genassym >>$@ 1196 1197# derived C source and related explicit dependencies 1198../port/gen/errlst.c + \ 1199../port/gen/new_list.c: ../port/gen/errlist ../port/gen/errlist.awk 1200 cd ../port/gen; pwd; $(AWK) -f errlist.awk < errlist 1201 1202pics/errlst.o: ../port/gen/errlst.c 1203 1204pics/new_list.o: ../port/gen/new_list.c 1205