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