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