Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] toolchain/toolchain-wrapper: fix gcc -v with relro
@ 2020-12-23 18:27 Fabrice Fontaine
  2020-12-23 20:17 ` Peter Seiderer
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Fontaine @ 2020-12-23 18:27 UTC (permalink / raw)
  To: buildroot

rhash in version 1.4.0 with relro fails to build because gcc -v raises
the following build failure:

/data/buildroot-test/instance-1/output-1/host/mips64el-buildroot-linux-gnu/sysroot/soft-float/el/usr/lib64/Scrt1.o: In function `__start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
Run result: 1

This buid failure is raised because the toolchain-wrapper calls gcc with
-Wl,-z,relro and as a result gcc wrongly assumes that some linking must
be done with -v

Fixes:
 - http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 toolchain/toolchain-wrapper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c
index 0fb6064b1c..4c3375cfbc 100644
--- a/toolchain/toolchain-wrapper.c
+++ b/toolchain/toolchain-wrapper.c
@@ -456,7 +456,8 @@ int main(int argc, char **argv)
 	/* Are we building the Linux Kernel or U-Boot? */
 	for (i = 1; i < argc; i++) {
 		if (!strcmp(argv[i], "-D__KERNEL__") ||
-		    !strcmp(argv[i], "-D__UBOOT__"))
+		    !strcmp(argv[i], "-D__UBOOT__") ||
+		    !strcmp(argv[i], "-v"))
 			break;
 	}
 	if (i == argc) {
-- 
2.29.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-23 23:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-23 18:27 [Buildroot] [PATCH 1/1] toolchain/toolchain-wrapper: fix gcc -v with relro Fabrice Fontaine
2020-12-23 20:17 ` Peter Seiderer
2020-12-23 21:13   ` Fabrice Fontaine
2020-12-23 23:07     ` Peter Seiderer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox