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