Fix genversion linker error.

Message ID 9bf1c85d-9bbb-9e17-1276-998474352f19@suse.cz
State New
Headers show
Series
  • Fix genversion linker error.
Related show

Commit Message

Martin Liška May 10, 2021, 9:40 a.m.
When renaming gcov-iov to genversion I forgot one hunk that led

to the following linker error:



ld: error: build/genversion.o: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC



It's a copy&paste error and I'm going to push it.



Martin

gcc/ChangeLog:

	* Makefile.in: Add missing genversion rule.
---
  gcc/Makefile.in | 4 ++++
  1 file changed, 4 insertions(+)

-- 
2.31.1

Patch

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 8091057a8a3..487db220d8c 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3032,6 +3032,10 @@  CFLAGS-build/genversion.o += -DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
  
  build/genversion.o: genversion.c $(BCONFIG_H) $(SYSTEM_H)
  
+build/genversion$(build_exeext): build/genversion.o
+	+$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) \
+		build/genversion.o -o $@
+
  version.h: s-version; @true
  s-version: build/genversion$(build_exeext)
  	build/genversion$(build_exeext) > tmp-version.h