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 33LIBCDIR= $(SRC)/lib/libc 34LIB_PIC= libc_pic.a 35VERS= .1 36CPP= /usr/lib/cpp 37TARGET_ARCH= sparc 38 39# objects are grouped by source directory 40 41# Symbol capabilities objects. 42EXTPICS= \ 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 51STRETS= 52 53CRTOBJS= \ 54 __align_cpy_2.o \ 55 __align_cpy_4.o \ 56 __align_cpy_8.o \ 57 _ftou.o \ 58 cerror.o 59 60DYNOBJS= 61 62FPOBJS= \ 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 98FPOBJS64= \ 99 _Qp_qtox.o \ 100 _Qp_qtoux.o \ 101 _Qp_xtoq.o \ 102 _Qp_uxtoq.o \ 103 __dtoul.o \ 104 __ftoul.o 105 106FPASMOBJS= \ 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 119ATOMICOBJS= \ 120 atomic.o 121 122CHACHAOBJS= \ 123 chacha.o 124 125XATTROBJS= \ 126 xattr_common.o 127 128COMOBJS= \ 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 140GENOBJS= \ 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'. 174COMSYSOBJS64= 175 176SYSOBJS64= 177 178COMSYSOBJS= \ 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 312SYSOBJS= \ 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'. 332PORTGEN64= 333 334# objects from source under $(LIBCDIR)/port 335PORTFP= \ 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 364PORTGEN= \ 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 623PORTINET= \ 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 631PORTPRINT_W= \ 632 doprnt_w.o 633 634PORTPRINT= \ 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'. 650PORTSTDIO64= 651 652PORTSTDIO_W= \ 653 doscan_w.o 654 655PORTSTDIO= \ 656 __extensions.o \ 657 _endopen.o \ 658 _filbuf.o \ 659 _findbuf.o \ 660 _flsbuf.o \ 661 _stdio_flags.o \ 662 _wrtchk.o \ 663 clearerr.o \ 664 ctermid.o \ 665 ctermid_r.o \ 666 cuserid.o \ 667 data.o \ 668 doscan.o \ 669 fdopen.o \ 670 feof.o \ 671 ferror.o \ 672 fgetc.o \ 673 fgets.o \ 674 fileno.o \ 675 flockf.o \ 676 flush.o \ 677 fmemopen.o \ 678 fopen.o \ 679 fpos.o \ 680 fputc.o \ 681 fputs.o \ 682 fread.o \ 683 fseek.o \ 684 fseeko.o \ 685 ftell.o \ 686 ftello.o \ 687 fwrite.o \ 688 getc.o \ 689 getchar.o \ 690 getline.o \ 691 getpass.o \ 692 gets.o \ 693 getw.o \ 694 mse.o \ 695 open_memstream.o \ 696 open_wmemstream.o \ 697 popen.o \ 698 putc.o \ 699 putchar.o \ 700 puts.o \ 701 putw.o \ 702 rewind.o \ 703 scanf.o \ 704 setbuf.o \ 705 setbuffer.o \ 706 setvbuf.o \ 707 system.o \ 708 tempnam.o \ 709 tmpfile.o \ 710 tmpnam_r.o \ 711 ungetc.o \ 712 vscanf.o \ 713 vwscanf.o \ 714 wscanf.o 715 716PORTI18N= \ 717 getwchar.o \ 718 putwchar.o \ 719 putws.o \ 720 strtows.o \ 721 wcsnlen.o \ 722 wcstoimax.o \ 723 wcstol.o \ 724 wcstoul.o \ 725 wcswcs.o \ 726 wscat.o \ 727 wschr.o \ 728 wscmp.o \ 729 wscpy.o \ 730 wscspn.o \ 731 wsdup.o \ 732 wslen.o \ 733 wsncat.o \ 734 wsncmp.o \ 735 wsncpy.o \ 736 wspbrk.o \ 737 wsprintf.o \ 738 wsrchr.o \ 739 wsscanf.o \ 740 wsspn.o \ 741 wstod.o \ 742 wstok.o \ 743 wstol.o \ 744 wstoll.o \ 745 wsxfrm.o \ 746 wmemchr.o \ 747 wmemcmp.o \ 748 wmemcpy.o \ 749 wmemmove.o \ 750 wmemset.o \ 751 wcsstr.o \ 752 gettext.o \ 753 gettext_real.o \ 754 gettext_util.o \ 755 gettext_gnu.o \ 756 plural_parser.o \ 757 wdresolve.o \ 758 _ctype.o \ 759 isascii.o \ 760 toascii.o 761 762PORTI18N_COND= \ 763 wcstol_longlong.o \ 764 wcstoul_longlong.o 765 766PORTLOCALE= \ 767 big5.o \ 768 btowc.o \ 769 c16rtomb.o \ 770 c32rtomb.o \ 771 collate.o \ 772 collcmp.o \ 773 euc.o \ 774 fnmatch.o \ 775 fgetwc.o \ 776 fgetws.o \ 777 fix_grouping.o \ 778 fputwc.o \ 779 fputws.o \ 780 fwide.o \ 781 gb18030.o \ 782 gb2312.o \ 783 gbk.o \ 784 getdate.o \ 785 isdigit.o \ 786 iswctype.o \ 787 ldpart.o \ 788 lmessages.o \ 789 lnumeric.o \ 790 lmonetary.o \ 791 localeconv.o \ 792 localeimpl.o \ 793 mbftowc.o \ 794 mblen.o \ 795 mbrlen.o \ 796 mbrtoc16.o \ 797 mbrtoc32.o \ 798 mbrtowc.o \ 799 mbsinit.o \ 800 mbsnrtowcs.o \ 801 mbsrtowcs.o \ 802 mbstowcs.o \ 803 mbtowc.o \ 804 mskanji.o \ 805 nextwctype.o \ 806 nl_langinfo.o \ 807 none.o \ 808 rune.o \ 809 runetype.o \ 810 setlocale.o \ 811 setrunelocale.o \ 812 strcasecmp.o \ 813 strcasestr.o \ 814 strcoll.o \ 815 strfmon.o \ 816 strftime.o \ 817 strncasecmp.o \ 818 strptime.o \ 819 strxfrm.o \ 820 table.o \ 821 timelocal.o \ 822 tolower.o \ 823 towlower.o \ 824 ungetwc.o \ 825 utf8.o \ 826 wcrtomb.o \ 827 wcscasecmp.o \ 828 wcscoll.o \ 829 wcsftime.o \ 830 wcsnrtombs.o \ 831 wcsrtombs.o \ 832 wcstombs.o \ 833 wcswidth.o \ 834 wcsxfrm.o \ 835 wctob.o \ 836 wctomb.o \ 837 wctrans.o \ 838 wctype.o \ 839 wcwidth.o \ 840 wscol.o 841 842AIOOBJS= \ 843 aio.o \ 844 aio_alloc.o \ 845 posix_aio.o 846 847RTOBJS= \ 848 clock_timer.o \ 849 mqueue.o \ 850 pos4obj.o \ 851 sched.o \ 852 sem.o \ 853 shm.o \ 854 sigev_thread.o 855 856SECFLAGSOBJS= \ 857 secflags.o 858 859TPOOLOBJS= \ 860 thread_pool.o 861 862THREADSOBJS= \ 863 alloc.o \ 864 assfail.o \ 865 c11_thr.o \ 866 cancel.o \ 867 door_calls.o \ 868 tmem.o \ 869 pthr_attr.o \ 870 pthr_barrier.o \ 871 pthr_cond.o \ 872 pthr_mutex.o \ 873 pthr_rwlock.o \ 874 pthread.o \ 875 rwlock.o \ 876 scalls.o \ 877 sema.o \ 878 sigaction.o \ 879 spawn.o \ 880 synch.o \ 881 tdb_agent.o \ 882 thr.o \ 883 thread_interface.o \ 884 tls.o \ 885 tsd.o 886 887THREADSMACHOBJS= \ 888 machdep.o 889 890THREADSASMOBJS= \ 891 asm_subr.o 892 893UNICODEOBJS= \ 894 u8_textprep.o \ 895 uconv.o 896 897UNWINDMACHOBJS= \ 898 unwind.o 899 900UNWINDASMOBJS= \ 901 unwind_frame.o 902 903# Preserved solely to ease maintenance of 32-bit and 64-bit library builds 904# This macro should ALWAYS be empty; native APIs are already 'large file'. 905PORTSYS64= 906 907PORTSYS= \ 908 _autofssys.o \ 909 access.o \ 910 acctctl.o \ 911 bsd_signal.o \ 912 chmod.o \ 913 chown.o \ 914 corectl.o \ 915 eventfd.o \ 916 epoll.o \ 917 exacctsys.o \ 918 execl.o \ 919 execle.o \ 920 execv.o \ 921 fcntl.o \ 922 getpagesizes.o \ 923 getpeerucred.o \ 924 inst_sync.o \ 925 issetugid.o \ 926 label.o \ 927 link.o \ 928 lockf.o \ 929 lwp.o \ 930 lwp_cond.o \ 931 lwp_rwlock.o \ 932 lwp_sigmask.o \ 933 meminfosys.o \ 934 mkdir.o \ 935 mknod.o \ 936 msgsys.o \ 937 nfssys.o \ 938 open.o \ 939 pgrpsys.o \ 940 posix_sigwait.o \ 941 ppriv.o \ 942 psetsys.o \ 943 rctlsys.o \ 944 readlink.o \ 945 rename.o \ 946 sbrk.o \ 947 semsys.o \ 948 set_errno.o \ 949 sharefs.o \ 950 shmsys.o \ 951 sidsys.o \ 952 siginterrupt.o \ 953 signal.o \ 954 signalfd.o \ 955 sigpending.o \ 956 sigstack.o \ 957 stat.o \ 958 symlink.o \ 959 tasksys.o \ 960 time.o \ 961 time_util.o \ 962 timerfd.o \ 963 ucontext.o \ 964 unlink.o \ 965 ustat.o \ 966 utimesys.o \ 967 zone.o 968 969PORTREGEX= \ 970 glob.o \ 971 regcmp.o \ 972 regcomp.o \ 973 regerror.o \ 974 regex.o \ 975 regexec.o \ 976 regfree.o \ 977 wordexp.o 978 979VALUES= values-Xa.o 980 981MOSTOBJS= \ 982 $(STRETS) \ 983 $(CRTOBJS) \ 984 $(DYNOBJS) \ 985 $(FPOBJS) \ 986 $(FPOBJS64) \ 987 $(FPASMOBJS) \ 988 $(ATOMICOBJS) \ 989 $(CHACHAOBJS) \ 990 $(XATTROBJS) \ 991 $(COMOBJS) \ 992 $(GENOBJS) \ 993 $(PRFOBJS) \ 994 $(PORTFP) \ 995 $(PORTGEN) \ 996 $(PORTGEN64) \ 997 $(PORTI18N) \ 998 $(PORTI18N_COND) \ 999 $(PORTINET) \ 1000 $(PORTLOCALE) \ 1001 $(PORTPRINT) \ 1002 $(PORTPRINT_W) \ 1003 $(PORTREGEX) \ 1004 $(PORTSTDIO) \ 1005 $(PORTSTDIO64) \ 1006 $(PORTSTDIO_W) \ 1007 $(PORTSYS) \ 1008 $(PORTSYS64) \ 1009 $(AIOOBJS) \ 1010 $(RTOBJS) \ 1011 $(SECFLAGSOBJS) \ 1012 $(TPOOLOBJS) \ 1013 $(THREADSOBJS) \ 1014 $(THREADSMACHOBJS) \ 1015 $(THREADSASMOBJS) \ 1016 $(UNICODEOBJS) \ 1017 $(UNWINDMACHOBJS) \ 1018 $(UNWINDASMOBJS) \ 1019 $(COMSYSOBJS) \ 1020 $(SYSOBJS) \ 1021 $(COMSYSOBJS64) \ 1022 $(SYSOBJS64) \ 1023 $(VALUES) 1024 1025TRACEOBJS= \ 1026 plockstat.o 1027 1028# NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o 1029# modules whose source is provided in the $(SRC)/lib/crt directory. 1030# This must be done because otherwise the Sun C compiler would insert 1031# its own versions of these modules and those versions contain code 1032# to call out to C++ initialization functions. Such C++ initialization 1033# functions can call back into libc before thread initialization is 1034# complete and this leads to segmentation violations and other problems. 1035# Since libc contains no C++ code, linking with the minimal crti.o and 1036# crtn.o modules is safe and avoids the problems described above. 1037OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN) 1038CRTSRCS= ../../crt/sparc 1039 1040# include common library definitions 1041include $(SRC)/lib/Makefile.lib 1042include $(SRC)/lib/Makefile.lib.64 1043 1044# we need to override the default SONAME here because we might 1045# be building a variant object (still libc.so.1, but different filename) 1046SONAME = libc.so.1 1047 1048CFLAGS64 += $(CCVERBOSE) 1049 1050# This is necessary to avoid problems with calling _ex_unwind(). 1051# We probably don't want any inlining anyway. 1052CFLAGS64 += -xinline= 1053 1054CERRWARN += -_gcc=-Wno-parentheses 1055CERRWARN += -_gcc=-Wno-switch 1056CERRWARN += $(CNOWARN_UNINIT) 1057CERRWARN += -_gcc=-Wno-unused-value 1058CERRWARN += -_gcc=-Wno-unused-label 1059CERRWARN += -_gcc=-Wno-unused-variable 1060CERRWARN += -_gcc=-Wno-type-limits 1061CERRWARN += -_gcc=-Wno-char-subscripts 1062CERRWARN += -_gcc=-Wno-clobbered 1063CERRWARN += -_gcc=-Wno-unused-function 1064CERRWARN += -_gcc=-Wno-address 1065 1066# Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...) 1067# enables ASSERT() checking in the threads portion of the library. 1068# This is automatically enabled for DEBUG builds, not for non-debug builds. 1069THREAD_DEBUG = 1070$(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG 1071 1072# Make string literals read-only to save memory. 1073CFLAGS64 += $(XSTRCONST) 1074 1075ALTPICS= $(TRACEOBJS:%=pics/%) 1076 1077$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS) 1078 1079MAPFILES = $(LIBCDIR)/port/mapfile-vers 1080 1081sparcv9_C_PICFLAGS= $(sparcv9_C_BIGPICFLAGS) 1082CFLAGS64 += $(EXTN_CFLAGS) 1083CPPFLAGS= -D_REENTRANT -Dsparc $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \ 1084 -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master) 1085ASFLAGS= $(EXTN_ASFLAGS) $(AS_BIGPICFLAGS) -P -D__STDC__ -D_ASM -D__sparcv9 $(CPPFLAGS) \ 1086 $(sparcv9_AS_XARCH) 1087 1088# As a favor to the dtrace syscall provider, libc still calls the 1089# old syscall traps that have been obsoleted by the *at() interfaces. 1090# Delete this to compile libc using only the new *at() system call traps 1091CPPFLAGS += -D_RETAIN_OLD_SYSCALLS 1092 1093# Inform the run-time linker about libc specialized initialization 1094RTLDINFO = -z rtldinfo=tls_rtldinfo 1095DYNFLAGS += $(RTLDINFO) 1096 1097# Force libc's internal references to be resolved immediately upon loading 1098# in order to avoid critical region problems. Since almost all libc symbols 1099# are marked 'protected' in the mapfiles, this is a minimal set (15 to 20). 1100DYNFLAGS += -znow 1101 1102DYNFLAGS += $(EXTN_DYNFLAGS) 1103 1104BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 1105 1106# Override this top level flag so the compiler builds in its native 1107# C99 mode. This has been enabled to support the complex arithmetic 1108# added to libc. 1109CSTD= $(CSTD_GNU99) 1110 1111# libc method of building an archive 1112# The "$(GREP) -v ' L '" part is necessary only until 1113# lorder is fixed to ignore thread-local variables. 1114BUILD.AR= $(RM) $@ ; \ 1115 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)` 1116 1117# extra files for the clean target 1118CLEANFILES= \ 1119 $(LIBCDIR)/port/gen/errlst.c \ 1120 $(LIBCDIR)/port/gen/new_list.c \ 1121 assym.h \ 1122 genassym \ 1123 pics/crti.o \ 1124 pics/crtn.o \ 1125 $(ALTPICS) 1126 1127CLOBBERFILES += $(LIB_PIC) 1128 1129# conditional assignments 1130$(DYNLIB) := CRTI = crti.o 1131$(DYNLIB) := CRTN = crtn.o 1132 1133# Files which need the threads .il inline template 1134TIL= \ 1135 aio.o \ 1136 alloc.o \ 1137 assfail.o \ 1138 atexit.o \ 1139 atfork.o \ 1140 cancel.o \ 1141 door_calls.o \ 1142 err.o \ 1143 errno.o \ 1144 getctxt.o \ 1145 lwp.o \ 1146 ma.o \ 1147 machdep.o \ 1148 posix_aio.o \ 1149 pthr_attr.o \ 1150 pthr_barrier.o \ 1151 pthr_cond.o \ 1152 pthr_mutex.o \ 1153 pthr_rwlock.o \ 1154 pthread.o \ 1155 rand.o \ 1156 rwlock.o \ 1157 scalls.o \ 1158 sched.o \ 1159 sema.o \ 1160 sigaction.o \ 1161 sigev_thread.o \ 1162 spawn.o \ 1163 stack.o \ 1164 swapctxt.o \ 1165 synch.o \ 1166 tdb_agent.o \ 1167 thr.o \ 1168 thread_interface.o \ 1169 thread_pool.o \ 1170 tls.o \ 1171 tsd.o \ 1172 unwind.o 1173 1174$(TIL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/threads/sparcv9.il 1175 1176# Files in fp, port/fp subdirectories that need base.il inline template 1177IL= \ 1178 __flt_decim.o \ 1179 decimal_bin.o 1180 1181$(IL:%=pics/%) := CFLAGS64 += $(LIBCBASE)/fp/base.il 1182 1183# Files in fp subdirectory which need __quad.il inline template 1184QIL= \ 1185 _Q_add.o \ 1186 _Q_cmp.o \ 1187 _Q_cmpe.o \ 1188 _Q_div.o \ 1189 _Q_dtoq.o \ 1190 _Q_fcc.o \ 1191 _Q_mul.o \ 1192 _Q_qtod.o \ 1193 _Q_qtoi.o \ 1194 _Q_qtos.o \ 1195 _Q_qtou.o \ 1196 _Q_sqrt.o \ 1197 _Q_stoq.o \ 1198 _Q_sub.o \ 1199 _Qp_qtox.o \ 1200 _Qp_qtoux.o 1201 1202$(QIL:%=pics/%) := CFLAGS64 += $(LIBCDIR)/$(MACH)/fp/__quad.il 1203pics/_Qp%.o := CFLAGS64 += -I$(LIBCDIR)/$(MACH)/fp 1204pics/_Q%.o := sparcv9_COPTFLAG = -xO4 -xchip=ultra 1205 1206# Files in crt subdirectory which need muldiv64.il inline template 1207#CIL= mul64.o divrem64.o 1208#$(CIL:%=pics/%) := CFLAGS += $(LIBCBASE)/crt/mul64.il 1209 1210# large-file-aware components that should be built large 1211 1212#$(COMSYSOBJS64:%=pics/%) := \ 1213# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1214 1215#$(SYSOBJS64:%=pics/%) := \ 1216# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1217 1218#$(PORTGEN64:%=pics/%) := \ 1219# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1220 1221#$(PORTSTDIO64:%=pics/%) := \ 1222# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1223 1224#$(PORTSYS64:%=pics/%) := \ 1225# CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 1226 1227$(PORTSTDIO_W:%=pics/%) := \ 1228 CPPFLAGS += -D_WIDE 1229 1230$(PORTPRINT_W:%=pics/%) := \ 1231 CPPFLAGS += -D_WIDE 1232 1233$(PORTI18N_COND:%=pics/%) := \ 1234 CPPFLAGS += -D_WCS_LONGLONG 1235 1236pics/arc4random.o := CPPFLAGS += -I$(SRC)/common/crypto/chacha 1237 1238# Files which need extra optimization 1239pics/getenv.o := sparcv9_COPTFLAG = -xO4 1240 1241.KEEP_STATE: 1242 1243all: $(LIBS) $(LIB_PIC) 1244 1245# object files that depend on inline template 1246$(TIL:%=pics/%): $(LIBCBASE)/threads/sparcv9.il 1247$(IL:%=pics/%): $(LIBCBASE)/fp/base.il 1248$(QIL:%=pics/%): $(LIBCDIR)/$(MACH)/fp/__quad.il 1249#$(CIL:%=pics/%): $(LIBCBASE)/crt/muldiv64.il 1250 1251# include common libc targets 1252include $(LIBCDIR)/Makefile.targ 1253 1254# We need to strip out all CTF and DOF data from the static library 1255$(LIB_PIC) := DIR = pics 1256$(LIB_PIC): pics $$(PICS) 1257 $(BUILD.AR) 1258 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1 1259 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1 1260 $(AR) -ts $@ > /dev/null 1261 $(POST_PROCESS_A) 1262 1263# special cases 1264#$(STRETS:%=pics/%): crt/stret.s 1265# $(AS) $(ASFLAGS) -DSTRET$(@F:stret%.o=%) crt/stret.s -o $@ 1266# $(POST_PROCESS_S_O) 1267 1268#crt/_rtbootld.s: crt/_rtboot.s crt/_rtld.c 1269# $(CC) $(CPPFLAGS) -O -S -K pic crt/_rtld.c -o crt/_rtld.s 1270# $(CAT) crt/_rtboot.s crt/_rtld.s > $@ 1271# $(RM) crt/_rtld.s 1272 1273ASSYMDEP_OBJS= \ 1274 _lwp_mutex_unlock.o \ 1275 _stack_grow.o \ 1276 asm_subr.o \ 1277 setjmp.o \ 1278 smt_pause.o \ 1279 tls_get_addr.o \ 1280 unwind_frame.o \ 1281 vforkx.o 1282 1283$(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I. 1284 1285$(ASSYMDEP_OBJS:%=pics/%): assym.h 1286 1287# assym.h build rules 1288 1289assym.h := CFLAGS64 += $(CCGDEBUG) 1290 1291GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c 1292LDFLAGS.native = $(LDASSERTS) $(ZASSERTDEFLIB)=libc.so $(BDIRECT) 1293 1294genassym: $(GENASSYM_C) 1295 $(NATIVECC) $(NATIVE_CFLAGS) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \ 1296 $(CPPFLAGS.native) $(LDFLAGS.native) -o $@ $(GENASSYM_C) 1297 1298OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in 1299 1300assym.h: $(OFFSETS) genassym 1301 $(OFFSETS_CREATE) <$(OFFSETS) >$@ 1302 ./genassym >>$@ 1303 1304# derived C source and related explicit dependencies 1305$(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk 1306 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist 1307 1308pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c 1309