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 2010 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 ascii.o \ 709 big5.o \ 710 btowc.o \ 711 collate.o \ 712 collcmp.o \ 713 euc.o \ 714 fnmatch.o \ 715 fgetwc.o \ 716 fgetws.o \ 717 fix_grouping.o \ 718 fputwc.o \ 719 fputws.o \ 720 fwide.o \ 721 gb18030.o \ 722 gb2312.o \ 723 gbk.o \ 724 getdate.o \ 725 iswctype.o \ 726 ldpart.o \ 727 lmessages.o \ 728 lnumeric.o \ 729 lmonetary.o \ 730 localeconv.o \ 731 mbftowc.o \ 732 mblen.o \ 733 mbrlen.o \ 734 mbrtowc.o \ 735 mbsinit.o \ 736 mbsnrtowcs.o \ 737 mbsrtowcs.o \ 738 mbstowcs.o \ 739 mbtowc.o \ 740 mskanji.o \ 741 nextwctype.o \ 742 nl_langinfo.o \ 743 none.o \ 744 regcomp.o \ 745 regfree.o \ 746 regerror.o \ 747 regexec.o \ 748 rune.o \ 749 runetype.o \ 750 setlocale.o \ 751 setrunelocale.o \ 752 strcoll.o \ 753 strfmon.o \ 754 strftime.o \ 755 strptime.o \ 756 strxfrm.o \ 757 table.o \ 758 timelocal.o \ 759 tolower.o \ 760 towlower.o \ 761 ungetwc.o \ 762 utf8.o \ 763 wcrtomb.o \ 764 wcscoll.o \ 765 wcsftime.o \ 766 wcsnrtombs.o \ 767 wcsrtombs.o \ 768 wcswidth.o \ 769 wcstombs.o \ 770 wcsxfrm.o \ 771 wctob.o \ 772 wctomb.o \ 773 wctrans.o \ 774 wctype.o \ 775 wcwidth.o \ 776 wscol.o 777 778AIOOBJS= \ 779 aio.o \ 780 aio_alloc.o \ 781 posix_aio.o 782 783RTOBJS= \ 784 clock_timer.o \ 785 mqueue.o \ 786 pos4obj.o \ 787 sched.o \ 788 sem.o \ 789 shm.o \ 790 sigev_thread.o 791 792TPOOLOBJS= \ 793 thread_pool.o 794 795THREADSOBJS= \ 796 alloc.o \ 797 assfail.o \ 798 cancel.o \ 799 door_calls.o \ 800 pthr_attr.o \ 801 pthr_barrier.o \ 802 pthr_cond.o \ 803 pthr_mutex.o \ 804 pthr_rwlock.o \ 805 pthread.o \ 806 rwlock.o \ 807 scalls.o \ 808 sema.o \ 809 sigaction.o \ 810 spawn.o \ 811 synch.o \ 812 tdb_agent.o \ 813 thr.o \ 814 thread_interface.o \ 815 tls.o \ 816 tsd.o 817 818THREADSMACHOBJS= \ 819 machdep.o 820 821THREADSASMOBJS= \ 822 asm_subr.o 823 824UNICODEOBJS= \ 825 u8_textprep.o \ 826 uconv.o 827 828UNWINDMACHOBJS= \ 829 call_frame_inst.o \ 830 eh_frame.o \ 831 thrp_unwind.o \ 832 unwind.o 833 834pics/unwind.o:= COPTFLAG64 = 835 836UNWINDASMOBJS= \ 837 unwind_frame.o 838 839# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 840# This macro should ALWAYS be empty; native APIs are already 'large file'. 841PORTSYS64= 842 843PORTSYS= \ 844 _autofssys.o \ 845 access.o \ 846 acctctl.o \ 847 bsd_signal.o \ 848 chmod.o \ 849 chown.o \ 850 corectl.o \ 851 exacctsys.o \ 852 execl.o \ 853 execle.o \ 854 execv.o \ 855 fcntl.o \ 856 getpagesizes.o \ 857 getpeerucred.o \ 858 inst_sync.o \ 859 issetugid.o \ 860 label.o \ 861 link.o \ 862 lockf.o \ 863 lwp.o \ 864 lwp_cond.o \ 865 lwp_rwlock.o \ 866 lwp_sigmask.o \ 867 meminfosys.o \ 868 mkdir.o \ 869 mknod.o \ 870 msgsys.o \ 871 nfssys.o \ 872 open.o \ 873 pgrpsys.o \ 874 posix_sigwait.o \ 875 ppriv.o \ 876 psetsys.o \ 877 rctlsys.o \ 878 readlink.o \ 879 rename.o \ 880 sbrk.o \ 881 semsys.o \ 882 set_errno.o \ 883 sharefs.o \ 884 shmsys.o \ 885 sidsys.o \ 886 siginterrupt.o \ 887 signal.o \ 888 sigpending.o \ 889 sigstack.o \ 890 stat.o \ 891 symlink.o \ 892 tasksys.o \ 893 time.o \ 894 time_util.o \ 895 ucontext.o \ 896 unlink.o \ 897 ustat.o \ 898 utimesys.o \ 899 zone.o 900 901PORTREGEX= \ 902 glob.o \ 903 regcmp.o \ 904 regex.o \ 905 wordexp.o 906 907VALUES= \ 908 values-Xa.o 909 910MOSTOBJS= \ 911 $(STRETS) \ 912 $(CRTOBJS) \ 913 $(DYNOBJS) \ 914 $(FPOBJS) \ 915 $(I386FPOBJS) \ 916 $(FPASMOBJS) \ 917 $(ATOMICOBJS) \ 918 $(XATTROBJS) \ 919 $(COMOBJS) \ 920 $(GENOBJS) \ 921 $(PORTFP) \ 922 $(PORTGEN) \ 923 $(PORTGEN64) \ 924 $(PORTI18N) \ 925 $(PORTI18N_COND) \ 926 $(PORTLOCALE) \ 927 $(PORTPRINT) \ 928 $(PORTPRINT_W) \ 929 $(PORTREGEX) \ 930 $(PORTSTDIO) \ 931 $(PORTSTDIO64) \ 932 $(PORTSTDIO_W) \ 933 $(PORTSYS) \ 934 $(PORTSYS64) \ 935 $(AIOOBJS) \ 936 $(RTOBJS) \ 937 $(TPOOLOBJS) \ 938 $(THREADSOBJS) \ 939 $(THREADSMACHOBJS) \ 940 $(THREADSASMOBJS) \ 941 $(UNICODEOBJS) \ 942 $(UNWINDMACHOBJS) \ 943 $(UNWINDASMOBJS) \ 944 $(COMSYSOBJS) \ 945 $(SYSOBJS) \ 946 $(COMSYSOBJS64) \ 947 $(SYSOBJS64) \ 948 $(VALUES) 949 950TRACEOBJS= \ 951 plockstat.o 952 953# NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 954# modules whose source is provided in the $(SRC)/lib/common directory. 955# This must be done because otherwise the Sun C compiler would insert 956# its own versions of these modules and those versions contain code 957# to call out to C++ initialization functions. Such C++ initialization 958# functions can call back into libc before thread initialization is 959# complete and this leads to segmentation violations and other problems. 960# Since libc contains no C++ code, linking with the minimal crti.o and 961# crtn.o modules is safe and avoids the problems described above. 962OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 963CRTSRCS= ../../common/amd64 964 965# include common library definitions 966include ../../Makefile.lib 967include ../../Makefile.lib.64 968 969CFLAGS64 += $(CTF_FLAGS) 970 971# This is necessary to avoid problems with calling _ex_unwind(). 972# We probably don't want any inlining anyway. 973CFLAGS64 += -xinline= 974 975# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) 976# enables ASSERT() checking in the threads portion of the library. 977# This is automatically enabled for DEBUG builds, not for non-debug builds. 978THREAD_DEBUG = 979$(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 980 981# Make string literals read-only to save memory 982CFLAGS64 += $(XSTRCONST) 983 984ALTPICS= $(TRACEOBJS:%=pics/%) 985 986$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS) 987 988MAPFILES = $(LIBCDIR)/port/mapfile-vers 989 990CPPFLAGS= -D_REENTRANT -D$(MACH64) -D__$(MACH64) $(THREAD_DEBUG) \ 991 -I. -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master) 992ASFLAGS= $(AS_PICFLAGS) -P -D__STDC__ -D_ASM $(CPPFLAGS) \ 993 $(amd64_AS_XARCH) 994 995# As a favor to the dtrace syscall provider, libc still calls the 996# old syscall traps that have been obsoleted by the *at() interfaces. 997# Delete this to compile libc using only the new *at() system call traps 998CPPFLAGS += -D_RETAIN_OLD_SYSCALLS 999 1000# proc64_id.o is built with defines in $(SRC)/uts/intel/sys/x86_archext.h 1001pics/proc64_id.o := CFLAGS64 += -I$(SRC)/uts/intel 1002 1003# Inform the run-time linker about libc specialized initialization 1004RTLDINFO = -z rtldinfo=tls_rtldinfo 1005DYNFLAGS += $(RTLDINFO) 1006 1007# Force libc's internal references to be resolved immediately upon loading 1008# in order to avoid critical region problems. Since almost all libc symbols 1009# are marked 'protected' in the mapfiles, this is a minimal set (15 to 20). 1010DYNFLAGS += -znow 1011 1012BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 1013 1014# Override this top level flag so the compiler builds in its native 1015# C99 mode. This has been enabled to support the complex arithmetic 1016# added to libc. 1017C99MODE= $(C99_ENABLE) 1018 1019# libc method of building an archive 1020# The "$(GREP) -v ' L '" part is necessary only until 1021# lorder is fixed to ignore thread-local variables. 1022BUILD.AR= $(RM) $@ ; \ 1023 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)` 1024 1025# extra files for the clean target 1026CLEANFILES= \ 1027 $(LIBCDIR)/port/gen/errlst.c \ 1028 $(LIBCDIR)/port/gen/new_list.c \ 1029 assym.h \ 1030 genassym \ 1031 crt/_rtld.s \ 1032 pics/crti.o \ 1033 pics/crtn.o \ 1034 $(ALTPICS) 1035 1036CLOBBERFILES += $(LIB_PIC) 1037 1038# list of C source for lint 1039SRCS= \ 1040 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \ 1041 $(XATTROBJS:%.o=$(SRC)/common/xattr/%.c) \ 1042 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \ 1043 $(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c) \ 1044 $(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c) \ 1045 $(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c) \ 1046 $(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c) \ 1047 $(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c) \ 1048 $(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c) \ 1049 $(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c) \ 1050 $(PORTSYS:%.o=$(LIBCDIR)/port/sys/%.c) \ 1051 $(AIOOBJS:%.o=$(LIBCDIR)/port/aio/%.c) \ 1052 $(RTOBJS:%.o=$(LIBCDIR)/port/rt/%.c) \ 1053 $(TPOOLOBJS:%.o=$(LIBCDIR)/port/tpool/%.c) \ 1054 $(THREADSOBJS:%.o=$(LIBCDIR)/port/threads/%.c) \ 1055 $(THREADSMACHOBJS:%.o=threads/%.c) \ 1056 $(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c) \ 1057 $(UNWINDMACHOBJS:%.o=unwind/%.c) \ 1058 $(FPOBJS:%.o=fp/%.c) \ 1059 $(I386FPOBJS:%.o=$(LIBCDIR)/i386/fp/%.c) \ 1060 $(LIBCBASE)/gen/ecvt.c \ 1061 $(LIBCBASE)/gen/makectxt.c \ 1062 $(LIBCBASE)/gen/siginfolst.c \ 1063 $(LIBCBASE)/gen/siglongjmp.c \ 1064 $(LIBCBASE)/gen/sync_instruction_memory.c \ 1065 $(LIBCBASE)/sys/uadmin.c 1066 1067# conditional assignments 1068# $(DYNLIB) $(LIB_PIC) := DYNOBJS = _rtbootld.o 1069$(DYNLIB) := CRTI = crti.o 1070$(DYNLIB) := CRTN = crtn.o 1071 1072# Files which need the threads .il inline template 1073TIL= \ 1074 aio.o \ 1075 alloc.o \ 1076 assfail.o \ 1077 atexit.o \ 1078 atfork.o \ 1079 cancel.o \ 1080 door_calls.o \ 1081 err.o \ 1082 errno.o \ 1083 lwp.o \ 1084 ma.o \ 1085 machdep.o \ 1086 posix_aio.o \ 1087 pthr_attr.o \ 1088 pthr_barrier.o \ 1089 pthr_cond.o \ 1090 pthr_mutex.o \ 1091 pthr_rwlock.o \ 1092 pthread.o \ 1093 rand.o \ 1094 rwlock.o \ 1095 scalls.o \ 1096 sched.o \ 1097 sema.o \ 1098 sigaction.o \ 1099 sigev_thread.o \ 1100 spawn.o \ 1101 stack.o \ 1102 synch.o \ 1103 tdb_agent.o \ 1104 thr.o \ 1105 thread_interface.o \ 1106 thread_pool.o \ 1107 thrp_unwind.o \ 1108 tls.o \ 1109 tsd.o 1110 1111$(TIL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/threads/amd64.il 1112 1113# pics/mul64.o := CFLAGS64 += crt/mul64.il 1114 1115# large-file-aware components that should be built large 1116 1117#$(COMSYSOBJS64:%=pics/%) := \ 1118# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1119 1120#$(SYSOBJS64:%=pics/%) := \ 1121# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1122 1123#$(PORTGEN64:%=pics/%) := \ 1124# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1125 1126#$(PORTSTDIO64:%=pics/%) := \ 1127# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1128 1129#$(PORTSYS64:%=pics/%) := \ 1130# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1131 1132$(PORTSTDIO_W:%=pics/%) := \ 1133 CPPFLAGS += -D_WIDE 1134 1135$(PORTPRINT_W:%=pics/%) := \ 1136 CPPFLAGS += -D_WIDE 1137 1138$(PORTPRINT_C89:%=pics/%) := \ 1139 CPPFLAGS += -D_C89_INTMAX32 1140 1141$(PORTSTDIO_C89:%=pics/%) := \ 1142 CPPFLAGS += -D_C89_INTMAX32 1143 1144$(PORTI18N_COND:%=pics/%) := \ 1145 CPPFLAGS += -D_WCS_LONGLONG 1146 1147.KEEP_STATE: 1148 1149all: $(LIBS) $(LIB_PIC) 1150 1151lint := CPPFLAGS += -I$(LIBCDIR)/$(MACH)/fp 1152lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99 1153lint := LINTFLAGS64 += -mn -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED 1154 1155lint: 1156 @echo $(LINT.c) ... $(LDLIBS) 1157 @$(LINT.c) $(SRCS) $(LDLIBS) 1158 1159$(LINTLIB):= SRCS=$(LIBCDIR)/port/llib-lc 1160$(LINTLIB):= CPPFLAGS += -D_MSE_INT_H 1161$(LINTLIB):= LINTFLAGS64=-nvx -m64 1162 1163# object files that depend on inline template 1164$(TIL:%=pics/%): $(LIBCBASE)/threads/amd64.il 1165# pics/mul64.o: crt/mul64.il 1166 1167# include common libc targets 1168include ../Makefile.targ 1169 1170# We need to strip out all CTF data from the static library 1171$(LIB_PIC) := DIR = pics 1172$(LIB_PIC): pics $$(PICS) 1173 $(BUILD.AR) 1174 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1175 $(AR) -ts $@ > /dev/null 1176 $(POST_PROCESS_A) 1177 1178ASSYMDEP_OBJS= \ 1179 _lwp_mutex_unlock.o \ 1180 _stack_grow.o \ 1181 asm_subr.o \ 1182 getcontext.o \ 1183 setjmp.o \ 1184 tls_get_addr.o \ 1185 vforkx.o 1186 1187$(ASSYMDEP_OBJS:%=pics/%): assym.h 1188 1189# assym.h build rules 1190 1191GENASSYM_C = genassym.c 1192 1193genassym: $(GENASSYM_C) 1194 $(NATIVECC) -Iinc -I$(LIBCDIR)/inc $(CPPFLAGS.native) \ 1195 -o $@ $(GENASSYM_C) 1196 1197OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1198 1199assym.h: $(OFFSETS) genassym 1200 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1201 ./genassym >>$@ 1202 1203# derived C source and related explicit dependencies 1204$(LIBCDIR)/port/gen/errlst.c + \ 1205$(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk 1206 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist 1207 1208pics/errlst.o: $(LIBCDIR)/port/gen/errlst.c 1209 1210pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c 1211