Lines Matching refs:link

400 link-extra-flags += -Wl,-z,now
403 # Command to run after every final link (executable or shared object).
404 # This is invoked with $(call after-link,...), so it should operate on
407 ifndef after-link
408 after-link =
411 # Additional libraries to link into every test.
412 link-extra-libs-tests = $(libsupport)
415 ifndef +link-pie
416 +link-pie-before-inputs = $(if $($(@F)-no-pie),$(no-pie-ldflag),-pie) \
423 +link-pie-before-libc = -o $@ $(+link-pie-before-inputs) \
426 $(+preinit) $(link-extra-libs) \
428 $(link-extra-libs)
429 +link-pie-after-libc = $(+postctorS) $(+postinit)
430 define +link-pie
431 $(CC) $(link-libc-rpath-link) $(+link-pie-before-libc) $(rtld-LDFLAGS) \
432 $(link-extra-flags) $(link-libc) $(+link-pie-after-libc)
433 $(call after-link,$@)
435 define +link-pie-tests
436 $(CC) $(+link-pie-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
437 $(+link-pie-after-libc)
438 $(call after-link,$@)
440 define +link-pie-printers-tests
441 $(CC) $(+link-pie-before-libc) $(built-rtld-LDFLAGS) \
442 $(link-libc-printers-tests) $(+link-pie-after-libc)
443 $(call after-link,$@)
447 ifndef +link-static
448 +link-static-before-inputs = -nostdlib -nostartfiles -static \
454 +link-static-before-libc = -o $@ $(+link-static-before-inputs) \
457 $(+preinit) $(link-extra-libs-static) \
459 $(link-extra-libs-static)
460 +link-static-after-libc = $(+postctorT) $(+postinit)
461 define +link-static
462 $(CC) $(+link-static-before-libc) $(link-extra-flags) $(link-libc-static) \
463 $(+link-static-after-libc)
464 $(call after-link,$@)
466 define +link-static-tests
467 $(CC) $(+link-static-before-libc) $(link-libc-static-tests) \
468 $(+link-static-after-libc)
469 $(call after-link,$@)
473 ifndef +link
479 +link = $(+link-pie)
480 +link-tests = $(+link-pie-tests)
481 +link-tests-before-inputs = $(+link-pie-before-inputs) $(rtld-tests-LDFLAGS)
482 +link-tests-after-inputs = $(link-libc-tests) $(+link-pie-after-libc)
483 +link-printers-tests = $(+link-pie-printers-tests)
485 +link-before-inputs = -nostdlib -nostartfiles $(no-pie-ldflag) \
490 +link-before-libc = -o $@ $(+link-before-inputs) \
493 $(+preinit) $(link-extra-libs) \
495 $(link-extra-libs)
496 +link-after-libc = $(+postctor) $(+postinit)
497 define +link
498 $(CC) $(link-libc-rpath-link) $(+link-before-libc) $(rtld-LDFLAGS) \
499 $(link-extra-flags) $(link-libc) $(+link-after-libc)
500 $(call after-link,$@)
502 +link-tests-before-inputs = $(+link-before-inputs) $(rtld-tests-LDFLAGS)
503 +link-tests-after-inputs = $(link-libc-tests) $(+link-after-libc)
504 define +link-tests
505 $(CC) $(+link-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \
506 $(+link-after-libc)
507 $(call after-link,$@)
509 define +link-printers-tests
510 $(CC) $(+link-before-libc) $(built-rtld-LDFLAGS) $(link-libc-printers-tests) \
511 $(+link-after-libc)
512 $(call after-link,$@)
516 +link = $(+link-static)
517 +link-tests = $(+link-static-tests)
518 +link-tests-before-inputs = $(+link-static-before-inputs)
519 +link-tests-after-inputs = $(link-libc-static-tests) $(+link-static-after-libc)
520 +link-printers-tests = $(+link-static-tests)
522 endif # +link
538 # These indicate whether to link using the built ld.so or the installed one.
556 ifndef link-libc
561 link-libc-rpath = -Wl,-rpath=$(rpath-link)
562 link-libc-rpath-link = -Wl,-rpath-link=$(rpath-link)
564 # For programs which are not tests, $(link-libc-rpath-link) is added
565 # directly in $(+link), $(+link-pie) above, so that -Wl,-rpath-link
567 # there. For shared objects, -Wl,-rpath-link is added via
571 # Tests use -Wl,-rpath instead of -Wl,-rpath-link for
574 link-libc-tests-rpath-link = $(link-libc-rpath)
575 link-test-modules-rpath-link = $(link-libc-rpath)
577 link-libc-tests-rpath-link = $(link-libc-rpath-link)
578 link-test-modules-rpath-link =
581 link-libc-between-gnulib = $(common-objpfx)libc.so$(libc.so-version) \
585 link-libc = $(link-libc-between-gnulib) $(gnulib)
587 link-libc-tests-after-rpath-link = $(gnulib-tests) $(link-libc-between-gnulib) $(gnulib-tests)
588 link-libc-tests = $(link-libc-tests-rpath-link) \
589 $(link-libc-tests-after-rpath-link)
590 # Pretty printer test programs always require rpath instead of rpath-link.
591 link-libc-printers-tests = $(link-libc-rpath) \
592 $(link-libc-tests-after-rpath-link)
596 rpath-link = \
599 link-libc = $(common-objpfx)libc.a $(otherlibs) $(gnulib) $(common-objpfx)libc.a $(gnulib)
600 link-libc-tests = $(common-objpfx)libc.a $(otherlibs) $(gnulib-tests) $(common-objpfx)libc.a $(gnul…
602 endif # link-libc
618 ifndef link-extra-libs
619 link-extra-libs = $(LDLIBS-$(@F))
620 link-extra-libs-static = $(link-extra-libs)
624 link-libc-static = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib) -Wl,--end-group
625 link-libc-static-tests = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib-tests) -Wl,--end-…
627 # How to link against libgcc. Some libgcc functions, such as those
651 # some cases and it is preferable to link with libgcc_eh or libgcc_s
673 # statically link programs. When --disable-shared is used, we use
739 $(rpath-link)$(patsubst %,:%,$(sysdep-library-path))
743 $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
744 $(filter -Wl$(comma)-rpath-link=%,\