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