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