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