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