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