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