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