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 (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. 23 # Copyright (c) 2015, Joyent, Inc. All rights reserved. 24 # Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. 25 # Copyright 2014 Garrett D'Amore <garrett@damore.org> 26 # 27 # Copyright 2011 Nexenta Systems, Inc. All rights reserved. 28 # Use is subject to license terms. 29 # 30 31 LIBCDIR= $(SRC)/lib/libc 32 LIB_PIC= libc_pic.a 33 VERS= .1 34 CPP= /usr/lib/cpp 35 TARGET_ARCH= sparc 36 37 # objects are grouped by source directory 38 39 # Symbol capabilities objects. 40 EXTPICS= \ 41 $(LIBCDIR)/capabilities/sun4u/sparc/pics/symcap.o \ 42 $(LIBCDIR)/capabilities/sun4u-opl/sparc/pics/symcap.o \ 43 $(LIBCDIR)/capabilities/sun4u-us3-hwcap1/sparc/pics/symcap.o \ 44 $(LIBCDIR)/capabilities/sun4u-us3-hwcap2/sparc/pics/symcap.o \ 45 $(LIBCDIR)/capabilities/sun4v-hwcap1/sparc/pics/symcap.o \ 46 $(LIBCDIR)/capabilities/sun4v-hwcap2/sparc/pics/symcap.o 47 48 # local objects 49 STRETS= \ 50 stret1.o \ 51 stret2.o \ 52 stret4.o 53 54 CRTOBJS= \ 55 _ftou.o \ 56 cerror.o \ 57 cerror64.o \ 58 hwmuldiv.o 59 60 DYNOBJS= \ 61 _rtbootld.o 62 63 FPOBJS= \ 64 _D_cplx_div.o \ 65 _D_cplx_div_ix.o \ 66 _D_cplx_div_rx.o \ 67 _D_cplx_mul.o \ 68 _F_cplx_div.o \ 69 _F_cplx_div_ix.o \ 70 _F_cplx_div_rx.o \ 71 _F_cplx_mul.o \ 72 _Q_add.o \ 73 _Q_cmp.o \ 74 _Q_cmpe.o \ 75 _Q_cplx_div.o \ 76 _Q_cplx_div_ix.o \ 77 _Q_cplx_div_rx.o \ 78 _Q_cplx_lr_div.o \ 79 _Q_cplx_lr_div_ix.o \ 80 _Q_cplx_lr_div_rx.o \ 81 _Q_cplx_lr_mul.o \ 82 _Q_cplx_mul.o \ 83 _Q_div.o \ 84 _Q_dtoq.o \ 85 _Q_fcc.o \ 86 _Q_itoq.o \ 87 _Q_lltoq.o \ 88 _Q_mul.o \ 89 _Q_neg.o \ 90 _Q_qtod.o \ 91 _Q_qtoi.o \ 92 _Q_qtos.o \ 93 _Q_qtou.o \ 94 _Q_scl.o \ 95 _Q_set_except.o \ 96 _Q_sqrt.o \ 97 _Q_stoq.o \ 98 _Q_sub.o \ 99 _Q_ulltoq.o \ 100 _Q_utoq.o \ 101 __quad_mag.o 102 103 FPASMOBJS= \ 104 _Q_get_rp_rd.o \ 105 fpgetmask.o \ 106 fpgetrnd.o \ 107 fpgetsticky.o \ 108 fpsetmask.o \ 109 fpsetrnd.o \ 110 fpsetsticky.o 111 112 $(__GNUC)FPASMOBJS += \ 113 __quad.o 114 115 ATOMICOBJS= \ 116 atomic.o 117 118 XATTROBJS= \ 119 xattr_common.o 120 121 COMOBJS= \ 122 bcmp.o \ 123 bcopy.o \ 124 bzero.o \ 125 bsearch.o \ 126 memccpy.o \ 127 qsort.o \ 128 strtol.o \ 129 strtoul.o \ 130 strtoll.o \ 131 strtoull.o 132 133 DTRACEOBJS= \ 134 dtrace_data.o 135 136 GENOBJS= \ 137 _getsp.o \ 138 _xregs_clrptr.o \ 139 abs.o \ 140 alloca.o \ 141 ascii_strcasecmp.o \ 142 byteorder.o \ 143 cuexit.o \ 144 ecvt.o \ 145 errlst.o \ 146 getctxt.o \ 147 ladd.o \ 148 lmul.o \ 149 lock.o \ 150 lshiftl.o \ 151 lsign.o \ 152 lsub.o \ 153 makectxt.o \ 154 memchr.o \ 155 memcmp.o \ 156 new_list.o \ 157 setjmp.o \ 158 siginfolst.o \ 159 siglongjmp.o \ 160 smt_pause.o \ 161 sparc_data.o \ 162 strchr.o \ 163 strcmp.o \ 164 strlcpy.o \ 165 strncmp.o \ 166 strncpy.o \ 167 strnlen.o \ 168 swapctxt.o \ 169 sync_instruction_memory.o 170 171 # sysobjs that contain large-file interfaces 172 COMSYSOBJS64= \ 173 fstatvfs64.o \ 174 getdents64.o \ 175 getrlimit64.o \ 176 lseek64.o \ 177 mmap64.o \ 178 pread64.o \ 179 preadv64.o \ 180 pwrite64.o \ 181 pwritev64.o \ 182 setrlimit64.o \ 183 statvfs64.o 184 185 SYSOBJS64= 186 187 COMSYSOBJS= \ 188 __clock_timer.o \ 189 __getloadavg.o \ 190 __rusagesys.o \ 191 __signotify.o \ 192 __sigrt.o \ 193 __time.o \ 194 _lgrp_home_fast.o \ 195 _lgrpsys.o \ 196 _nfssys.o \ 197 _portfs.o \ 198 _pset.o \ 199 _rpcsys.o \ 200 _sigaction.o \ 201 _so_accept.o \ 202 _so_bind.o \ 203 _so_connect.o \ 204 _so_getpeername.o \ 205 _so_getsockname.o \ 206 _so_getsockopt.o \ 207 _so_listen.o \ 208 _so_recv.o \ 209 _so_recvfrom.o \ 210 _so_recvmsg.o \ 211 _so_send.o \ 212 _so_sendmsg.o \ 213 _so_sendto.o \ 214 _so_setsockopt.o \ 215 _so_shutdown.o \ 216 _so_socket.o \ 217 _so_socketpair.o \ 218 _sockconfig.o \ 219 acct.o \ 220 acl.o \ 221 adjtime.o \ 222 alarm.o \ 223 brk.o \ 224 chdir.o \ 225 chroot.o \ 226 cladm.o \ 227 close.o \ 228 execve.o \ 229 exit.o \ 230 facl.o \ 231 fchdir.o \ 232 fchroot.o \ 233 fdsync.o \ 234 fpathconf.o \ 235 fstatfs.o \ 236 fstatvfs.o \ 237 getcpuid.o \ 238 getdents.o \ 239 getegid.o \ 240 geteuid.o \ 241 getgid.o \ 242 getgroups.o \ 243 gethrtime.o \ 244 getitimer.o \ 245 getmsg.o \ 246 getpid.o \ 247 getpmsg.o \ 248 getppid.o \ 249 getrlimit.o \ 250 getuid.o \ 251 gtty.o \ 252 install_utrap.o \ 253 ioctl.o \ 254 kaio.o \ 255 kill.o \ 256 llseek.o \ 257 lseek.o \ 258 memcntl.o \ 259 mincore.o \ 260 mmap.o \ 261 mmapobjsys.o \ 262 modctl.o \ 263 mount.o \ 264 mprotect.o \ 265 munmap.o \ 266 nice.o \ 267 ntp_adjtime.o \ 268 ntp_gettime.o \ 269 p_online.o \ 270 pathconf.o \ 271 pause.o \ 272 pcsample.o \ 273 pipe2.o \ 274 pollsys.o \ 275 pread.o \ 276 preadv.o \ 277 priocntlset.o \ 278 processor_bind.o \ 279 processor_info.o \ 280 profil.o \ 281 putmsg.o \ 282 putpmsg.o \ 283 pwrite.o \ 284 pwritev.o \ 285 read.o \ 286 readv.o \ 287 resolvepath.o \ 288 seteguid.o \ 289 setgid.o \ 290 setgroups.o \ 291 setitimer.o \ 292 setreid.o \ 293 setrlimit.o \ 294 setuid.o \ 295 sigaltstk.o \ 296 sigprocmsk.o \ 297 sigsendset.o \ 298 sigsuspend.o \ 299 statfs.o \ 300 statvfs.o \ 301 stty.o \ 302 sync.o \ 303 sysconfig.o \ 304 sysfs.o \ 305 sysinfo.o \ 306 syslwp.o \ 307 times.o \ 308 ulimit.o \ 309 umask.o \ 310 umount2.o \ 311 utssys.o \ 312 uucopy.o \ 313 vhangup.o \ 314 waitid.o \ 315 write.o \ 316 writev.o \ 317 yield.o 318 319 SYSOBJS= \ 320 __clock_gettime.o \ 321 __getcontext.o \ 322 _lwp_mutex_unlock.o \ 323 _stack_grow.o \ 324 __uadmin.o \ 325 door.o \ 326 forkx.o \ 327 forkallx.o \ 328 gettimeofday.o \ 329 ptrace.o \ 330 syscall.o \ 331 tls_get_addr.o \ 332 uadmin.o \ 333 umount.o \ 334 uname.o \ 335 vforkx.o 336 337 # objects under $(LIBCDIR)/port which contain transitional large file interfaces 338 PORTGEN64= \ 339 _xftw64.o \ 340 attropen64.o \ 341 ftw64.o \ 342 mkstemp64.o \ 343 nftw64.o \ 344 tell64.o \ 345 truncate64.o 346 347 # objects from source under $(LIBCDIR)/port 348 PORTFP= \ 349 __flt_decim.o \ 350 __flt_rounds.o \ 351 __tbl_10_b.o \ 352 __tbl_10_h.o \ 353 __tbl_10_s.o \ 354 __tbl_2_b.o \ 355 __tbl_2_h.o \ 356 __tbl_2_s.o \ 357 __tbl_fdq.o \ 358 __tbl_tens.o \ 359 __x_power.o \ 360 _base_sup.o \ 361 aconvert.o \ 362 decimal_bin.o \ 363 double_decim.o \ 364 econvert.o \ 365 fconvert.o \ 366 file_decim.o \ 367 finite.o \ 368 fp_data.o \ 369 func_decim.o \ 370 gconvert.o \ 371 hex_bin.o \ 372 ieee_globals.o \ 373 pack_float.o \ 374 sigfpe.o \ 375 string_decim.o \ 376 ashldi3.o \ 377 ashrdi3.o \ 378 cmpdi2.o \ 379 divdi3.o \ 380 floatdidf.o \ 381 floatdisf.o \ 382 floatundidf.o \ 383 floatundisf.o \ 384 lshrdi3.o \ 385 moddi3.o \ 386 muldi3.o \ 387 qdivrem.o \ 388 ucmpdi2.o \ 389 udivdi3.o \ 390 umoddi3.o 391 392 PORTGEN= \ 393 _env_data.o \ 394 _ftoll.o \ 395 _ftoull.o \ 396 _xftw.o \ 397 a64l.o \ 398 abort.o \ 399 addsev.o \ 400 ascii_strncasecmp.o \ 401 assert.o \ 402 atof.o \ 403 atoi.o \ 404 atol.o \ 405 atoll.o \ 406 attrat.o \ 407 attropen.o \ 408 atexit.o \ 409 atfork.o \ 410 basename.o \ 411 calloc.o \ 412 catgets.o \ 413 catopen.o \ 414 cfgetispeed.o \ 415 cfgetospeed.o \ 416 cfree.o \ 417 cfsetispeed.o \ 418 cfsetospeed.o \ 419 cftime.o \ 420 clock.o \ 421 closedir.o \ 422 closefrom.o \ 423 confstr.o \ 424 crypt.o \ 425 csetlen.o \ 426 ctime.o \ 427 ctime_r.o \ 428 daemon.o \ 429 deflt.o \ 430 directio.o \ 431 dirname.o \ 432 div.o \ 433 drand48.o \ 434 dup.o \ 435 env_data.o \ 436 err.o \ 437 errno.o \ 438 euclen.o \ 439 event_port.o \ 440 execvp.o \ 441 fattach.o \ 442 fdetach.o \ 443 fdopendir.o \ 444 ffs.o \ 445 fls.o \ 446 fmtmsg.o \ 447 ftime.o \ 448 ftok.o \ 449 ftw.o \ 450 gcvt.o \ 451 getauxv.o \ 452 getcwd.o \ 453 getdate_err.o \ 454 getdtblsize.o \ 455 getenv.o \ 456 getexecname.o \ 457 getgrnam.o \ 458 getgrnam_r.o \ 459 gethostid.o \ 460 gethostname.o \ 461 gethz.o \ 462 getisax.o \ 463 getloadavg.o \ 464 getlogin.o \ 465 getmntent.o \ 466 getnetgrent.o \ 467 get_nprocs.o \ 468 getopt.o \ 469 getopt_long.o \ 470 getpagesize.o \ 471 getpw.o \ 472 getpwnam.o \ 473 getpwnam_r.o \ 474 getrusage.o \ 475 getspent.o \ 476 getspent_r.o \ 477 getsubopt.o \ 478 gettxt.o \ 479 getusershell.o \ 480 getut.o \ 481 getutx.o \ 482 getvfsent.o \ 483 getwd.o \ 484 getwidth.o \ 485 getxby_door.o \ 486 gtxt.o \ 487 hsearch.o \ 488 iconv.o \ 489 imaxabs.o \ 490 imaxdiv.o \ 491 index.o \ 492 initgroups.o \ 493 insque.o \ 494 isaexec.o \ 495 isastream.o \ 496 isatty.o \ 497 killpg.o \ 498 klpdlib.o \ 499 l64a.o \ 500 lckpwdf.o \ 501 lconstants.o \ 502 ldivide.o \ 503 lexp10.o \ 504 lfind.o \ 505 lfmt.o \ 506 lfmt_log.o \ 507 llabs.o \ 508 lldiv.o \ 509 llog10.o \ 510 lltostr.o \ 511 localtime.o \ 512 lsearch.o \ 513 madvise.o \ 514 malloc.o \ 515 memalign.o \ 516 memmem.o \ 517 mkdev.o \ 518 mkdtemp.o \ 519 mkfifo.o \ 520 mkstemp.o \ 521 mktemp.o \ 522 mlock.o \ 523 mlockall.o \ 524 mon.o \ 525 msync.o \ 526 munlock.o \ 527 munlockall.o \ 528 ndbm.o \ 529 nftw.o \ 530 nlspath_checks.o \ 531 nsparse.o \ 532 nss_common.o \ 533 nss_dbdefs.o \ 534 nss_deffinder.o \ 535 opendir.o \ 536 opt_data.o \ 537 perror.o \ 538 pfmt.o \ 539 pfmt_data.o \ 540 pfmt_print.o \ 541 pipe.o \ 542 plock.o \ 543 poll.o \ 544 posix_fadvise.o \ 545 posix_fallocate.o \ 546 posix_madvise.o \ 547 posix_memalign.o \ 548 priocntl.o \ 549 privlib.o \ 550 priv_str_xlate.o \ 551 psiginfo.o \ 552 psignal.o \ 553 pt.o \ 554 putpwent.o \ 555 putspent.o \ 556 raise.o \ 557 rand.o \ 558 random.o \ 559 rctlops.o \ 560 readdir.o \ 561 readdir_r.o \ 562 realpath.o \ 563 reboot.o \ 564 regexpr.o \ 565 remove.o \ 566 rewinddir.o \ 567 rindex.o \ 568 scandir.o \ 569 seekdir.o \ 570 select.o \ 571 select_large_fdset.o \ 572 setlabel.o \ 573 setpriority.o \ 574 settimeofday.o \ 575 sh_locks.o \ 576 sigflag.o \ 577 siglist.o \ 578 sigsend.o \ 579 sigsetops.o \ 580 ssignal.o \ 581 stack.o \ 582 stpcpy.o \ 583 stpncpy.o \ 584 str2sig.o \ 585 strcase_charmap.o \ 586 strcat.o \ 587 strchrnul.o \ 588 strcspn.o \ 589 strdup.o \ 590 strerror.o \ 591 strlcat.o \ 592 strncat.o \ 593 strndup.o \ 594 strpbrk.o \ 595 strrchr.o \ 596 strsep.o \ 597 strsignal.o \ 598 strspn.o \ 599 strstr.o \ 600 strtod.o \ 601 strtoimax.o \ 602 strtok.o \ 603 strtok_r.o \ 604 strtoumax.o \ 605 swab.o \ 606 swapctl.o \ 607 sysconf.o \ 608 syslog.o \ 609 tcdrain.o \ 610 tcflow.o \ 611 tcflush.o \ 612 tcgetattr.o \ 613 tcgetpgrp.o \ 614 tcgetsid.o \ 615 tcsendbreak.o \ 616 tcsetattr.o \ 617 tcsetpgrp.o \ 618 tell.o \ 619 telldir.o \ 620 tfind.o \ 621 time_data.o \ 622 time_gdata.o \ 623 tls_data.o \ 624 truncate.o \ 625 tsdalloc.o \ 626 tsearch.o \ 627 ttyname.o \ 628 ttyslot.o \ 629 ualarm.o \ 630 ucred.o \ 631 valloc.o \ 632 vlfmt.o \ 633 vpfmt.o \ 634 waitpid.o \ 635 walkstack.o \ 636 wdata.o \ 637 xgetwidth.o \ 638 xpg4.o \ 639 xpg6.o 640 641 PORTPRINT_W= \ 642 doprnt_w.o 643 644 PORTPRINT= \ 645 asprintf.o \ 646 doprnt.o \ 647 fprintf.o \ 648 printf.o \ 649 snprintf.o \ 650 sprintf.o \ 651 vfprintf.o \ 652 vprintf.o \ 653 vsnprintf.o \ 654 vsprintf.o \ 655 vwprintf.o \ 656 wprintf.o 657 658 # c89 variants to support 32-bit size of c89 u/intmax_t (32-bit libc only) 659 PORTPRINT_C89= \ 660 vfprintf_c89.o \ 661 vprintf_c89.o \ 662 vsnprintf_c89.o \ 663 vsprintf_c89.o \ 664 vwprintf_c89.o 665 666 PORTSTDIO_C89= \ 667 vscanf_c89.o \ 668 vwscanf_c89.o 669 670 # portable stdio objects that contain large file interfaces. 671 # Note: fopen64 is a special case, as we build it small. 672 PORTSTDIO64= \ 673 fopen64.o \ 674 fpos64.o 675 676 PORTSTDIO_W= \ 677 doscan_w.o 678 679 PORTSTDIO= \ 680 __extensions.o \ 681 _endopen.o \ 682 _filbuf.o \ 683 _findbuf.o \ 684 _flsbuf.o \ 685 _wrtchk.o \ 686 clearerr.o \ 687 ctermid.o \ 688 ctermid_r.o \ 689 cuserid.o \ 690 data.o \ 691 doscan.o \ 692 fdopen.o \ 693 feof.o \ 694 ferror.o \ 695 fgetc.o \ 696 fgets.o \ 697 fileno.o \ 698 flockf.o \ 699 flush.o \ 700 fopen.o \ 701 fpos.o \ 702 fputc.o \ 703 fputs.o \ 704 fread.o \ 705 fseek.o \ 706 fseeko.o \ 707 ftell.o \ 708 ftello.o \ 709 fwrite.o \ 710 getc.o \ 711 getchar.o \ 712 getline.o \ 713 getpass.o \ 714 gets.o \ 715 getw.o \ 716 popen.o \ 717 putc.o \ 718 putchar.o \ 719 puts.o \ 720 putw.o \ 721 rewind.o \ 722 scanf.o \ 723 setbuf.o \ 724 setbuffer.o \ 725 setvbuf.o \ 726 system.o \ 727 tempnam.o \ 728 tmpfile.o \ 729 tmpnam_r.o \ 730 ungetc.o \ 731 mse.o \ 732 vscanf.o \ 733 vwscanf.o \ 734 wscanf.o 735 736 PORTI18N= \ 737 getwchar.o \ 738 putwchar.o \ 739 putws.o \ 740 strtows.o \ 741 wcsnlen.o \ 742 wcstoimax.o \ 743 wcstol.o \ 744 wcstoul.o \ 745 wcswcs.o \ 746 wscat.o \ 747 wschr.o \ 748 wscmp.o \ 749 wscpy.o \ 750 wscspn.o \ 751 wsdup.o \ 752 wslen.o \ 753 wsncat.o \ 754 wsncmp.o \ 755 wsncpy.o \ 756 wspbrk.o \ 757 wsprintf.o \ 758 wsrchr.o \ 759 wsscanf.o \ 760 wsspn.o \ 761 wstod.o \ 762 wstok.o \ 763 wstol.o \ 764 wstoll.o \ 765 wsxfrm.o \ 766 wmemchr.o \ 767 wmemcmp.o \ 768 wmemcpy.o \ 769 wmemmove.o \ 770 wmemset.o \ 771 wcsstr.o \ 772 gettext.o \ 773 gettext_real.o \ 774 gettext_util.o \ 775 gettext_gnu.o \ 776 plural_parser.o \ 777 wdresolve.o \ 778 _ctype.o \ 779 isascii.o \ 780 toascii.o 781 782 PORTI18N_COND= \ 783 wcstol_longlong.o \ 784 wcstoul_longlong.o 785 786 PORTLOCALE= \ 787 big5.o \ 788 btowc.o \ 789 collate.o \ 790 collcmp.o \ 791 euc.o \ 792 fnmatch.o \ 793 fgetwc.o \ 794 fgetws.o \ 795 fix_grouping.o \ 796 fputwc.o \ 797 fputws.o \ 798 fwide.o \ 799 gb18030.o \ 800 gb2312.o \ 801 gbk.o \ 802 getdate.o \ 803 isdigit.o \ 804 iswctype.o \ 805 ldpart.o \ 806 lmessages.o \ 807 lnumeric.o \ 808 lmonetary.o \ 809 localeimpl.o \ 810 localeconv.o \ 811 mbftowc.o \ 812 mblen.o \ 813 mbrlen.o \ 814 mbrtowc.o \ 815 mbsinit.o \ 816 mbsnrtowcs.o \ 817 mbsrtowcs.o \ 818 mbstowcs.o \ 819 mbtowc.o \ 820 mskanji.o \ 821 nextwctype.o \ 822 nl_langinfo.o \ 823 none.o \ 824 regcomp.o \ 825 regfree.o \ 826 regerror.o \ 827 regexec.o \ 828 rune.o \ 829 runetype.o \ 830 setlocale.o \ 831 setrunelocale.o \ 832 strcasecmp.o \ 833 strcasestr.o \ 834 strcoll.o \ 835 strfmon.o \ 836 strftime.o \ 837 strncasecmp.o \ 838 strptime.o \ 839 strxfrm.o \ 840 table.o \ 841 timelocal.o \ 842 tolower.o \ 843 towlower.o \ 844 ungetwc.o \ 845 utf8.o \ 846 wcrtomb.o \ 847 wcscasecmp.o \ 848 wcscoll.o \ 849 wcsftime.o \ 850 wcsnrtombs.o \ 851 wcsrtombs.o \ 852 wcstombs.o \ 853 wcswidth.o \ 854 wcsxfrm.o \ 855 wctob.o \ 856 wctomb.o \ 857 wctrans.o \ 858 wctype.o \ 859 wcwidth.o \ 860 wscol.o 861 862 AIOOBJS= \ 863 aio.o \ 864 aio_alloc.o \ 865 posix_aio.o 866 867 RTOBJS= \ 868 clock_timer.o \ 869 mqueue.o \ 870 pos4obj.o \ 871 sched.o \ 872 sem.o \ 873 shm.o \ 874 sigev_thread.o 875 876 TPOOLOBJS= \ 877 thread_pool.o 878 879 THREADSOBJS= \ 880 alloc.o \ 881 assfail.o \ 882 cancel.o \ 883 door_calls.o \ 884 tmem.o \ 885 pthr_attr.o \ 886 pthr_barrier.o \ 887 pthr_cond.o \ 888 pthr_mutex.o \ 889 pthr_rwlock.o \ 890 pthread.o \ 891 rwlock.o \ 892 scalls.o \ 893 sema.o \ 894 sigaction.o \ 895 spawn.o \ 896 synch.o \ 897 tdb_agent.o \ 898 thr.o \ 899 thread_interface.o \ 900 tls.o \ 901 tsd.o 902 903 THREADSMACHOBJS= \ 904 machdep.o 905 906 THREADSASMOBJS= \ 907 asm_subr.o 908 909 UNICODEOBJS= \ 910 u8_textprep.o \ 911 uconv.o 912 913 UNWINDMACHOBJS= \ 914 unwind.o 915 916 UNWINDASMOBJS= \ 917 unwind_frame.o 918 919 # objects that implement the transitional large file API 920 PORTSYS64= \ 921 lockf64.o \ 922 stat64.o 923 924 PORTSYS= \ 925 _autofssys.o \ 926 access.o \ 927 acctctl.o \ 928 bsd_signal.o \ 929 chmod.o \ 930 chown.o \ 931 corectl.o \ 932 exacctsys.o \ 933 execl.o \ 934 execle.o \ 935 execv.o \ 936 fcntl.o \ 937 fexecve.o \ 938 getpagesizes.o \ 939 getpeerucred.o \ 940 inst_sync.o \ 941 issetugid.o \ 942 label.o \ 943 link.o \ 944 lockf.o \ 945 lwp.o \ 946 lwp_cond.o \ 947 lwp_rwlock.o \ 948 lwp_sigmask.o \ 949 meminfosys.o \ 950 mkdir.o \ 951 mknod.o \ 952 msgsys.o \ 953 nfssys.o \ 954 open.o \ 955 pgrpsys.o \ 956 posix_sigwait.o \ 957 ppriv.o \ 958 psetsys.o \ 959 rctlsys.o \ 960 readlink.o \ 961 rename.o \ 962 sbrk.o \ 963 semsys.o \ 964 set_errno.o \ 965 sharefs.o \ 966 shmsys.o \ 967 sidsys.o \ 968 siginterrupt.o \ 969 signal.o \ 970 sigpending.o \ 971 sigstack.o \ 972 stat.o \ 973 symlink.o \ 974 tasksys.o \ 975 time.o \ 976 time_util.o \ 977 ucontext.o \ 978 unlink.o \ 979 ustat.o \ 980 utimesys.o \ 981 zone.o 982 983 PORTREGEX= \ 984 glob.o \ 985 regcmp.o \ 986 regex.o \ 987 wordexp.o 988 989 VALUES= values-Xa.o 990 991 MOSTOBJS= \ 992 $(STRETS) \ 993 $(CRTOBJS) \ 994 $(DYNOBJS) \ 995 $(FPOBJS) \ 996 $(FPASMOBJS) \ 997 $(ATOMICOBJS) \ 998 $(XATTROBJS) \ 999 $(COMOBJS) \ 1000 $(DTRACEOBJS) \ 1001 $(GENOBJS) \ 1002 $(PRFOBJS) \ 1003 $(PORTFP) \ 1004 $(PORTGEN) \ 1005 $(PORTGEN64) \ 1006 $(PORTI18N) \ 1007 $(PORTI18N_COND) \ 1008 $(PORTLOCALE) \ 1009 $(PORTPRINT) \ 1010 $(PORTPRINT_C89) \ 1011 $(PORTPRINT_W) \ 1012 $(PORTREGEX) \ 1013 $(PORTSTDIO) \ 1014 $(PORTSTDIO64) \ 1015 $(PORTSTDIO_C89) \ 1016 $(PORTSTDIO_W) \ 1017 $(PORTSYS) \ 1018 $(PORTSYS64) \ 1019 $(AIOOBJS) \ 1020 $(RTOBJS) \ 1021 $(TPOOLOBJS) \ 1022 $(THREADSOBJS) \ 1023 $(THREADSMACHOBJS) \ 1024 $(THREADSASMOBJS) \ 1025 $(UNICODEOBJS) \ 1026 $(UNWINDMACHOBJS) \ 1027 $(UNWINDASMOBJS) \ 1028 $(COMSYSOBJS) \ 1029 $(SYSOBJS) \ 1030 $(COMSYSOBJS64) \ 1031 $(SYSOBJS64) \ 1032 $(VALUES) 1033 1034 TRACEOBJS= \ 1035 plockstat.o 1036 1037 # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 1038 # modules whose source is provided in the $(SRC)/lib/common directory. 1039 # This must be done because otherwise the Sun C compiler would insert 1040 # its own versions of these modules and those versions contain code 1041 # to call out to C++ initialization functions. Such C++ initialization 1042 # functions can call back into libc before thread initialization is 1043 # complete and this leads to segmentation violations and other problems. 1044 # Since libc contains no C++ code, linking with the minimal crti.o and 1045 # crtn.o modules is safe and avoids the problems described above. 1046 OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 1047 CRTSRCS= ../../common/sparc 1048 1049 # include common library definitions 1050 include $(SRC)/lib/Makefile.lib 1051 1052 # we need to override the default SONAME here because we might 1053 # be building a variant object (still libc.so.1, but different filename) 1054 SONAME = libc.so.1 1055 1056 CFLAGS += $(CCVERBOSE) 1057 1058 # This is necessary to avoid problems with calling _ex_unwind(). 1059 # We probably don't want any inlining anyway. 1060 CFLAGS += -xinline= 1061 1062 CERRWARN += -_gcc=-Wno-parentheses 1063 CERRWARN += -_gcc=-Wno-switch 1064 CERRWARN += -_gcc=-Wno-uninitialized 1065 CERRWARN += -_gcc=-Wno-unused-value 1066 CERRWARN += -_gcc=-Wno-unused-label 1067 CERRWARN += -_gcc=-Wno-unused-variable 1068 CERRWARN += -_gcc=-Wno-type-limits 1069 CERRWARN += -_gcc=-Wno-char-subscripts 1070 CERRWARN += -_gcc=-Wno-clobbered 1071 CERRWARN += -_gcc=-Wno-unused-function 1072 CERRWARN += -_gcc=-Wno-address 1073 1074 # Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) 1075 # enables ASSERT() checking in the threads portion of the library. 1076 # This is automatically enabled for DEBUG builds, not for non-debug builds. 1077 THREAD_DEBUG = 1078 $(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 1079 1080 # Make string literals read-only to save memory. 1081 CFLAGS += $(XSTRCONST) 1082 1083 ALTPICS= $(TRACEOBJS:%=pics/%) 1084 1085 $(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS) 1086 1087 MAPFILES = $(LIBCDIR)/port/mapfile-vers 1088 1089 CFLAGS += $(EXTN_CFLAGS) 1090 CPPFLAGS= -D_REENTRANT -Dsparc $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \ 1091 -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master) 1092 ASFLAGS= $(EXTN_ASFLAGS) -K pic -P -D__STDC__ -D_ASM $(CPPFLAGS) $(sparc_AS_XARCH) 1093 1094 # As a favor to the dtrace syscall provider, libc still calls the 1095 # old syscall traps that have been obsoleted by the *at() interfaces. 1096 # Delete this to compile libc using only the new *at() system call traps 1097 CPPFLAGS += -D_RETAIN_OLD_SYSCALLS 1098 1099 # Inform the run-time linker about libc specialized initialization 1100 RTLDINFO = -z rtldinfo=tls_rtldinfo 1101 DYNFLAGS += $(RTLDINFO) 1102 1103 # Force libc's internal references to be resolved immediately upon loading 1104 # in order to avoid critical region problems. Since almost all libc symbols 1105 # are marked 'protected' in the mapfiles, this is a minimal set (15 to 20). 1106 DYNFLAGS += -znow 1107 1108 DYNFLAGS += -e __rtboot 1109 DYNFLAGS += $(EXTN_DYNFLAGS) 1110 1111 # Inform the kernel about the initial DTrace area (in case 1112 # libc is being used as the interpreter / runtime linker). 1113 DTRACE_DATA = -zdtrace=dtrace_data 1114 DYNFLAGS += $(DTRACE_DATA) 1115 1116 # DTrace needs an executable data segment. 1117 MAPFILE.NED= 1118 1119 BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 1120 1121 # Override this top level flag so the compiler builds in its native 1122 # C99 mode. This has been enabled to support the complex arithmetic 1123 # added to libc. 1124 C99MODE= $(C99_ENABLE) 1125 1126 # libc method of building an archive 1127 # The "$(GREP) -v ' L '" part is necessary only until 1128 # lorder is fixed to ignore thread-local variables. 1129 BUILD.AR= $(RM) $@ ; \ 1130 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)` 1131 1132 # extra files for the clean target 1133 CLEANFILES= \ 1134 $(LIBCDIR)/port/gen/errlst.c \ 1135 $(LIBCDIR)/port/gen/new_list.c \ 1136 assym.h \ 1137 genassym \ 1138 $(LIBCBASE)/crt/_rtld.s \ 1139 $(LIBCBASE)/crt/_rtbootld.s \ 1140 pics/_rtbootld.o \ 1141 pics/crti.o \ 1142 pics/crtn.o \ 1143 $(ALTPICS) 1144 1145 CLOBBERFILES += $(LIB_PIC) 1146 1147 # list of C source for lint 1148 SRCS= \ 1149 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \ 1150 $(XATTROBJS:%.o=$(SRC)/common/xattr/%.c) \ 1151 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \ 1152 $(DTRACEOBJS:%.o=$(SRC)/common/dtrace/%.c) \ 1153 $(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c) \ 1154 $(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c) \ 1155 $(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c) \ 1156 $(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c) \ 1157 $(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c) \ 1158 $(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c) \ 1159 $(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c) \ 1160 $(PORTSYS:%.o=$(LIBCDIR)/port/sys/%.c) \ 1161 $(AIOOBJS:%.o=$(LIBCDIR)/port/aio/%.c) \ 1162 $(RTOBJS:%.o=$(LIBCDIR)/port/rt/%.c) \ 1163 $(TPOOLOBJS:%.o=$(LIBCDIR)/port/tpool/%.c) \ 1164 $(THREADSOBJS:%.o=$(LIBCDIR)/port/threads/%.c) \ 1165 $(THREADSMACHOBJS:%.o=$(LIBCDIR)/$(MACH)/threads/%.c) \ 1166 $(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c) \ 1167 $(UNWINDMACHOBJS:%.o=$(LIBCDIR)/port/unwind/%.c) \ 1168 $(FPOBJS:%.o=$(LIBCDIR)/$(MACH)/fp/%.c) \ 1169 $(LIBCBASE)/crt/_ftou.c \ 1170 $(LIBCBASE)/gen/_xregs_clrptr.c \ 1171 $(LIBCBASE)/gen/byteorder.c \ 1172 $(LIBCBASE)/gen/ecvt.c \ 1173 $(LIBCBASE)/gen/getctxt.c \ 1174 $(LIBCBASE)/gen/lmul.c \ 1175 $(LIBCBASE)/gen/makectxt.c \ 1176 $(LIBCBASE)/gen/siginfolst.c \ 1177 $(LIBCBASE)/gen/siglongjmp.c \ 1178 $(LIBCBASE)/gen/swapctxt.c \ 1179 $(LIBCBASE)/sys/ptrace.c \ 1180 $(LIBCBASE)/sys/uadmin.c 1181 1182 # conditional assignments 1183 $(DYNLIB) := CRTI = crti.o 1184 $(DYNLIB) := CRTN = crtn.o 1185 1186 # Files which need the threads .il inline template 1187 TIL= \ 1188 aio.o \ 1189 alloc.o \ 1190 assfail.o \ 1191 atexit.o \ 1192 atfork.o \ 1193 cancel.o \ 1194 door_calls.o \ 1195 err.o \ 1196 errno.o \ 1197 getctxt.o \ 1198 lwp.o \ 1199 ma.o \ 1200 machdep.o \ 1201 posix_aio.o \ 1202 pthr_attr.o \ 1203 pthr_barrier.o \ 1204 pthr_cond.o \ 1205 pthr_mutex.o \ 1206 pthr_rwlock.o \ 1207 pthread.o \ 1208 rand.o \ 1209 rwlock.o \ 1210 scalls.o \ 1211 sched.o \ 1212 sema.o \ 1213 sigaction.o \ 1214 sigev_thread.o \ 1215 spawn.o \ 1216 stack.o \ 1217 swapctxt.o \ 1218 synch.o \ 1219 tdb_agent.o \ 1220 thr.o \ 1221 thread_interface.o \ 1222 thread_pool.o \ 1223 tls.o \ 1224 tsd.o \ 1225 unwind.o 1226 1227 $(TIL:%=pics/%) := CFLAGS += $(LIBCBASE)/threads/sparc.il 1228 1229 # special kludge for inlines with 'cas': 1230 pics/rwlock.o pics/synch.o pics/lwp.o pics/door_calls.o := \ 1231 sparc_CFLAGS += -_gcc=-Wa,-xarch=v8plus 1232 1233 # Files in port/fp subdirectory that need base.il inline template 1234 IL= \ 1235 __flt_decim.o \ 1236 decimal_bin.o 1237 1238 $(IL:%=pics/%) := CFLAGS += $(LIBCBASE)/fp/base.il 1239 1240 # Files in fp subdirectory which need __quad.il inline template 1241 QIL= \ 1242 _Q_add.o \ 1243 _Q_cmp.o \ 1244 _Q_cmpe.o \ 1245 _Q_div.o \ 1246 _Q_dtoq.o \ 1247 _Q_fcc.o \ 1248 _Q_mul.o \ 1249 _Q_qtod.o \ 1250 _Q_qtoi.o \ 1251 _Q_qtos.o \ 1252 _Q_qtou.o \ 1253 _Q_sqrt.o \ 1254 _Q_stoq.o \ 1255 _Q_sub.o 1256 1257 $(QIL:%=pics/%) := CFLAGS += $(LIBCDIR)/$(MACH)/fp/__quad.il 1258 pics/_Q%.o := sparc_COPTFLAG = -xO4 -dalign 1259 pics/__quad%.o := sparc_COPTFLAG = -xO4 -dalign 1260 1261 # large-file-aware components that should be built large 1262 1263 $(COMSYSOBJS64:%=pics/%) := \ 1264 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1265 1266 $(SYSOBJS64:%=pics/%) := \ 1267 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1268 1269 $(PORTGEN64:%=pics/%) := \ 1270 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1271 1272 $(PORTSTDIO64:%=pics/%) := \ 1273 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1274 1275 $(PORTSYS64:%=pics/%) := \ 1276 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1277 1278 $(PORTSTDIO_W:%=pics/%) := \ 1279 CPPFLAGS += -D_WIDE 1280 1281 $(PORTPRINT_W:%=pics/%) := \ 1282 CPPFLAGS += -D_WIDE 1283 1284 # printf/scanf functions to support c89-sized intmax_t variables 1285 $(PORTPRINT_C89:%=pics/%) := \ 1286 CPPFLAGS += -D_C89_INTMAX32 1287 1288 $(PORTSTDIO_C89:%=pics/%) := \ 1289 CPPFLAGS += -D_C89_INTMAX32 1290 1291 $(PORTI18N_COND:%=pics/%) := \ 1292 CPPFLAGS += -D_WCS_LONGLONG 1293 1294 # Files which need extra optimization 1295 pics/getenv.o := sparc_COPTFLAG = -xO4 1296 1297 .KEEP_STATE: 1298 1299 all: $(LIBS) $(LIB_PIC) 1300 1301 lint := CPPFLAGS += -I$(LIBCDIR)/$(MACH)/fp 1302 lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99 1303 lint := LINTFLAGS += -mn 1304 1305 lint: 1306 @echo $(LINT.c) ... $(LDLIBS) 1307 @$(LINT.c) $(SRCS) $(LDLIBS) 1308 1309 $(LINTLIB):= SRCS=$(LIBCDIR)/port/llib-lc 1310 $(LINTLIB):= CPPFLAGS += -D_MSE_INT_H 1311 $(LINTLIB):= LINTFLAGS=-nvx 1312 1313 # object files that depend on inline template 1314 $(TIL:%=pics/%): $(LIBCBASE)/threads/sparc.il 1315 $(IL:%=pics/%): $(LIBCBASE)/fp/base.il 1316 $(QIL:%=pics/%): $(LIBCDIR)/$(MACH)/fp/__quad.il 1317 1318 # include common libc targets 1319 include $(LIBCDIR)/Makefile.targ 1320 1321 # We need to strip out all CTF and DOF data from the static library 1322 $(LIB_PIC) := DIR = pics 1323 $(LIB_PIC): pics $$(PICS) 1324 $(BUILD.AR) 1325 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1326 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1327 $(AR) -ts $@ > /dev/null 1328 $(POST_PROCESS_A) 1329 1330 # special cases 1331 $(STRETS:%=pics/%): $(LIBCBASE)/crt/stret.s 1332 $(AS) $(ASFLAGS) -DSTRET$(@F:stret%.o=%) $(LIBCBASE)/crt/stret.s -o $@ 1333 $(POST_PROCESS_O) 1334 1335 $(LIBCBASE)/crt/_rtbootld.s: $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.c 1336 $(CC) $(CPPFLAGS) $(CTF_FLAGS) -O -S -K pic \ 1337 $(LIBCBASE)/crt/_rtld.c -o $(LIBCBASE)/crt/_rtld.s 1338 $(CAT) $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.s > $@ 1339 $(RM) $(LIBCBASE)/crt/_rtld.s 1340 1341 # partially built from C source 1342 pics/_rtbootld.o: $(LIBCBASE)/crt/_rtbootld.s 1343 $(AS) $(ASFLAGS) $(LIBCBASE)/crt/_rtbootld.s -o $@ 1344 $(CTFCONVERT_O) 1345 1346 ASSYMDEP_OBJS= \ 1347 _lwp_mutex_unlock.o \ 1348 _stack_grow.o \ 1349 asm_subr.o \ 1350 setjmp.o \ 1351 smt_pause.o \ 1352 tls_get_addr.o \ 1353 unwind_frame.o \ 1354 vforkx.o 1355 1356 $(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1357 1358 $(ASSYMDEP_OBJS:%=pics/%): assym.h 1359 1360 # assym.h build rules 1361 1362 assym.h := CFLAGS += -g 1363 1364 GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c 1365 1366 genassym: $(GENASSYM_C) 1367 $(NATIVECC) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \ 1368 $(CPPFLAGS.native) -o $@ $(GENASSYM_C) 1369 1370 OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1371 1372 assym.h: $(OFFSETS) genassym 1373 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1374 ./genassym >>$@ 1375 1376 # derived C source and related explicit dependencies 1377 $(LIBCDIR)/port/gen/errlst.c + \ 1378 $(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk 1379 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist 1380 1381 pics/errlst.o: $(LIBCDIR)/port/gen/errlst.c 1382 1383 pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c