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