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 110COMOBJS= \ 111 bcmp.o \ 112 bcopy.o \ 113 bsearch.o \ 114 bzero.o \ 115 ffs.o \ 116 memccpy.o \ 117 qsort.o \ 118 strtol.o \ 119 strtoul.o 120 121GENOBJS= \ 122 _getsp.o \ 123 _xregs_clrptr.o \ 124 abs.o \ 125 alloca.o \ 126 byteorder.o \ 127 cuexit.o \ 128 ecvt.o \ 129 getctxt.o \ 130 lexp10.o \ 131 llog10.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 __fcntl.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 _rename.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 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 getpagesizes.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 modctl.o \ 253 mount.o \ 254 mprotect.o \ 255 munmap.o \ 256 nice.o \ 257 ntp_adjtime.o \ 258 ntp_gettime.o \ 259 open.o \ 260 p_online.o \ 261 pathconf.o \ 262 pause.o \ 263 pcsample.o \ 264 pollsys.o \ 265 pread.o \ 266 priocntlset.o \ 267 processor_bind.o \ 268 processor_info.o \ 269 profil.o \ 270 putmsg.o \ 271 putpmsg.o \ 272 pwrite.o \ 273 read.o \ 274 readlink.o \ 275 readv.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 syssun.o \ 327 tls_get_addr.o \ 328 uadmin.o \ 329 umount.o \ 330 uname.o \ 331 vforkx.o 332 333# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 334# This macro should ALWAYS be empty; native APIs are already 'large file'. 335PORTGEN64= 336 337# objects from source under ../port 338PORTFP= \ 339 __flt_decim.o \ 340 __flt_rounds.o \ 341 __tbl_10_b.o \ 342 __tbl_10_h.o \ 343 __tbl_10_s.o \ 344 __tbl_2_b.o \ 345 __tbl_2_h.o \ 346 __tbl_2_s.o \ 347 __tbl_fdq.o \ 348 __tbl_tens.o \ 349 __x_power.o \ 350 _base_sup.o \ 351 aconvert.o \ 352 decimal_bin.o \ 353 double_decim.o \ 354 econvert.o \ 355 fconvert.o \ 356 file_decim.o \ 357 finite.o \ 358 fp_data.o \ 359 func_decim.o \ 360 gconvert.o \ 361 hex_bin.o \ 362 ieee_globals.o \ 363 pack_float.o \ 364 sigfpe.o \ 365 string_decim.o 366 367PORTGEN= \ 368 _env_data.o \ 369 _xftw.o \ 370 a64l.o \ 371 abort.o \ 372 addsev.o \ 373 assert.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 errno.o \ 407 euclen.o \ 408 event_port.o \ 409 execvp.o \ 410 fattach.o \ 411 fdetach.o \ 412 fdopendir.o \ 413 fmtmsg.o \ 414 ftime.o \ 415 ftok.o \ 416 ftw.o \ 417 gcvt.o \ 418 getauxv.o \ 419 getcwd.o \ 420 getdate_err.o \ 421 getdtblsize.o \ 422 getenv.o \ 423 getexecname.o \ 424 getgrnam.o \ 425 getgrnam_r.o \ 426 gethostid.o \ 427 gethostname.o \ 428 gethz.o \ 429 getisax.o \ 430 getloadavg.o \ 431 getlogin.o \ 432 getmntent.o \ 433 getnetgrent.o \ 434 getopt.o \ 435 getopt_long.o \ 436 getpagesize.o \ 437 getpw.o \ 438 getpwnam.o \ 439 getpwnam_r.o \ 440 getrusage.o \ 441 getspent.o \ 442 getspent_r.o \ 443 getsubopt.o \ 444 gettxt.o \ 445 getusershell.o \ 446 getut.o \ 447 getutx.o \ 448 getvfsent.o \ 449 getwd.o \ 450 getwidth.o \ 451 getxby_door.o \ 452 gtxt.o \ 453 hsearch.o \ 454 iconv.o \ 455 imaxabs.o \ 456 imaxdiv.o \ 457 index.o \ 458 initgroups.o \ 459 insque.o \ 460 isaexec.o \ 461 isastream.o \ 462 isatty.o \ 463 killpg.o \ 464 l64a.o \ 465 lckpwdf.o \ 466 lconstants.o \ 467 ldivide.o \ 468 lfind.o \ 469 lfmt.o \ 470 lfmt_log.o \ 471 lldiv.o \ 472 lltostr.o \ 473 lmath.o \ 474 localtime.o \ 475 lsearch.o \ 476 madvise.o \ 477 malloc.o \ 478 memalign.o \ 479 mkdev.o \ 480 mkdtemp.o \ 481 mkfifo.o \ 482 mkstemp.o \ 483 mktemp.o \ 484 mlock.o \ 485 mlockall.o \ 486 mon.o \ 487 msync.o \ 488 munlock.o \ 489 munlockall.o \ 490 ndbm.o \ 491 nftw.o \ 492 nlspath_checks.o \ 493 nsparse.o \ 494 nss_common.o \ 495 nss_dbdefs.o \ 496 nss_deffinder.o \ 497 opendir.o \ 498 opt_data.o \ 499 perror.o \ 500 pfmt.o \ 501 pfmt_data.o \ 502 pfmt_print.o \ 503 plock.o \ 504 poll.o \ 505 priocntl.o \ 506 privlib.o \ 507 priv_str_xlate.o \ 508 psiginfo.o \ 509 psignal.o \ 510 pt.o \ 511 putpwent.o \ 512 putspent.o \ 513 raise.o \ 514 rand.o \ 515 random.o \ 516 rctlops.o \ 517 readdir.o \ 518 readdir_r.o \ 519 realpath.o \ 520 reboot.o \ 521 regexpr.o \ 522 rename.o \ 523 rewinddir.o \ 524 rindex.o \ 525 scandir.o \ 526 seekdir.o \ 527 select.o \ 528 setlabel.o \ 529 setpriority.o \ 530 settimeofday.o \ 531 sh_locks.o \ 532 sigflag.o \ 533 siglist.o \ 534 sigsend.o \ 535 sigsetops.o \ 536 ssignal.o \ 537 stack.o \ 538 str2sig.o \ 539 strcase_charmap.o \ 540 strcat.o \ 541 strcspn.o \ 542 strdup.o \ 543 strerror.o \ 544 strncat.o \ 545 strlcat.o \ 546 strncasecmp.o \ 547 strpbrk.o \ 548 strrchr.o \ 549 strsignal.o \ 550 strspn.o \ 551 strstr.o \ 552 strtod.o \ 553 strtoimax.o \ 554 strtok.o \ 555 strtok_r.o \ 556 strtoll.o \ 557 strtoull.o \ 558 strtoumax.o \ 559 swab.o \ 560 swapctl.o \ 561 sysconf.o \ 562 syslog.o \ 563 tcdrain.o \ 564 tcflow.o \ 565 tcflush.o \ 566 tcgetattr.o \ 567 tcgetpgrp.o \ 568 tcgetsid.o \ 569 tcsendbreak.o \ 570 tcsetattr.o \ 571 tcsetpgrp.o \ 572 tell.o \ 573 telldir.o \ 574 tfind.o \ 575 time_data.o \ 576 time_gdata.o \ 577 truncate.o \ 578 tsdalloc.o \ 579 tsearch.o \ 580 ttyname.o \ 581 ttyslot.o \ 582 ualarm.o \ 583 ucred.o \ 584 valloc.o \ 585 vlfmt.o \ 586 vpfmt.o \ 587 wait3.o \ 588 wait4.o \ 589 waitpid.o \ 590 walkstack.o \ 591 wdata.o \ 592 xgetwidth.o \ 593 xpg4.o \ 594 xpg6.o 595 596PORTPRINT_W= \ 597 doprnt_w.o 598 599PORTPRINT= \ 600 doprnt.o \ 601 fprintf.o \ 602 printf.o \ 603 snprintf.o \ 604 sprintf.o \ 605 vfprintf.o \ 606 vprintf.o \ 607 vsnprintf.o \ 608 vsprintf.o \ 609 vwprintf.o \ 610 wprintf.o 611 612# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 613# This macro should ALWAYS be empty; native APIs are already 'large file'. 614PORTSTDIO64= 615 616PORTSTDIO_W= \ 617 doscan_w.o 618 619PORTSTDIO= \ 620 __extensions.o \ 621 _endopen.o \ 622 _filbuf.o \ 623 _findbuf.o \ 624 _flsbuf.o \ 625 _wrtchk.o \ 626 clearerr.o \ 627 ctermid.o \ 628 ctermid_r.o \ 629 cuserid.o \ 630 data.o \ 631 doscan.o \ 632 fdopen.o \ 633 feof.o \ 634 ferror.o \ 635 fgetc.o \ 636 fgets.o \ 637 fileno.o \ 638 flockf.o \ 639 flush.o \ 640 fopen.o \ 641 fpos.o \ 642 fputc.o \ 643 fputs.o \ 644 fread.o \ 645 fseek.o \ 646 fseeko.o \ 647 ftell.o \ 648 ftello.o \ 649 fwrite.o \ 650 getc.o \ 651 getchar.o \ 652 getpass.o \ 653 gets.o \ 654 getw.o \ 655 popen.o \ 656 putc.o \ 657 putchar.o \ 658 puts.o \ 659 putw.o \ 660 rewind.o \ 661 scanf.o \ 662 setbuf.o \ 663 setbuffer.o \ 664 setvbuf.o \ 665 system.o \ 666 tempnam.o \ 667 tmpfile.o \ 668 tmpnam_r.o \ 669 ungetc.o \ 670 mse.o \ 671 vscanf.o \ 672 vwscanf.o \ 673 wscanf.o 674 675PORTI18N= \ 676 __fgetwc_xpg5.o \ 677 __fgetws_xpg5.o \ 678 __fputwc_xpg5.o \ 679 __fputws_xpg5.o \ 680 __ungetwc_xpg5.o \ 681 getwchar.o \ 682 putwchar.o \ 683 putws.o \ 684 strtows.o \ 685 wcstoimax.o \ 686 wcstol.o \ 687 wcstoul.o \ 688 wcswcs.o \ 689 wscasecmp.o \ 690 wscat.o \ 691 wschr.o \ 692 wscmp.o \ 693 wscpy.o \ 694 wscspn.o \ 695 wsdup.o \ 696 wslen.o \ 697 wsncasecmp.o \ 698 wsncat.o \ 699 wsncmp.o \ 700 wsncpy.o \ 701 wspbrk.o \ 702 wsprintf.o \ 703 wsrchr.o \ 704 wsscanf.o \ 705 wsspn.o \ 706 wstod.o \ 707 wstok.o \ 708 wstol.o \ 709 wstoll.o \ 710 wsxfrm.o \ 711 wmemchr.o \ 712 wmemcmp.o \ 713 wmemcpy.o \ 714 wmemmove.o \ 715 wmemset.o \ 716 wcsstr.o \ 717 gettext.o \ 718 gettext_real.o \ 719 gettext_util.o \ 720 gettext_gnu.o \ 721 plural_parser.o \ 722 wdresolve.o \ 723 _ctype.o \ 724 isascii.o \ 725 toascii.o 726 727PORTI18N_COND= \ 728 wcstol_longlong.o \ 729 wcstoul_longlong.o 730 731AIOOBJS= \ 732 aio.o \ 733 aio_alloc.o \ 734 posix_aio.o 735 736RTOBJS= \ 737 clock_timer.o \ 738 fallocate.o \ 739 mqueue.o \ 740 pos4obj.o \ 741 sched.o \ 742 sem.o \ 743 shm.o \ 744 sigev_thread.o 745 746TPOOLOBJS= \ 747 thread_pool.o 748 749THREADSOBJS= \ 750 alloc.o \ 751 assfail.o \ 752 cancel.o \ 753 door_calls.o \ 754 pthr_attr.o \ 755 pthr_barrier.o \ 756 pthr_cond.o \ 757 pthr_mutex.o \ 758 pthr_rwlock.o \ 759 pthread.o \ 760 rtsched.o \ 761 rwlock.o \ 762 scalls.o \ 763 sema.o \ 764 sigaction.o \ 765 spawn.o \ 766 synch.o \ 767 tdb_agent.o \ 768 thr.o \ 769 thread_interface.o \ 770 tls.o \ 771 tsd.o 772 773THREADSMACHOBJS= \ 774 machdep.o 775 776THREADSASMOBJS= \ 777 asm_subr.o 778 779UNWINDMACHOBJS= \ 780 unwind.o 781 782UNWINDASMOBJS= \ 783 unwind_frame.o 784 785# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 786# This macro should ALWAYS be empty; native APIs are already 'large file'. 787PORTSYS64= 788 789PORTSYS= \ 790 _autofssys.o \ 791 acctctl.o \ 792 bsd_signal.o \ 793 corectl.o \ 794 exacctsys.o \ 795 execl.o \ 796 execle.o \ 797 execv.o \ 798 faccessat.o \ 799 fcntl.o \ 800 fsmisc.o \ 801 fstatat.o \ 802 fsync.o \ 803 getpeerucred.o \ 804 inst_sync.o \ 805 issetugid.o \ 806 label.o \ 807 libc_link.o \ 808 libc_open.o \ 809 lockf.o \ 810 lwp.o \ 811 lwp_cond.o \ 812 lwp_rwlock.o \ 813 lwp_sigmask.o \ 814 meminfosys.o \ 815 msgsys.o \ 816 nfssys.o \ 817 openat.o \ 818 pgrpsys.o \ 819 posix_sigwait.o \ 820 ppriv.o \ 821 psetsys.o \ 822 rctlsys.o \ 823 sbrk.o \ 824 semsys.o \ 825 set_errno.o \ 826 sharefs.o \ 827 shmsys.o \ 828 siginterrupt.o \ 829 signal.o \ 830 sigpending.o \ 831 sigstack.o \ 832 tasksys.o \ 833 time.o \ 834 time_util.o \ 835 ucontext.o \ 836 ustat.o \ 837 zone.o 838 839PORTREGEX= \ 840 glob.o \ 841 regcmp.o \ 842 regex.o \ 843 wordexp.o 844 845VALUES= values-Xa.o 846 847MOSTOBJS= \ 848 $(STRETS) \ 849 $(CRTOBJS) \ 850 $(DYNOBJS) \ 851 $(FPOBJS) \ 852 $(FPOBJS64) \ 853 $(FPASMOBJS) \ 854 $(ATOMICOBJS) \ 855 $(COMOBJS) \ 856 $(GENOBJS) \ 857 $(PORTFP) \ 858 $(PORTGEN) \ 859 $(PORTGEN64) \ 860 $(PORTI18N) \ 861 $(PORTI18N_COND) \ 862 $(PORTPRINT) \ 863 $(PORTPRINT_W) \ 864 $(PORTREGEX) \ 865 $(PORTSTDIO) \ 866 $(PORTSTDIO64) \ 867 $(PORTSTDIO_W) \ 868 $(PORTSYS) \ 869 $(PORTSYS64) \ 870 $(AIOOBJS) \ 871 $(RTOBJS) \ 872 $(TPOOLOBJS) \ 873 $(THREADSOBJS) \ 874 $(THREADSMACHOBJS) \ 875 $(THREADSASMOBJS) \ 876 $(UNWINDMACHOBJS) \ 877 $(UNWINDASMOBJS) \ 878 $(COMSYSOBJS) \ 879 $(SYSOBJS) \ 880 $(COMSYSOBJS64) \ 881 $(SYSOBJS64) \ 882 $(VALUES) 883 884TRACEOBJS= \ 885 plockstat.o 886 887# NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 888# modules whose source is provided in the $(SRC)/lib/common directory. 889# This must be done because otherwise the Sun C compiler would insert 890# its own versions of these modules and those versions contain code 891# to call out to C++ initialization functions. Such C++ initialization 892# functions can call back into libc before thread initialization is 893# complete and this leads to segmentation violations and other problems. 894# Since libc contains no C++ code, linking with the minimal crti.o and 895# crtn.o modules is safe and avoids the problems described above. 896OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 897CRTSRCS= ../../common/sparcv9 898 899# include common library definitions 900include ../../Makefile.lib 901include ../../Makefile.lib.64 902 903# NOTE: libc_i18n.a will be part of libc.so.1. Therefore, the compilation 904# conditions such as the settings of CFLAGS and CPPFLAGS for the libc_i18n stuff 905# need to be compatible with the ones for the libc stuff. Whenever the changes 906# that affect the compilation conditions of libc happened, those for libc_i18n 907# also need to be updated. 908 909CFLAGS64 += $(CCVERBOSE) 910 911# This is necessary to avoid problems with calling _ex_unwind(). 912# We probably don't want any inlining anyway. 913CFLAGS64 += -xinline= 914 915# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) 916# enables ASSERT() checking in the threads portion of the library. 917# This is automatically enabled for DEBUG builds, not for non-debug builds. 918THREAD_DEBUG = 919$(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 920 921CFLAGS64 += $(THREAD_DEBUG) 922 923ALTPICS= $(TRACEOBJS:%=pics/%) 924 925$(DYNLIB) := PICS += $(ROOTFS_LIBDIR64)/libc_i18n.a 926$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) 927 928MAPFILES = ../port/mapfile-vers mapfile-vers 929 930sparcv9_C_PICFLAGS= -K PIC 931CFLAGS64 += $(EXTN_CFLAGS) 932CPPFLAGS= -D_REENTRANT -Dsparc $(EXTN_CPPFLAGS) \ 933 -I$(LIBCBASE)/inc -I../inc $(CPPFLAGS.master) 934ASFLAGS= -K PIC -P -D__STDC__ -D_ASM -D__sparcv9 $(CPPFLAGS) \ 935 $(sparcv9_AS_XARCH) 936 937# Inform the run-time linker about libc specialized initialization 938RTLDINFO = -z rtldinfo=tls_rtldinfo 939DYNFLAGS += $(RTLDINFO) 940 941DYNFLAGS += $(EXTN_DYNFLAGS) 942 943BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 944 945# Override this top level flag so the compiler builds in its native 946# C99 mode. This has been enabled to support the complex arithmetic 947# added to libc. 948C99MODE= $(C99_ENABLE) 949 950# libc method of building an archive 951BUILD.AR= $(RM) $@ ; \ 952 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%)| $(TSORT)` 953 954# extra files for the clean target 955CLEANFILES= \ 956 ../port/gen/errlst.c \ 957 ../port/gen/new_list.c \ 958 assym.h \ 959 genassym \ 960 pics/crti.o \ 961 pics/crtn.o \ 962 $(ALTPICS) 963 964CLOBBERFILES += $(LIB_PIC) 965 966# list of C source for lint 967SRCS= \ 968 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \ 969 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \ 970 $(PORTFP:%.o=../port/fp/%.c) \ 971 $(PORTGEN:%.o=../port/gen/%.c) \ 972 $(PORTI18N:%.o=../port/i18n/%.c) \ 973 $(PORTPRINT:%.o=../port/print/%.c) \ 974 $(PORTREGEX:%.o=../port/regex/%.c) \ 975 $(PORTSTDIO:%.o=../port/stdio/%.c) \ 976 $(PORTSYS:%.o=../port/sys/%.c) \ 977 $(AIOOBJS:%.o=../port/aio/%.c) \ 978 $(RTOBJS:%.o=../port/rt/%.c) \ 979 $(TPOOLOBJS:%.o=../port/tpool/%.c) \ 980 $(THREADSOBJS:%.o=../port/threads/%.c) \ 981 $(THREADSMACHOBJS:%.o=../$(MACH)/threads/%.c) \ 982 $(UNWINDMACHOBJS:%.o=../port/unwind/%.c) \ 983 $(FPOBJS:%.o=../$(MACH)/fp/%.c) \ 984 $(FPOBJS64:%.o=$(LIBCBASE)/fp/%.c) \ 985 $(LIBCBASE)/crt/_ftou.c \ 986 $(LIBCBASE)/gen/_xregs_clrptr.c \ 987 $(LIBCBASE)/gen/byteorder.c \ 988 $(LIBCBASE)/gen/ecvt.c \ 989 $(LIBCBASE)/gen/getctxt.c \ 990 $(LIBCBASE)/gen/lexp10.c \ 991 $(LIBCBASE)/gen/llog10.c \ 992 $(LIBCBASE)/gen/makectxt.c \ 993 $(LIBCBASE)/gen/siginfolst.c \ 994 $(LIBCBASE)/gen/siglongjmp.c \ 995 $(LIBCBASE)/gen/swapctxt.c 996 997# conditional assignments 998# $(DYNLIB) $(LIB_PIC) := DYNOBJS = _rtbootld.o 999$(DYNLIB) := CRTI = crti.o 1000$(DYNLIB) := CRTN = crtn.o 1001 1002# Files which need the threads .il inline template 1003TIL= \ 1004 aio.o \ 1005 alloc.o \ 1006 assfail.o \ 1007 atexit.o \ 1008 atfork.o \ 1009 cancel.o \ 1010 door_calls.o \ 1011 errno.o \ 1012 getctxt.o \ 1013 lwp.o \ 1014 ma.o \ 1015 machdep.o \ 1016 posix_aio.o \ 1017 pthr_attr.o \ 1018 pthr_barrier.o \ 1019 pthr_cond.o \ 1020 pthr_mutex.o \ 1021 pthr_rwlock.o \ 1022 pthread.o \ 1023 rand.o \ 1024 rtsched.o \ 1025 rwlock.o \ 1026 scalls.o \ 1027 sema.o \ 1028 sigaction.o \ 1029 sigev_thread.o \ 1030 spawn.o \ 1031 stack.o \ 1032 swapctxt.o \ 1033 synch.o \ 1034 tdb_agent.o \ 1035 thr.o \ 1036 thread_interface.o \ 1037 thread_pool.o \ 1038 tls.o \ 1039 tsd.o \ 1040 unwind.o 1041 1042$(TIL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/threads/sparcv9.il 1043 1044# Files in fp, port/fp subdirectories that need base.il inline template 1045IL= \ 1046 __flt_decim.o \ 1047 decimal_bin.o 1048 1049$(IL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/fp/base.il 1050 1051# Files in fp subdirectory which need __quad.il inline template 1052QIL= \ 1053 _Q_add.o \ 1054 _Q_cmp.o \ 1055 _Q_cmpe.o \ 1056 _Q_div.o \ 1057 _Q_dtoq.o \ 1058 _Q_fcc.o \ 1059 _Q_mul.o \ 1060 _Q_qtod.o \ 1061 _Q_qtoi.o \ 1062 _Q_qtos.o \ 1063 _Q_qtou.o \ 1064 _Q_sqrt.o \ 1065 _Q_stoq.o \ 1066 _Q_sub.o \ 1067 _Qp_qtox.o \ 1068 _Qp_qtoux.o 1069 1070$(QIL:%=pics/%) := CFLAGS64 += ../$(MACH)/fp/__quad.il 1071pics/_Qp%.o := CFLAGS64 += -I../$(MACH)/fp 1072pics/_Q%.o := sparcv9_COPTFLAG = -xO4 -xchip=ultra 1073 1074# Files in crt subdirectory which need muldiv64.il inline template 1075#CIL= mul64.o divrem64.o 1076#$(CIL:%=pics/%) := CFLAGS += $(LIBCBASE)/crt/mul64.il 1077 1078# large-file-aware components that should be built large 1079 1080#$(COMSYSOBJS64:%=pics/%) := \ 1081# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1082 1083#$(SYSOBJS64:%=pics/%) := \ 1084# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1085 1086#$(PORTGEN64:%=pics/%) := \ 1087# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1088 1089#$(PORTSTDIO64:%=pics/%) := \ 1090# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1091 1092#$(PORTSYS64:%=pics/%) := \ 1093# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1094 1095$(PORTSTDIO_W:%=pics/%) := \ 1096 CPPFLAGS += -D_WIDE 1097 1098$(PORTPRINT_W:%=pics/%) := \ 1099 CPPFLAGS += -D_WIDE 1100 1101$(PORTI18N_COND:%=pics/%) := \ 1102 CPPFLAGS += -D_WCS_LONGLONG 1103 1104# Files which need extra optimization 1105pics/getenv.o := sparcv9_COPTFLAG = -xO4 1106 1107.KEEP_STATE: 1108 1109all: $(LIBS) $(LIB_PIC) 1110 1111lint := CPPFLAGS += -I../$(MACH)/fp 1112lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99 1113lint := LINTFLAGS64 += -mn 1114 1115lint: 1116 @echo $(LINT.c) ... $(LDLIBS) 1117 @$(LINT.c) $(SRCS) $(LDLIBS) 1118 1119$(LINTLIB):= SRCS=../port/llib-lc 1120$(LINTLIB):= CPPFLAGS += -D_MSE_INT_H 1121$(LINTLIB):= LINTFLAGS64=-nvx -Xarch=v9 1122 1123# object files that depend on inline template 1124$(TIL:%=pics/%): $(LIBCBASE)/threads/sparcv9.il 1125$(IL:%=pics/%): $(LIBCBASE)/fp/base.il 1126$(QIL:%=pics/%): ../$(MACH)/fp/__quad.il 1127#$(CIL:%=pics/%): $(LIBCBASE)/crt/muldiv64.il 1128 1129# include common libc targets 1130include ../Makefile.targ 1131 1132# We need to strip out all CTF and DOF data from the static library 1133$(LIB_PIC) := DIR = pics 1134$(LIB_PIC): pics $$(PICS) 1135 $(BUILD.AR) 1136 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1137 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1138 $(AR) -ts $@ > /dev/null 1139 $(POST_PROCESS_A) 1140 1141# special cases 1142#$(STRETS:%=pics/%): crt/stret.s 1143# $(AS) $(ASFLAGS) -DSTRET$(@F:stret%.o=%) crt/stret.s -o $@ 1144# $(POST_PROCESS_O) 1145 1146#crt/_rtbootld.s: crt/_rtboot.s crt/_rtld.c 1147# $(CC) $(CPPFLAGS) -O -S -K pic crt/_rtld.c -o crt/_rtld.s 1148# $(CAT) crt/_rtboot.s crt/_rtld.s > $@ 1149# $(RM) crt/_rtld.s 1150 1151ASSYMDEP_OBJS= \ 1152 _lwp_mutex_unlock.o \ 1153 _stack_grow.o \ 1154 asm_subr.o \ 1155 tls_get_addr.o \ 1156 unwind_frame.o \ 1157 vforkx.o 1158 1159$(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1160 1161$(ASSYMDEP_OBJS:%=pics/%): assym.h 1162 1163# assym.h build rules 1164 1165GENASSYM_C = ../$(MACH)/genassym.c 1166 1167# XXX A hack. Perhaps this should be 'CPPFLAGS.native' and 1168# live in Makefile.master 1169 1170CPPFLAGS.genassym = \ 1171 $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) 1172 1173genassym: $(GENASSYM_C) 1174 $(NATIVECC) -I$(LIBCBASE)/inc -I../inc \ 1175 $(CPPFLAGS.genassym) -o $@ $(GENASSYM_C) 1176 1177OFFSETS = ../$(MACH)/offsets.in 1178 1179assym.h: $(OFFSETS) genassym 1180 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1181 ./genassym >>$@ 1182 1183# derived C source and related explicit dependencies 1184../port/gen/new_list.c: ../port/gen/errlist ../port/gen/errlist.awk 1185 cd ../port/gen; pwd; $(AWK) -f errlist.awk < errlist 1186 1187pics/new_list.o: ../port/gen/new_list.c 1188