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