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