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