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