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