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