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 2008 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 123GENOBJS= \ 124 _getsp.o \ 125 _xregs_clrptr.o \ 126 abs.o \ 127 alloca.o \ 128 byteorder.o \ 129 cuexit.o \ 130 ecvt.o \ 131 getctxt.o \ 132 lock.o \ 133 makectxt.o \ 134 memchr.o \ 135 memcmp.o \ 136 memcpy.o \ 137 memmove.o \ 138 memset.o \ 139 new_list.o \ 140 setjmp.o \ 141 siginfolst.o \ 142 siglongjmp.o \ 143 sparc_data.o \ 144 strcasecmp.o \ 145 strchr.o \ 146 strcmp.o \ 147 strcpy.o \ 148 strlcpy.o \ 149 strlen.o \ 150 strncmp.o \ 151 strncpy.o \ 152 strnlen.o \ 153 swapctxt.o \ 154 sync_instruction_memory.o 155 156# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 157# This macro should ALWAYS be empty; native APIs are already 'large file'. 158COMSYSOBJS64= 159 160SYSOBJS64= 161 162COMSYSOBJS= \ 163 __clock_timer.o \ 164 __getloadavg.o \ 165 __rusagesys.o \ 166 __signotify.o \ 167 __sigrt.o \ 168 __time.o \ 169 _lgrp_home_fast.o \ 170 _lgrpsys.o \ 171 _nfssys.o \ 172 _portfs.o \ 173 _pset.o \ 174 _rpcsys.o \ 175 _sigaction.o \ 176 _so_accept.o \ 177 _so_bind.o \ 178 _so_connect.o \ 179 _so_getpeername.o \ 180 _so_getsockname.o \ 181 _so_getsockopt.o \ 182 _so_listen.o \ 183 _so_recv.o \ 184 _so_recvfrom.o \ 185 _so_recvmsg.o \ 186 _so_send.o \ 187 _so_sendmsg.o \ 188 _so_sendto.o \ 189 _so_setsockopt.o \ 190 _so_shutdown.o \ 191 _so_socket.o \ 192 _so_socketpair.o \ 193 _sockconfig.o \ 194 access.o \ 195 acct.o \ 196 acl.o \ 197 adjtime.o \ 198 alarm.o \ 199 brk.o \ 200 chdir.o \ 201 chmod.o \ 202 chown.o \ 203 chroot.o \ 204 cladm.o \ 205 close.o \ 206 creat.o \ 207 dup.o \ 208 execve.o \ 209 exit.o \ 210 facl.o \ 211 fchdir.o \ 212 fchmod.o \ 213 fchown.o \ 214 fchroot.o \ 215 fcntl.o \ 216 fdsync.o \ 217 fpathconf.o \ 218 fstat.o \ 219 fstatfs.o \ 220 fstatvfs.o \ 221 getcpuid.o \ 222 getdents.o \ 223 getegid.o \ 224 geteuid.o \ 225 getgid.o \ 226 getgroups.o \ 227 gethrtime.o \ 228 getitimer.o \ 229 getmsg.o \ 230 getpid.o \ 231 getpmsg.o \ 232 getppid.o \ 233 getrlimit.o \ 234 getuid.o \ 235 gtty.o \ 236 install_utrap.o \ 237 ioctl.o \ 238 kaio.o \ 239 kill.o \ 240 lchown.o \ 241 link.o \ 242 llseek.o \ 243 lseek.o \ 244 lstat.o \ 245 memcntl.o \ 246 mincore.o \ 247 mkdir.o \ 248 mknod.o \ 249 mmap.o \ 250 mmapobjsys.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 posix_fadvise.o \ 510 posix_fallocate.o \ 511 posix_madvise.o \ 512 posix_memalign.o \ 513 priocntl.o \ 514 privlib.o \ 515 priv_str_xlate.o \ 516 psiginfo.o \ 517 psignal.o \ 518 pt.o \ 519 putpwent.o \ 520 putspent.o \ 521 raise.o \ 522 rand.o \ 523 random.o \ 524 rctlops.o \ 525 readdir.o \ 526 readdir_r.o \ 527 realpath.o \ 528 reboot.o \ 529 regexpr.o \ 530 remove.o \ 531 rewinddir.o \ 532 rindex.o \ 533 scandir.o \ 534 seekdir.o \ 535 select.o \ 536 setlabel.o \ 537 setpriority.o \ 538 settimeofday.o \ 539 sh_locks.o \ 540 sigflag.o \ 541 siglist.o \ 542 sigsend.o \ 543 sigsetops.o \ 544 ssignal.o \ 545 stack.o \ 546 str2sig.o \ 547 strcase_charmap.o \ 548 strcat.o \ 549 strcspn.o \ 550 strdup.o \ 551 strerror.o \ 552 strncat.o \ 553 strlcat.o \ 554 strncasecmp.o \ 555 strpbrk.o \ 556 strrchr.o \ 557 strsep.o \ 558 strsignal.o \ 559 strspn.o \ 560 strstr.o \ 561 strtod.o \ 562 strtoimax.o \ 563 strtok.o \ 564 strtok_r.o \ 565 strtoll.o \ 566 strtoull.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 doprnt.o \ 608 fprintf.o \ 609 printf.o \ 610 snprintf.o \ 611 sprintf.o \ 612 vfprintf.o \ 613 vprintf.o \ 614 vsnprintf.o \ 615 vsprintf.o \ 616 vwprintf.o \ 617 wprintf.o 618 619# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 620# This macro should ALWAYS be empty; native APIs are already 'large file'. 621PORTSTDIO64= 622 623PORTSTDIO_W= \ 624 doscan_w.o 625 626PORTSTDIO= \ 627 __extensions.o \ 628 _endopen.o \ 629 _filbuf.o \ 630 _findbuf.o \ 631 _flsbuf.o \ 632 _wrtchk.o \ 633 clearerr.o \ 634 ctermid.o \ 635 ctermid_r.o \ 636 cuserid.o \ 637 data.o \ 638 doscan.o \ 639 fdopen.o \ 640 feof.o \ 641 ferror.o \ 642 fgetc.o \ 643 fgets.o \ 644 fileno.o \ 645 flockf.o \ 646 flush.o \ 647 fopen.o \ 648 fpos.o \ 649 fputc.o \ 650 fputs.o \ 651 fread.o \ 652 fseek.o \ 653 fseeko.o \ 654 ftell.o \ 655 ftello.o \ 656 fwrite.o \ 657 getc.o \ 658 getchar.o \ 659 getpass.o \ 660 gets.o \ 661 getw.o \ 662 popen.o \ 663 putc.o \ 664 putchar.o \ 665 puts.o \ 666 putw.o \ 667 rewind.o \ 668 scanf.o \ 669 setbuf.o \ 670 setbuffer.o \ 671 setvbuf.o \ 672 system.o \ 673 tempnam.o \ 674 tmpfile.o \ 675 tmpnam_r.o \ 676 ungetc.o \ 677 mse.o \ 678 vscanf.o \ 679 vwscanf.o \ 680 wscanf.o 681 682PORTI18N= \ 683 __fgetwc_xpg5.o \ 684 __fgetws_xpg5.o \ 685 __fputwc_xpg5.o \ 686 __fputws_xpg5.o \ 687 __ungetwc_xpg5.o \ 688 getwchar.o \ 689 putwchar.o \ 690 putws.o \ 691 strtows.o \ 692 wcstoimax.o \ 693 wcstol.o \ 694 wcstoul.o \ 695 wcswcs.o \ 696 wscasecmp.o \ 697 wscat.o \ 698 wschr.o \ 699 wscmp.o \ 700 wscpy.o \ 701 wscspn.o \ 702 wsdup.o \ 703 wslen.o \ 704 wsncasecmp.o \ 705 wsncat.o \ 706 wsncmp.o \ 707 wsncpy.o \ 708 wspbrk.o \ 709 wsprintf.o \ 710 wsrchr.o \ 711 wsscanf.o \ 712 wsspn.o \ 713 wstod.o \ 714 wstok.o \ 715 wstol.o \ 716 wstoll.o \ 717 wsxfrm.o \ 718 wmemchr.o \ 719 wmemcmp.o \ 720 wmemcpy.o \ 721 wmemmove.o \ 722 wmemset.o \ 723 wcsstr.o \ 724 gettext.o \ 725 gettext_real.o \ 726 gettext_util.o \ 727 gettext_gnu.o \ 728 plural_parser.o \ 729 wdresolve.o \ 730 _ctype.o \ 731 isascii.o \ 732 toascii.o 733 734PORTI18N_COND= \ 735 wcstol_longlong.o \ 736 wcstoul_longlong.o 737 738AIOOBJS= \ 739 aio.o \ 740 aio_alloc.o \ 741 posix_aio.o 742 743RTOBJS= \ 744 clock_timer.o \ 745 mqueue.o \ 746 pos4obj.o \ 747 sched.o \ 748 sem.o \ 749 shm.o \ 750 sigev_thread.o 751 752TPOOLOBJS= \ 753 thread_pool.o 754 755THREADSOBJS= \ 756 alloc.o \ 757 assfail.o \ 758 cancel.o \ 759 door_calls.o \ 760 pthr_attr.o \ 761 pthr_barrier.o \ 762 pthr_cond.o \ 763 pthr_mutex.o \ 764 pthr_rwlock.o \ 765 pthread.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 fsmisc.o \ 809 fstatat.o \ 810 getpagesizes.o \ 811 getpeerucred.o \ 812 inst_sync.o \ 813 issetugid.o \ 814 label.o \ 815 libc_fcntl.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 933# Make string literals read-only to save memory. 934CFLAGS64 += $(XSTRCONST) 935 936ALTPICS= $(TRACEOBJS:%=pics/%) 937 938$(DYNLIB) := PICS += $(ROOTFS_LIBDIR64)/libc_i18n.a 939$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) 940 941MAPFILES = ../port/mapfile-vers mapfile-vers 942 943sparcv9_C_PICFLAGS= -K PIC 944CFLAGS64 += $(EXTN_CFLAGS) 945CPPFLAGS= -D_REENTRANT -Dsparc $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \ 946 -I$(LIBCBASE)/inc -I../inc $(CPPFLAGS.master) 947ASFLAGS= -K PIC -P -D__STDC__ -D_ASM -D__sparcv9 $(CPPFLAGS) \ 948 $(sparcv9_AS_XARCH) 949 950# Conditionally add support for making |wordexp()| check whether 951# /usr/bin/ksh is ksh93 or not 952include ../../../Makefile.ksh93switch 953CPPFLAGS += -DWORDEXP_KSH93=$(ON_BUILD_KSH93_AS_BINKSH) 954 955# Inform the run-time linker about libc specialized initialization 956RTLDINFO = -z rtldinfo=tls_rtldinfo 957DYNFLAGS += $(RTLDINFO) 958 959DYNFLAGS += $(EXTN_DYNFLAGS) 960 961BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 962 963# Override this top level flag so the compiler builds in its native 964# C99 mode. This has been enabled to support the complex arithmetic 965# added to libc. 966C99MODE= $(C99_ENABLE) 967 968# libc method of building an archive 969BUILD.AR= $(RM) $@ ; \ 970 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%)| $(TSORT)` 971 972# extra files for the clean target 973CLEANFILES= \ 974 ../port/gen/errlst.c \ 975 ../port/gen/new_list.c \ 976 assym.h \ 977 genassym \ 978 pics/crti.o \ 979 pics/crtn.o \ 980 $(ALTPICS) 981 982CLOBBERFILES += $(LIB_PIC) 983 984# list of C source for lint 985SRCS= \ 986 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \ 987 $(XATTROBJS:%.o=$(SRC)/common/xattr/%.c) \ 988 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \ 989 $(PORTFP:%.o=../port/fp/%.c) \ 990 $(PORTGEN:%.o=../port/gen/%.c) \ 991 $(PORTI18N:%.o=../port/i18n/%.c) \ 992 $(PORTPRINT:%.o=../port/print/%.c) \ 993 $(PORTREGEX:%.o=../port/regex/%.c) \ 994 $(PORTSTDIO:%.o=../port/stdio/%.c) \ 995 $(PORTSYS:%.o=../port/sys/%.c) \ 996 $(AIOOBJS:%.o=../port/aio/%.c) \ 997 $(RTOBJS:%.o=../port/rt/%.c) \ 998 $(TPOOLOBJS:%.o=../port/tpool/%.c) \ 999 $(THREADSOBJS:%.o=../port/threads/%.c) \ 1000 $(THREADSMACHOBJS:%.o=../$(MACH)/threads/%.c) \ 1001 $(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c) \ 1002 $(UNWINDMACHOBJS:%.o=../port/unwind/%.c) \ 1003 $(FPOBJS:%.o=../$(MACH)/fp/%.c) \ 1004 $(FPOBJS64:%.o=$(LIBCBASE)/fp/%.c) \ 1005 $(LIBCBASE)/crt/_ftou.c \ 1006 $(LIBCBASE)/gen/_xregs_clrptr.c \ 1007 $(LIBCBASE)/gen/byteorder.c \ 1008 $(LIBCBASE)/gen/ecvt.c \ 1009 $(LIBCBASE)/gen/getctxt.c \ 1010 $(LIBCBASE)/gen/makectxt.c \ 1011 $(LIBCBASE)/gen/siginfolst.c \ 1012 $(LIBCBASE)/gen/siglongjmp.c \ 1013 $(LIBCBASE)/gen/swapctxt.c 1014 1015# conditional assignments 1016$(DYNLIB) := CRTI = crti.o 1017$(DYNLIB) := CRTN = crtn.o 1018 1019# Files which need the threads .il inline template 1020TIL= \ 1021 aio.o \ 1022 alloc.o \ 1023 assfail.o \ 1024 atexit.o \ 1025 atfork.o \ 1026 cancel.o \ 1027 door_calls.o \ 1028 errno.o \ 1029 getctxt.o \ 1030 lwp.o \ 1031 ma.o \ 1032 machdep.o \ 1033 posix_aio.o \ 1034 pthr_attr.o \ 1035 pthr_barrier.o \ 1036 pthr_cond.o \ 1037 pthr_mutex.o \ 1038 pthr_rwlock.o \ 1039 pthread.o \ 1040 rand.o \ 1041 rwlock.o \ 1042 scalls.o \ 1043 sched.o \ 1044 sema.o \ 1045 sigaction.o \ 1046 sigev_thread.o \ 1047 spawn.o \ 1048 stack.o \ 1049 swapctxt.o \ 1050 synch.o \ 1051 tdb_agent.o \ 1052 thr.o \ 1053 thread_interface.o \ 1054 thread_pool.o \ 1055 tls.o \ 1056 tsd.o \ 1057 unwind.o 1058 1059$(TIL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/threads/sparcv9.il 1060 1061# Files in fp, port/fp subdirectories that need base.il inline template 1062IL= \ 1063 __flt_decim.o \ 1064 decimal_bin.o 1065 1066$(IL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/fp/base.il 1067 1068# Files in fp subdirectory which need __quad.il inline template 1069QIL= \ 1070 _Q_add.o \ 1071 _Q_cmp.o \ 1072 _Q_cmpe.o \ 1073 _Q_div.o \ 1074 _Q_dtoq.o \ 1075 _Q_fcc.o \ 1076 _Q_mul.o \ 1077 _Q_qtod.o \ 1078 _Q_qtoi.o \ 1079 _Q_qtos.o \ 1080 _Q_qtou.o \ 1081 _Q_sqrt.o \ 1082 _Q_stoq.o \ 1083 _Q_sub.o \ 1084 _Qp_qtox.o \ 1085 _Qp_qtoux.o 1086 1087$(QIL:%=pics/%) := CFLAGS64 += ../$(MACH)/fp/__quad.il 1088pics/_Qp%.o := CFLAGS64 += -I../$(MACH)/fp 1089pics/_Q%.o := sparcv9_COPTFLAG = -xO4 -xchip=ultra 1090 1091# Files in crt subdirectory which need muldiv64.il inline template 1092#CIL= mul64.o divrem64.o 1093#$(CIL:%=pics/%) := CFLAGS += $(LIBCBASE)/crt/mul64.il 1094 1095# large-file-aware components that should be built large 1096 1097#$(COMSYSOBJS64:%=pics/%) := \ 1098# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1099 1100#$(SYSOBJS64:%=pics/%) := \ 1101# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1102 1103#$(PORTGEN64:%=pics/%) := \ 1104# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1105 1106#$(PORTSTDIO64:%=pics/%) := \ 1107# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1108 1109#$(PORTSYS64:%=pics/%) := \ 1110# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1111 1112$(PORTSTDIO_W:%=pics/%) := \ 1113 CPPFLAGS += -D_WIDE 1114 1115$(PORTPRINT_W:%=pics/%) := \ 1116 CPPFLAGS += -D_WIDE 1117 1118$(PORTI18N_COND:%=pics/%) := \ 1119 CPPFLAGS += -D_WCS_LONGLONG 1120 1121# Files which need extra optimization 1122pics/getenv.o := sparcv9_COPTFLAG = -xO4 1123 1124.KEEP_STATE: 1125 1126all: $(LIBS) $(LIB_PIC) 1127 1128lint := CPPFLAGS += -I../$(MACH)/fp 1129lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99 1130lint := LINTFLAGS64 += -mn 1131 1132lint: 1133 @echo $(LINT.c) ... $(LDLIBS) 1134 @$(LINT.c) $(SRCS) $(LDLIBS) 1135 1136$(LINTLIB):= SRCS=../port/llib-lc 1137$(LINTLIB):= CPPFLAGS += -D_MSE_INT_H 1138$(LINTLIB):= LINTFLAGS64=-nvx -m64 1139 1140# object files that depend on inline template 1141$(TIL:%=pics/%): $(LIBCBASE)/threads/sparcv9.il 1142$(IL:%=pics/%): $(LIBCBASE)/fp/base.il 1143$(QIL:%=pics/%): ../$(MACH)/fp/__quad.il 1144#$(CIL:%=pics/%): $(LIBCBASE)/crt/muldiv64.il 1145 1146# include common libc targets 1147include ../Makefile.targ 1148 1149# We need to strip out all CTF and DOF data from the static library 1150$(LIB_PIC) := DIR = pics 1151$(LIB_PIC): pics $$(PICS) 1152 $(BUILD.AR) 1153 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1154 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1155 $(AR) -ts $@ > /dev/null 1156 $(POST_PROCESS_A) 1157 1158# special cases 1159#$(STRETS:%=pics/%): crt/stret.s 1160# $(AS) $(ASFLAGS) -DSTRET$(@F:stret%.o=%) crt/stret.s -o $@ 1161# $(POST_PROCESS_O) 1162 1163#crt/_rtbootld.s: crt/_rtboot.s crt/_rtld.c 1164# $(CC) $(CPPFLAGS) -O -S -K pic crt/_rtld.c -o crt/_rtld.s 1165# $(CAT) crt/_rtboot.s crt/_rtld.s > $@ 1166# $(RM) crt/_rtld.s 1167 1168ASSYMDEP_OBJS= \ 1169 _lwp_mutex_unlock.o \ 1170 _stack_grow.o \ 1171 asm_subr.o \ 1172 tls_get_addr.o \ 1173 unwind_frame.o \ 1174 vforkx.o 1175 1176$(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1177 1178$(ASSYMDEP_OBJS:%=pics/%): assym.h 1179 1180# assym.h build rules 1181 1182GENASSYM_C = ../$(MACH)/genassym.c 1183 1184# XXX A hack. Perhaps this should be 'CPPFLAGS.native' and 1185# live in Makefile.master 1186 1187CPPFLAGS.genassym = \ 1188 $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) 1189 1190genassym: $(GENASSYM_C) 1191 $(NATIVECC) -I$(LIBCBASE)/inc -I../inc \ 1192 $(CPPFLAGS.genassym) -o $@ $(GENASSYM_C) 1193 1194OFFSETS = ../$(MACH)/offsets.in 1195 1196assym.h: $(OFFSETS) genassym 1197 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1198 ./genassym >>$@ 1199 1200# derived C source and related explicit dependencies 1201../port/gen/new_list.c: ../port/gen/errlist ../port/gen/errlist.awk 1202 cd ../port/gen; pwd; $(AWK) -f errlist.awk < errlist 1203 1204pics/new_list.o: ../port/gen/new_list.c 1205