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