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 cfmakeraw.o \ 382 cftime.o \ 383 clock.o \ 384 closedir.o \ 385 closefrom.o \ 386 confstr.o \ 387 crypt.o \ 388 csetlen.o \ 389 ctime.o \ 390 ctime_r.o \ 391 daemon.o \ 392 deflt.o \ 393 directio.o \ 394 dirname.o \ 395 div.o \ 396 drand48.o \ 397 dup.o \ 398 env_data.o \ 399 err.o \ 400 errno.o \ 401 euclen.o \ 402 event_port.o \ 403 execvp.o \ 404 fattach.o \ 405 fdetach.o \ 406 fdopendir.o \ 407 ffs.o \ 408 fls.o \ 409 fmtmsg.o \ 410 ftime.o \ 411 ftok.o \ 412 ftw.o \ 413 gcvt.o \ 414 getauxv.o \ 415 getcwd.o \ 416 getdate_err.o \ 417 getdtblsize.o \ 418 getenv.o \ 419 getexecname.o \ 420 getgrnam.o \ 421 getgrnam_r.o \ 422 gethostid.o \ 423 gethostname.o \ 424 gethz.o \ 425 getisax.o \ 426 getloadavg.o \ 427 getlogin.o \ 428 getmntent.o \ 429 getnetgrent.o \ 430 get_nprocs.o \ 431 getopt.o \ 432 getopt_long.o \ 433 getpagesize.o \ 434 getpw.o \ 435 getpwnam.o \ 436 getpwnam_r.o \ 437 getrusage.o \ 438 getspent.o \ 439 getspent_r.o \ 440 getsubopt.o \ 441 gettxt.o \ 442 getusershell.o \ 443 getut.o \ 444 getutx.o \ 445 getvfsent.o \ 446 getwd.o \ 447 getwidth.o \ 448 getxby_door.o \ 449 gtxt.o \ 450 hsearch.o \ 451 iconv.o \ 452 imaxabs.o \ 453 imaxdiv.o \ 454 index.o \ 455 initgroups.o \ 456 insque.o \ 457 isaexec.o \ 458 isastream.o \ 459 isatty.o \ 460 killpg.o \ 461 klpdlib.o \ 462 l64a.o \ 463 lckpwdf.o \ 464 lconstants.o \ 465 lexp10.o \ 466 lfind.o \ 467 lfmt.o \ 468 lfmt_log.o \ 469 llabs.o \ 470 lldiv.o \ 471 llog10.o \ 472 lltostr.o \ 473 localtime.o \ 474 lsearch.o \ 475 madvise.o \ 476 malloc.o \ 477 memalign.o \ 478 memmem.o \ 479 mkdev.o \ 480 mkdtemp.o \ 481 mkfifo.o \ 482 mkstemp.o \ 483 mktemp.o \ 484 mlock.o \ 485 mlockall.o \ 486 mon.o \ 487 msync.o \ 488 munlock.o \ 489 munlockall.o \ 490 ndbm.o \ 491 nftw.o \ 492 nlspath_checks.o \ 493 nsparse.o \ 494 nss_common.o \ 495 nss_dbdefs.o \ 496 nss_deffinder.o \ 497 opendir.o \ 498 opt_data.o \ 499 perror.o \ 500 pfmt.o \ 501 pfmt_data.o \ 502 pfmt_print.o \ 503 pipe.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 stpcpy.o \ 545 stpncpy.o \ 546 str2sig.o \ 547 strcase_charmap.o \ 548 strchrnul.o \ 549 strcspn.o \ 550 strdup.o \ 551 strerror.o \ 552 strlcat.o \ 553 strlcpy.o \ 554 strndup.o \ 555 strpbrk.o \ 556 strsep.o \ 557 strsignal.o \ 558 strspn.o \ 559 strstr.o \ 560 strtod.o \ 561 strtoimax.o \ 562 strtok.o \ 563 strtok_r.o \ 564 strtoumax.o \ 565 swab.o \ 566 swapctl.o \ 567 sysconf.o \ 568 syslog.o \ 569 tcdrain.o \ 570 tcflow.o \ 571 tcflush.o \ 572 tcgetattr.o \ 573 tcgetpgrp.o \ 574 tcgetsid.o \ 575 tcsendbreak.o \ 576 tcsetattr.o \ 577 tcsetpgrp.o \ 578 tell.o \ 579 telldir.o \ 580 tfind.o \ 581 time_data.o \ 582 time_gdata.o \ 583 tls_data.o \ 584 truncate.o \ 585 tsdalloc.o \ 586 tsearch.o \ 587 ttyname.o \ 588 ttyslot.o \ 589 ualarm.o \ 590 ucred.o \ 591 valloc.o \ 592 vlfmt.o \ 593 vpfmt.o \ 594 waitpid.o \ 595 walkstack.o \ 596 wdata.o \ 597 xgetwidth.o \ 598 xpg4.o \ 599 xpg6.o 600 601 PORTPRINT_W= \ 602 doprnt_w.o 603 604 PORTPRINT= \ 605 asprintf.o \ 606 doprnt.o \ 607 fprintf.o \ 608 printf.o \ 609 snprintf.o \ 610 sprintf.o \ 611 vfprintf.o \ 612 vprintf.o \ 613 vsnprintf.o \ 614 vsprintf.o \ 615 vwprintf.o \ 616 wprintf.o 617 618 # c89 variants to support 32-bit size of c89 u/intmax_t (32-bit libc only) 619 PORTPRINT_C89= \ 620 vfprintf_c89.o \ 621 vprintf_c89.o \ 622 vsnprintf_c89.o \ 623 vsprintf_c89.o \ 624 vwprintf_c89.o 625 626 PORTSTDIO_C89= \ 627 vscanf_c89.o \ 628 vwscanf_c89.o \ 629 630 # portable stdio objects that contain large file interfaces. 631 # Note: fopen64 is a special case, as we build it small. 632 PORTSTDIO64= \ 633 fopen64.o \ 634 fpos64.o 635 636 PORTSTDIO_W= \ 637 doscan_w.o 638 639 PORTSTDIO= \ 640 __extensions.o \ 641 _endopen.o \ 642 _filbuf.o \ 643 _findbuf.o \ 644 _flsbuf.o \ 645 _wrtchk.o \ 646 clearerr.o \ 647 ctermid.o \ 648 ctermid_r.o \ 649 cuserid.o \ 650 data.o \ 651 doscan.o \ 652 fdopen.o \ 653 feof.o \ 654 ferror.o \ 655 fgetc.o \ 656 fgets.o \ 657 fileno.o \ 658 flockf.o \ 659 flush.o \ 660 fopen.o \ 661 fpos.o \ 662 fputc.o \ 663 fputs.o \ 664 fread.o \ 665 fseek.o \ 666 fseeko.o \ 667 ftell.o \ 668 ftello.o \ 669 fwrite.o \ 670 getc.o \ 671 getchar.o \ 672 getline.o \ 673 getpass.o \ 674 gets.o \ 675 getw.o \ 676 mse.o \ 677 popen.o \ 678 putc.o \ 679 putchar.o \ 680 puts.o \ 681 putw.o \ 682 rewind.o \ 683 scanf.o \ 684 setbuf.o \ 685 setbuffer.o \ 686 setvbuf.o \ 687 system.o \ 688 tempnam.o \ 689 tmpfile.o \ 690 tmpnam_r.o \ 691 ungetc.o \ 692 vscanf.o \ 693 vwscanf.o \ 694 wscanf.o 695 696 PORTI18N= \ 697 getwchar.o \ 698 putwchar.o \ 699 putws.o \ 700 strcasecmp.o \ 701 strcasestr.o \ 702 strncasecmp.o \ 703 strtows.o \ 704 wcsnlen.o \ 705 wcsstr.o \ 706 wcstoimax.o \ 707 wcstol.o \ 708 wcstoul.o \ 709 wcswcs.o \ 710 wmemchr.o \ 711 wmemcmp.o \ 712 wmemcpy.o \ 713 wmemmove.o \ 714 wmemset.o \ 715 wscasecmp.o \ 716 wscat.o \ 717 wschr.o \ 718 wscmp.o \ 719 wscpy.o \ 720 wscspn.o \ 721 wsdup.o \ 722 wslen.o \ 723 wsncasecmp.o \ 724 wsncat.o \ 725 wsncmp.o \ 726 wsncpy.o \ 727 wspbrk.o \ 728 wsprintf.o \ 729 wsrchr.o \ 730 wsscanf.o \ 731 wsspn.o \ 732 wstod.o \ 733 wstok.o \ 734 wstol.o \ 735 wstoll.o \ 736 wsxfrm.o \ 737 gettext.o \ 738 gettext_gnu.o \ 739 gettext_real.o \ 740 gettext_util.o \ 741 isdigit.o \ 742 plural_parser.o \ 743 wdresolve.o \ 744 _ctype.o \ 745 isascii.o \ 746 toascii.o 747 748 PORTI18N_COND= \ 749 wcstol_longlong.o \ 750 wcstoul_longlong.o 751 752 PORTLOCALE= \ 753 big5.o \ 754 btowc.o \ 755 collate.o \ 756 collcmp.o \ 757 euc.o \ 758 fnmatch.o \ 759 fgetwc.o \ 760 fgetws.o \ 761 fix_grouping.o \ 762 fputwc.o \ 763 fputws.o \ 764 fwide.o \ 765 gb18030.o \ 766 gb2312.o \ 767 gbk.o \ 768 getdate.o \ 769 iswctype.o \ 770 ldpart.o \ 771 lmessages.o \ 772 lnumeric.o \ 773 lmonetary.o \ 774 localeconv.o \ 775 mbftowc.o \ 776 mblen.o \ 777 mbrlen.o \ 778 mbrtowc.o \ 779 mbsinit.o \ 780 mbsnrtowcs.o \ 781 mbsrtowcs.o \ 782 mbstowcs.o \ 783 mbtowc.o \ 784 mskanji.o \ 785 nextwctype.o \ 786 nl_langinfo.o \ 787 none.o \ 788 regcomp.o \ 789 regfree.o \ 790 regerror.o \ 791 regexec.o \ 792 rune.o \ 793 runetype.o \ 794 setlocale.o \ 795 setrunelocale.o \ 796 strcoll.o \ 797 strfmon.o \ 798 strftime.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 wcscoll.o \ 809 wcsftime.o \ 810 wcsnrtombs.o \ 811 wcsrtombs.o \ 812 wcswidth.o \ 813 wcstombs.o \ 814 wcsxfrm.o \ 815 wctob.o \ 816 wctomb.o \ 817 wctrans.o \ 818 wctype.o \ 819 wcwidth.o \ 820 wscol.o 821 822 AIOOBJS= \ 823 aio.o \ 824 aio_alloc.o \ 825 posix_aio.o 826 827 RTOBJS= \ 828 clock_timer.o \ 829 mqueue.o \ 830 pos4obj.o \ 831 sched.o \ 832 sem.o \ 833 shm.o \ 834 sigev_thread.o 835 836 TPOOLOBJS= \ 837 thread_pool.o 838 839 THREADSOBJS= \ 840 alloc.o \ 841 assfail.o \ 842 cancel.o \ 843 door_calls.o \ 844 pthr_attr.o \ 845 pthr_barrier.o \ 846 pthr_cond.o \ 847 pthr_mutex.o \ 848 pthr_rwlock.o \ 849 pthread.o \ 850 rwlock.o \ 851 scalls.o \ 852 sema.o \ 853 sigaction.o \ 854 spawn.o \ 855 synch.o \ 856 tdb_agent.o \ 857 thr.o \ 858 thread_interface.o \ 859 tls.o \ 860 tsd.o 861 862 THREADSMACHOBJS= \ 863 machdep.o 864 865 THREADSASMOBJS= \ 866 asm_subr.o 867 868 UNICODEOBJS= \ 869 u8_textprep.o \ 870 uconv.o 871 872 UNWINDMACHOBJS= \ 873 unwind.o 874 875 UNWINDASMOBJS= \ 876 unwind_frame.o 877 878 # objects that implement the transitional large file API 879 PORTSYS64= \ 880 lockf64.o \ 881 stat64.o 882 883 PORTSYS= \ 884 _autofssys.o \ 885 access.o \ 886 acctctl.o \ 887 bsd_signal.o \ 888 chmod.o \ 889 chown.o \ 890 corectl.o \ 891 exacctsys.o \ 892 execl.o \ 893 execle.o \ 894 execv.o \ 895 fcntl.o \ 896 getpagesizes.o \ 897 getpeerucred.o \ 898 inst_sync.o \ 899 issetugid.o \ 900 label.o \ 901 link.o \ 902 lockf.o \ 903 lwp.o \ 904 lwp_cond.o \ 905 lwp_rwlock.o \ 906 lwp_sigmask.o \ 907 meminfosys.o \ 908 mkdir.o \ 909 mknod.o \ 910 msgsys.o \ 911 nfssys.o \ 912 open.o \ 913 pgrpsys.o \ 914 posix_sigwait.o \ 915 ppriv.o \ 916 psetsys.o \ 917 rctlsys.o \ 918 readlink.o \ 919 rename.o \ 920 sbrk.o \ 921 semsys.o \ 922 set_errno.o \ 923 sharefs.o \ 924 shmsys.o \ 925 sidsys.o \ 926 siginterrupt.o \ 927 signal.o \ 928 sigpending.o \ 929 sigstack.o \ 930 stat.o \ 931 symlink.o \ 932 tasksys.o \ 933 time.o \ 934 time_util.o \ 935 ucontext.o \ 936 unlink.o \ 937 ustat.o \ 938 utimesys.o \ 939 zone.o 940 941 PORTREGEX= \ 942 glob.o \ 943 regcmp.o \ 944 regex.o \ 945 wordexp.o 946 947 MOSTOBJS= \ 948 $(STRETS) \ 949 $(CRTOBJS) \ 950 $(DYNOBJS) \ 951 $(FPOBJS) \ 952 $(FPASMOBJS) \ 953 $(ATOMICOBJS) \ 954 $(XATTROBJS) \ 955 $(COMOBJS) \ 956 $(DTRACEOBJS) \ 957 $(GENOBJS) \ 958 $(PORTFP) \ 959 $(PORTGEN) \ 960 $(PORTGEN64) \ 961 $(PORTI18N) \ 962 $(PORTI18N_COND) \ 963 $(PORTLOCALE) \ 964 $(PORTPRINT) \ 965 $(PORTPRINT_C89) \ 966 $(PORTPRINT_W) \ 967 $(PORTREGEX) \ 968 $(PORTSTDIO) \ 969 $(PORTSTDIO64) \ 970 $(PORTSTDIO_C89) \ 971 $(PORTSTDIO_W) \ 972 $(PORTSYS) \ 973 $(PORTSYS64) \ 974 $(AIOOBJS) \ 975 $(RTOBJS) \ 976 $(TPOOLOBJS) \ 977 $(THREADSOBJS) \ 978 $(THREADSMACHOBJS) \ 979 $(THREADSASMOBJS) \ 980 $(UNICODEOBJS) \ 981 $(UNWINDMACHOBJS) \ 982 $(UNWINDASMOBJS) \ 983 $(COMSYSOBJS) \ 984 $(SYSOBJS) \ 985 $(COMSYSOBJS64) \ 986 $(SYSOBJS64) \ 987 $(VALUES) 988 989 TRACEOBJS= \ 990 plockstat.o 991 992 # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 993 # modules whose source is provided in the $(SRC)/lib/common directory. 994 # This must be done because otherwise the Sun C compiler would insert 995 # its own versions of these modules and those versions contain code 996 # to call out to C++ initialization functions. Such C++ initialization 997 # functions can call back into libc before thread initialization is 998 # complete and this leads to segmentation violations and other problems. 999 # Since libc contains no C++ code, linking with the minimal crti.o and 1000 # crtn.o modules is safe and avoids the problems described above. 1001 OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 1002 CRTSRCS= ../../common/i386 1003 1004 LDPASS_OFF= $(POUND_SIGN) 1005 1006 # include common library definitions 1007 include ../../Makefile.lib 1008 1009 # we need to override the default SONAME here because we might 1010 # be building a variant object (still libc.so.1, but different filename) 1011 SONAME = libc.so.1 1012 1013 CFLAGS += $(CCVERBOSE) $(CTF_FLAGS) 1014 1015 # This is necessary to avoid problems with calling _ex_unwind(). 1016 # We probably don't want any inlining anyway. 1017 XINLINE = -xinline= 1018 CFLAGS += $(XINLINE) 1019 1020 CERRWARN += -_gcc=-Wno-parentheses 1021 CERRWARN += -_gcc=-Wno-switch 1022 CERRWARN += -_gcc=-Wno-uninitialized 1023 CERRWARN += -_gcc=-Wno-unused-value 1024 CERRWARN += -_gcc=-Wno-unused-label 1025 CERRWARN += -_gcc=-Wno-unused-variable 1026 CERRWARN += -_gcc=-Wno-type-limits 1027 CERRWARN += -_gcc=-Wno-char-subscripts 1028 CERRWARN += -_gcc=-Wno-clobbered 1029 CERRWARN += -_gcc=-Wno-unused-function 1030 CERRWARN += -_gcc=-Wno-address 1031 1032 # Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) 1033 # enables ASSERT() checking in the threads portion of the library. 1034 # This is automatically enabled for DEBUG builds, not for non-debug builds. 1035 THREAD_DEBUG = 1036 $(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 1037 1038 # Make string literals read-only to save memory. 1039 CFLAGS += $(XSTRCONST) 1040 1041 ALTPICS= $(TRACEOBJS:%=pics/%) 1042 1043 $(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) \ 1044 $(EXTPICS) $(LDLIBS) 1045 1046 MAPFILES = $(LIBCDIR)/port/mapfile-vers 1047 1048 # 1049 # EXTN_CPPFLAGS and EXTN_CFLAGS set in enclosing Makefile 1050 # 1051 CFLAGS += $(EXTN_CFLAGS) 1052 CPPFLAGS= -D_REENTRANT -Di386 $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \ 1053 -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master) 1054 ASFLAGS= $(AS_PICFLAGS) -P -D__STDC__ -D_ASM $(CPPFLAGS) $(i386_AS_XARCH) 1055 1056 # As a favor to the dtrace syscall provider, libc still calls the 1057 # old syscall traps that have been obsoleted by the *at() interfaces. 1058 # Delete this to compile libc using only the new *at() system call traps 1059 CPPFLAGS += -D_RETAIN_OLD_SYSCALLS 1060 1061 # Inform the run-time linker about libc specialized initialization 1062 RTLDINFO = -z rtldinfo=tls_rtldinfo 1063 DYNFLAGS += $(RTLDINFO) 1064 1065 # Force libc's internal references to be resolved immediately upon loading 1066 # in order to avoid critical region problems. Since almost all libc symbols 1067 # are marked 'protected' in the mapfiles, this is a minimal set (15 to 20). 1068 DYNFLAGS += -znow 1069 1070 DYNFLAGS += -e __rtboot 1071 DYNFLAGS += $(EXTN_DYNFLAGS) 1072 1073 # Inform the kernel about the initial DTrace area (in case 1074 # libc is being used as the interpreter / runtime linker). 1075 DTRACE_DATA = -zdtrace=dtrace_data 1076 DYNFLAGS += $(DTRACE_DATA) 1077 1078 # DTrace needs an executable data segment. 1079 MAPFILE.NED= 1080 1081 BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 1082 1083 # Override this top level flag so the compiler builds in its native 1084 # C99 mode. This has been enabled to support the complex arithmetic 1085 # added to libc. 1086 C99MODE= $(C99_ENABLE) 1087 1088 # libc method of building an archive 1089 # The "$(GREP) -v ' L '" part is necessary only until 1090 # lorder is fixed to ignore thread-local variables. 1091 BUILD.AR= $(RM) $@ ; \ 1092 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)` 1093 1094 # extra files for the clean target 1095 CLEANFILES= \ 1096 $(LIBCDIR)/port/gen/errlst.c \ 1097 $(LIBCDIR)/port/gen/new_list.c \ 1098 assym.h \ 1099 genassym \ 1100 crt/_rtld.s \ 1101 crt/_rtbootld.s \ 1102 pics/_rtbootld.o \ 1103 pics/crti.o \ 1104 pics/crtn.o \ 1105 $(ALTPICS) 1106 1107 CLOBBERFILES += $(LIB_PIC) 1108 1109 # list of C source for lint 1110 SRCS= \ 1111 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \ 1112 $(XATTROBJS:%.o=$(SRC)/common/xattr/%.c) \ 1113 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \ 1114 $(DTRACEOBJS:%.o=$(SRC)/common/dtrace/%.c) \ 1115 $(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c) \ 1116 $(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c) \ 1117 $(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c) \ 1118 $(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c) \ 1119 $(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c) \ 1120 $(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c) \ 1121 $(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c) \ 1122 $(PORTSYS:%.o=$(LIBCDIR)/port/sys/%.c) \ 1123 $(AIOOBJS:%.o=$(LIBCDIR)/port/aio/%.c) \ 1124 $(RTOBJS:%.o=$(LIBCDIR)/port/rt/%.c) \ 1125 $(TPOOLOBJS:%.o=$(LIBCDIR)/port/tpool/%.c) \ 1126 $(THREADSOBJS:%.o=$(LIBCDIR)/port/threads/%.c) \ 1127 $(THREADSMACHOBJS:%.o=$(LIBCDIR)/$(MACH)/threads/%.c) \ 1128 $(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c) \ 1129 $(UNWINDMACHOBJS:%.o=$(LIBCDIR)/port/unwind/%.c) \ 1130 $(FPOBJS:%.o=$(LIBCDIR)/$(MACH)/fp/%.c) \ 1131 $(LIBCBASE)/gen/ecvt.c \ 1132 $(LIBCBASE)/gen/makectxt.c \ 1133 $(LIBCBASE)/gen/siginfolst.c \ 1134 $(LIBCBASE)/gen/siglongjmp.c \ 1135 $(LIBCBASE)/gen/strcmp.c \ 1136 $(LIBCBASE)/gen/sync_instruction_memory.c \ 1137 $(LIBCBASE)/sys/ptrace.c \ 1138 $(LIBCBASE)/sys/uadmin.c 1139 1140 # conditional assignments 1141 $(DYNLIB) := CRTI = crti.o 1142 $(DYNLIB) := CRTN = crtn.o 1143 1144 # Files which need the threads .il inline template 1145 TIL= \ 1146 aio.o \ 1147 alloc.o \ 1148 assfail.o \ 1149 atexit.o \ 1150 atfork.o \ 1151 cancel.o \ 1152 door_calls.o \ 1153 err.o \ 1154 errno.o \ 1155 lwp.o \ 1156 ma.o \ 1157 machdep.o \ 1158 posix_aio.o \ 1159 pthr_attr.o \ 1160 pthr_barrier.o \ 1161 pthr_cond.o \ 1162 pthr_mutex.o \ 1163 pthr_rwlock.o \ 1164 pthread.o \ 1165 rand.o \ 1166 rwlock.o \ 1167 scalls.o \ 1168 sched.o \ 1169 sema.o \ 1170 sigaction.o \ 1171 sigev_thread.o \ 1172 spawn.o \ 1173 stack.o \ 1174 synch.o \ 1175 tdb_agent.o \ 1176 thr.o \ 1177 thread_interface.o \ 1178 thread_pool.o \ 1179 tls.o \ 1180 tsd.o \ 1181 unwind.o 1182 1183 THREADS_INLINES = $(LIBCBASE)/threads/i386.il 1184 $(TIL:%=pics/%) := CFLAGS += $(THREADS_INLINES) 1185 1186 # pics/mul64.o := CFLAGS += $(LIBCBASE)/crt/mul64.il 1187 1188 # large-file-aware components that should be built large 1189 1190 $(COMSYSOBJS64:%=pics/%) := \ 1191 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1192 1193 $(SYSOBJS64:%=pics/%) := \ 1194 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1195 1196 $(PORTGEN64:%=pics/%) := \ 1197 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1198 1199 $(PORTSTDIO64:%=pics/%) := \ 1200 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1201 1202 $(PORTSYS64:%=pics/%) := \ 1203 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1204 1205 $(PORTSTDIO_W:%=pics/%) := \ 1206 CPPFLAGS += -D_WIDE 1207 1208 $(PORTPRINT_W:%=pics/%) := \ 1209 CPPFLAGS += -D_WIDE 1210 1211 $(PORTPRINT_C89:%=pics/%) := \ 1212 CPPFLAGS += -D_C89_INTMAX32 1213 1214 $(PORTSTDIO_C89:%=pics/%) := \ 1215 CPPFLAGS += -D_C89_INTMAX32 1216 1217 $(PORTI18N_COND:%=pics/%) := \ 1218 CPPFLAGS += -D_WCS_LONGLONG 1219 1220 .KEEP_STATE: 1221 1222 all: $(LIBS) $(LIB_PIC) 1223 1224 lint := CPPFLAGS += -I$(LIBCDIR)/$(MACH)/fp 1225 lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99 1226 lint := LINTFLAGS += -mn -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED 1227 1228 lint: 1229 @echo $(LINT.c) ... 1230 @$(LINT.c) $(SRCS) $(LDLIBS) 1231 1232 $(LINTLIB):= SRCS=$(LIBCDIR)/port/llib-lc 1233 $(LINTLIB):= CPPFLAGS += -D_MSE_INT_H 1234 $(LINTLIB):= LINTFLAGS=-nvx 1235 1236 # object files that depend on inline template 1237 $(TIL:%=pics/%): $(LIBCBASE)/threads/i386.il 1238 # pics/mul64.o: $(LIBCBASE)/crt/mul64.il 1239 1240 # include common libc targets 1241 include $(LIBCDIR)/Makefile.targ 1242 1243 # We need to strip out all CTF and DOF data from the static library 1244 $(LIB_PIC) := DIR = pics 1245 $(LIB_PIC): pics $$(PICS) 1246 $(BUILD.AR) 1247 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1248 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1249 $(AR) -ts $@ > /dev/null 1250 $(POST_PROCESS_A) 1251 1252 $(LIBCBASE)/crt/_rtbootld.s: $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.c 1253 $(CC) $(CPPFLAGS) $(CTF_FLAGS) -O -S $(C_PICFLAGS) \ 1254 $(LIBCBASE)/crt/_rtld.c -o $(LIBCBASE)/crt/_rtld.s 1255 $(CAT) $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.s > $@ 1256 $(RM) $(LIBCBASE)/crt/_rtld.s 1257 1258 # partially built from C source 1259 pics/_rtbootld.o: $(LIBCBASE)/crt/_rtbootld.s 1260 $(AS) $(ASFLAGS) $(LIBCBASE)/crt/_rtbootld.s -o $@ 1261 $(CTFCONVERT_O) 1262 1263 ASSYMDEP_OBJS= \ 1264 _lwp_mutex_unlock.o \ 1265 _stack_grow.o \ 1266 getcontext.o \ 1267 setjmp.o \ 1268 tls_get_addr.o \ 1269 vforkx.o 1270 1271 $(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1272 1273 $(ASSYMDEP_OBJS:%=pics/%): assym.h 1274 1275 # assym.h build rules 1276 1277 GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c 1278 1279 genassym: $(GENASSYM_C) 1280 $(NATIVECC) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \ 1281 -D__EXTENSIONS__ $(CPPFLAGS.native) -o $@ $(GENASSYM_C) 1282 1283 OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1284 1285 assym.h: $(OFFSETS) genassym 1286 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1287 ./genassym >>$@ 1288 1289 # derived C source and related explicit dependencies 1290 $(LIBCDIR)/port/gen/errlst.c + \ 1291 $(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk 1292 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist 1293 1294 pics/errlst.o: $(LIBCDIR)/port/gen/errlst.c 1295 1296 pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c