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