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