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