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