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