Bug 17169 - gold: many_sections_define.h test fails: argument list too long error
Summary: gold: many_sections_define.h test fails: argument list too long error
Status: ASSIGNED
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.24
: P2 normal
Target Milestone: ---
Assignee: Cary Coutant
URL:
Keywords: testsuite
Depends on:
Blocks:
 
Reported: 2014-07-17 07:02 UTC by Chanho Park
Modified: 2022-02-24 01:37 UTC (History)
1 user (show)

See Also:
Host: arm
Target: arm
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chanho Park 2014-07-17 07:02:11 UTC
When I tried to build binutils 2.24 using our build system.
Actually, it occurred only arm(armv7l) build system.
Like openSUSE, we use obs build system for arm build.
It's compiled in the qemu environment.

We found below error during generating a many_sections_define.h.
It obviously occurred since 2.23.2.

[  942s] make[3]: Entering directory `/home/abuild/rpmbuild/BUILD/binutils-2.24.51/build-dir/binutils'
[  942s] make[3]: Nothing to be done for `info-am'.
[  942s] make[3]: Leaving directory `/home/abuild/rpmbuild/BUILD/binutils-2.24.51/build-dir/binutils'
[  942s] gcc -DHAVE_CONFIG_H -I. -I../../gprof  -DDEBUG -I../bfd -I../../gprof/../include -I../../gprof/../bfd  -I. -DLOCALEDIR="\"/usr/share/locale\""  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -O2 -g2 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=32 -Wformat -Wformat-security -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -g -Wno-error -MT symtab.o -MD -MP -MF .deps/symtab.Tpo -c -o symtab.o ../../gprof/symtab.c
[  943s] make[4]: Entering directory `/home/abuild/rpmbuild/BUILD/binutils-2.24.51/build-dir/gold/testsuite'
[  943s] (for i in `seq 1 70000`; do \
[  943s]    echo "int var_$i __attribute__((section(\"section_$i\"))) = $i;"; \
[  943s]  done) > many_sections_define.h.tmp
[  943s] make[4]: execvp: /bin/sh: Argument list too long
[  943s] make[4]: *** [many_sections_define.h] Error 127
[  943s] make[4]: Leaving directory `/home/abuild/rpmbuild/BUILD/binutils-2.24.51/build-dir/gold/testsuite'
[  943s] make[4]: Entering directory `/home/abuild/rpmbuild/BUILD/binutils-2.24.51/build-dir/gold'
[
Comment 1 Andreas Schwab 2014-07-17 08:11:11 UTC
This is most likely a qemu problem.
Comment 2 Mike Frysinger 2022-02-21 19:21:39 UTC
prob easy to rewrite with a shell loop, if desired