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 sidsys.o \ 819 siginterrupt.o \ 820 signal.o \ 821 sigpending.o \ 822 sigstack.o \ 823 tasksys.o \ 824 time.o \ 825 time_util.o \ 826 ucontext.o \ 827 ustat.o \ 828 zone.o 829 830PORTREGEX= \ 831 glob.o \ 832 regcmp.o \ 833 regex.o \ 834 wordexp.o 835 836VALUES= \ 837 values-Xa.o 838 839MOSTOBJS= \ 840 $(STRETS) \ 841 $(CRTOBJS) \ 842 $(DYNOBJS) \ 843 $(FPOBJS) \ 844 $(I386FPOBJS) \ 845 $(FPASMOBJS) \ 846 $(ATOMICOBJS) \ 847 $(COMOBJS) \ 848 $(GENOBJS) \ 849 $(PORTFP) \ 850 $(PORTGEN) \ 851 $(PORTGEN64) \ 852 $(PORTI18N) \ 853 $(PORTI18N_COND) \ 854 $(PORTPRINT) \ 855 $(PORTPRINT_W) \ 856 $(PORTREGEX) \ 857 $(PORTSTDIO) \ 858 $(PORTSTDIO64) \ 859 $(PORTSTDIO_W) \ 860 $(PORTSYS) \ 861 $(PORTSYS64) \ 862 $(AIOOBJS) \ 863 $(RTOBJS) \ 864 $(TPOOLOBJS) \ 865 $(THREADSOBJS) \ 866 $(THREADSMACHOBJS) \ 867 $(THREADSASMOBJS) \ 868 $(UNWINDMACHOBJS) \ 869 $(UNWINDASMOBJS) \ 870 $(COMSYSOBJS) \ 871 $(SYSOBJS) \ 872 $(COMSYSOBJS64) \ 873 $(SYSOBJS64) \ 874 $(VALUES) 875 876TRACEOBJS= \ 877 plockstat.o 878 879# NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 880# modules whose source is provided in the $(SRC)/lib/common directory. 881# This must be done because otherwise the Sun C compiler would insert 882# its own versions of these modules and those versions contain code 883# to call out to C++ initialization functions. Such C++ initialization 884# functions can call back into libc before thread initialization is 885# complete and this leads to segmentation violations and other problems. 886# Since libc contains no C++ code, linking with the minimal crti.o and 887# crtn.o modules is safe and avoids the problems described above. 888OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 889CRTSRCS= ../../common/amd64 890 891# include common library definitions 892include ../../Makefile.lib 893include ../../Makefile.lib.64 894 895# NOTE: libc_i18n.a will be part of libc.so.1. Therefore, the compilation 896# conditions such as the settings of CFLAGS and CPPFLAGS for the libc_i18n stuff 897# need to be compatible with the ones for the libc stuff. Whenever the changes 898# that affect the compilation conditions of libc happened, those for libc_i18n 899# also need to be updated. 900 901CFLAGS64 += $(CTF_FLAGS) 902 903# This is necessary to avoid problems with calling _ex_unwind(). 904# We probably don't want any inlining anyway. 905CFLAGS64 += -xinline= 906 907# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) 908# enables ASSERT() checking in the threads portion of the library. 909# This is automatically enabled for DEBUG builds, not for non-debug builds. 910THREAD_DEBUG = 911$(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 912 913CFLAGS64 += $(THREAD_DEBUG) 914 915ALTPICS= $(TRACEOBJS:%=pics/%) 916 917$(DYNLIB) := PICS += $(ROOTFS_LIBDIR64)/libc_i18n.a 918$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) 919 920MAPFILES = ../port/mapfile-vers mapfile-vers 921 922CPPFLAGS= -D_REENTRANT -D$(MACH64) -D__$(MACH64) \ 923 -I. -I$(LIBCBASE)/inc -I../inc $(CPPFLAGS.master) -I/usr/include 924ASFLAGS= $(AS_PICFLAGS) -P -D__STDC__ -D_ASM $(CPPFLAGS) \ 925 $(amd64_AS_XARCH) 926 927# Conditionally add support for making |wordexp()| check whether 928# /usr/bin/ksh is ksh93 or not 929include ../../../Makefile.ksh93switch 930CPPFLAGS += -DWORDEXP_KSH93=$(ON_BUILD_KSH93_AS_BINKSH) 931 932# Inform the run-time linker about libc specialized initialization 933RTLDINFO = -z rtldinfo=tls_rtldinfo 934DYNFLAGS += $(RTLDINFO) 935 936BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 937 938# Override this top level flag so the compiler builds in its native 939# C99 mode. This has been enabled to support the complex arithmetic 940# added to libc. 941C99MODE= $(C99_ENABLE) 942 943# libc method of building an archive 944BUILD.AR= $(RM) $@ ; \ 945 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%)| $(TSORT)` 946 947# extra files for the clean target 948CLEANFILES= \ 949 ../port/gen/errlst.c \ 950 ../port/gen/new_list.c \ 951 assym.h \ 952 genassym \ 953 crt/_rtld.s \ 954 pics/crti.o \ 955 pics/crtn.o \ 956 $(ALTPICS) 957 958CLOBBERFILES += $(LIB_PIC) 959 960# list of C source for lint 961SRCS= \ 962 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \ 963 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \ 964 $(PORTFP:%.o=../port/fp/%.c) \ 965 $(PORTGEN:%.o=../port/gen/%.c) \ 966 $(PORTI18N:%.o=../port/i18n/%.c) \ 967 $(PORTPRINT:%.o=../port/print/%.c) \ 968 $(PORTREGEX:%.o=../port/regex/%.c) \ 969 $(PORTSTDIO:%.o=../port/stdio/%.c) \ 970 $(PORTSYS:%.o=../port/sys/%.c) \ 971 $(AIOOBJS:%.o=../port/aio/%.c) \ 972 $(RTOBJS:%.o=../port/rt/%.c) \ 973 $(TPOOLOBJS:%.o=../port/tpool/%.c) \ 974 $(THREADSOBJS:%.o=../port/threads/%.c) \ 975 $(THREADSMACHOBJS:%.o=threads/%.c) \ 976 $(UNWINDMACHOBJS:%.o=unwind/%.c) \ 977 $(FPOBJS:%.o=fp/%.c) \ 978 $(I386FPOBJS:%.o=../i386/fp/%.c) \ 979 $(LIBCBASE)/gen/ecvt.c \ 980 $(LIBCBASE)/gen/lexp10.c \ 981 $(LIBCBASE)/gen/llog10.c \ 982 $(LIBCBASE)/gen/ltostr.c \ 983 $(LIBCBASE)/gen/makectxt.c \ 984 $(LIBCBASE)/gen/siginfolst.c \ 985 $(LIBCBASE)/gen/siglongjmp.c \ 986 $(LIBCBASE)/gen/sync_instruction_memory.c \ 987 $(LIBCBASE)/sys/uadmin.c 988 989# conditional assignments 990# $(DYNLIB) $(LIB_PIC) := DYNOBJS = _rtbootld.o 991$(DYNLIB) := CRTI = crti.o 992$(DYNLIB) := CRTN = crtn.o 993 994# Files which need the threads .il inline template 995TIL= \ 996 aio.o \ 997 alloc.o \ 998 assfail.o \ 999 atexit.o \ 1000 atfork.o \ 1001 cancel.o \ 1002 door_calls.o \ 1003 errno.o \ 1004 lwp.o \ 1005 ma.o \ 1006 machdep.o \ 1007 posix_aio.o \ 1008 pthr_attr.o \ 1009 pthr_barrier.o \ 1010 pthr_cond.o \ 1011 pthr_mutex.o \ 1012 pthr_rwlock.o \ 1013 pthread.o \ 1014 rand.o \ 1015 rtsched.o \ 1016 rwlock.o \ 1017 scalls.o \ 1018 sema.o \ 1019 sigaction.o \ 1020 sigev_thread.o \ 1021 spawn.o \ 1022 stack.o \ 1023 synch.o \ 1024 tdb_agent.o \ 1025 thr.o \ 1026 thread_interface.o \ 1027 thread_pool.o \ 1028 thrp_unwind.o \ 1029 tls.o \ 1030 tsd.o 1031 1032$(TIL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/threads/amd64.il 1033 1034# pics/mul64.o := CFLAGS64 += crt/mul64.il 1035 1036# large-file-aware components that should be built large 1037 1038#$(COMSYSOBJS64:%=pics/%) := \ 1039# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1040 1041#$(SYSOBJS64:%=pics/%) := \ 1042# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1043 1044#$(PORTGEN64:%=pics/%) := \ 1045# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1046 1047#$(PORTSTDIO64:%=pics/%) := \ 1048# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1049 1050#$(PORTSYS64:%=pics/%) := \ 1051# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1052 1053$(PORTSTDIO_W:%=pics/%) := \ 1054 CPPFLAGS += -D_WIDE 1055 1056$(PORTPRINT_W:%=pics/%) := \ 1057 CPPFLAGS += -D_WIDE 1058 1059$(PORTPRINT_C89:%=pics/%) := \ 1060 CPPFLAGS += -D_C89_INTMAX32 1061 1062$(PORTSTDIO_C89:%=pics/%) := \ 1063 CPPFLAGS += -D_C89_INTMAX32 1064 1065$(PORTI18N_COND:%=pics/%) := \ 1066 CPPFLAGS += -D_WCS_LONGLONG 1067 1068.KEEP_STATE: 1069 1070all: $(LIBS) $(LIB_PIC) 1071 1072lint := CPPFLAGS += -I../$(MACH)/fp 1073lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99 1074lint := LINTFLAGS64 += -mn -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED 1075 1076lint: 1077 @echo $(LINT.c) ... $(LDLIBS) 1078 @$(LINT.c) $(SRCS) $(LDLIBS) 1079 1080$(LINTLIB):= SRCS=../port/llib-lc 1081$(LINTLIB):= CPPFLAGS += -D_MSE_INT_H 1082$(LINTLIB):= LINTFLAGS64=-nvx -Xarch=amd64 1083 1084# object files that depend on inline template 1085$(TIL:%=pics/%): $(LIBCBASE)/threads/amd64.il 1086# pics/mul64.o: crt/mul64.il 1087 1088# include common libc targets 1089include ../Makefile.targ 1090 1091# We need to strip out all CTF data from the static library 1092$(LIB_PIC) := DIR = pics 1093$(LIB_PIC): pics $$(PICS) 1094 $(BUILD.AR) 1095 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1096 $(AR) -ts $@ > /dev/null 1097 $(POST_PROCESS_A) 1098 1099ASSYMDEP_OBJS= \ 1100 _lwp_mutex_unlock.o \ 1101 _stack_grow.o \ 1102 asm_subr.o \ 1103 getcontext.o \ 1104 tls_get_addr.o \ 1105 vforkx.o 1106 1107$(ASSYMDEP_OBJS:%=pics/%): assym.h 1108 1109# assym.h build rules 1110 1111GENASSYM_C = genassym.c 1112 1113# XXX A hack. Perhaps this should be 'CPPFLAGS.native' and 1114# live in Makefile.master 1115 1116CPPFLAGS.genassym = \ 1117 $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) 1118 1119genassym: $(GENASSYM_C) 1120 $(NATIVECC) -Iinc -I../inc $(CPPFLAGS.genassym) -o $@ $(GENASSYM_C) 1121 1122OFFSETS = ../$(MACH)/offsets.in 1123 1124assym.h: $(OFFSETS) genassym 1125 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1126 ./genassym >>$@ 1127 1128# derived C source and related explicit dependencies 1129../port/gen/errlst.c + \ 1130../port/gen/new_list.c: ../port/gen/errlist ../port/gen/errlist.awk 1131 cd ../port/gen; pwd; $(AWK) -f errlist.awk < errlist 1132 1133pics/errlst.o: ../port/gen/errlst.c 1134 1135pics/new_list.o: ../port/gen/new_list.c 1136