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