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