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