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