SHA256
1
0
forked from pool/binutils
binutils/binutils-znow.patch
Michael Matz 3baf335380 Accepting request 963860 from home:msmeissn:branches:devel:gcc
- Add usage of a SUSE_ZNOW environment variable which allows switching
  on "-z now" by default using "export SUSE_ZNOW=1", similar to
  the SUSE_ASNEEDED variable.

- Add usage of a SUSE_ZNOW environment variable which allows switching
  on "-z now" by default using "export SUSE_ZNOW=1", similar to
  the SUSE_ASNEEDED variable.

- Add usage of a SUSE_ZNOW environment variable which allows switching
  on "-z now" by default using "export SUSE_ZNOW=1", similar to
  the SUSE_ASNEEDED variable.

- Add usage of a SUSE_ZNOW environment variable which allows switching
  on "-z now" by default using "export SUSE_ZNOW=1", similar to
  the SUSE_ASNEEDED variable.

- Add usage of a SUSE_ZNOW environment variable which allows switching
  on "-z now" by default using "export SUSE_ZNOW=1", similar to
  the SUSE_ASNEEDED variable.

- Add usage of a SUSE_ZNOW environment variable which allows switching
  on "-z now" by default using "export SUSE_ZNOW=1", similar to
  the SUSE_ASNEEDED variable.

- Add usage of a SUSE_ZNOW environment variable which allows switching
  on "-z now" by default using "export SUSE_ZNOW=1", similar to
  the SUSE_ASNEEDED variable.

- Add usage of a SUSE_ZNOW environment variable which allows switching
  on "-z now" by default using "export SUSE_ZNOW=1", similar to

OBS-URL: https://build.opensuse.org/request/show/963860
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=397
2022-03-22 13:30:49 +00:00

16 lines
548 B
Diff

Index: binutils-2.38/ld/ldmain.c
===================================================================
--- ld/ldmain.c
+++ ld/ldmain.c
@@ -309,6 +309,10 @@ main (int argc, char **argv)
#endif
if (getenv ("SUSE_ASNEEDED") && atoi(getenv ("SUSE_ASNEEDED")) > 0)
input_flags.add_DT_NEEDED_for_regular = true;
+ if (getenv ("SUSE_ZNOW") && atoi(getenv ("SUSE_ZNOW")) > 0) {
+ link_info.flags |= (bfd_vma) DF_BIND_NOW;
+ link_info.flags_1 |= (bfd_vma) DF_1_NOW;
+ }
config.build_constructors = true;
config.rpath_separator = ':';