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