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