package/dmalloc: needs -fPIC
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sat, 17 Apr 2021 10:49:19 +0000 (12:49 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sat, 1 May 2021 13:04:30 +0000 (15:04 +0200)
commit19ec872f169a851b48ba04d22432b7c0939847d4
tree7f6abac919e0596b2b638c8e52068f1d3b332250
parent7333207eaf2900076185cba6641c6406d61c235e
package/dmalloc: needs -fPIC

Drop first patch and pass -fPIC to configure to fix the following build
failure on ARC:

ERROR: architecture for "/usr/lib/libdmalloc.so" is "ARCompact", should be "ARCv2"
ERROR: architecture for "/usr/lib/libdmallocth.so" is "ARCompact", should be "ARCv2"
ERROR: architecture for "/usr/lib/libdmallocthcxx.so" is "ARCompact", should be "ARCv2"
ERROR: architecture for "/usr/lib/libdmallocxx.so" is "ARCompact", should be "ARCv2"

This build failure is due to the following configure error:

checking shared library link args... ./configure: line 4467: 10229 Segmentation fault      ( ${LD-ld} -shared --whole-archive -soname conftest.so -o conftest.so.t conftest.a ) 2>&5
/home/buildroot/autobuild/run/instance-0/output-1/host/bin/arc-buildroot-linux-gnu-ld -G -o $@.t

This configure error is due to missing -fPIC:

configure:4392: checking shared library link args
configure:4398: /home/buildroot/autobuild/run/instance-0/output-1/host/bin/arc-buildroot-linux-gnu-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g2  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5
configure:4404: $? = 0
configure:4408: test -z
 || test ! -s conftest.err
configure:4411: $? = 0
configure:4414: test -s conftest.o
configure:4417: $? = 0
/home/buildroot/autobuild/run/instance-0/output-1/host/bin/arc-buildroot-linux-gnu-ld: conftest.a(conftest.o): relocation R_ARC_32_ME against `__stack_chk_guard' can not be used when making a shared object; recompile with -fPIC
/home/buildroot/autobuild/run/instance-0/output-1/host/bin/arc-buildroot-linux-gnu-ld: BFD (GNU Binutils) 2.33.50.20191002 assertion fail elf32-arc.c:1805
/home/buildroot/autobuild/run/instance-0/output-1/host/bin/arc-buildroot-linux-gnu-ld: unrecognized option '-all'
/home/buildroot/autobuild/run/instance-0/output-1/host/bin/arc-buildroot-linux-gnu-ld: use the --help option for usage information
configure:4475: result: /home/buildroot/autobuild/run/instance-0/output-1/host/bin/arc-buildroot-linux-gnu-ld -G -o $@.t

Fixes:
 - http://autobuild.buildroot.org/results/65677d889c27649e1f3ca1f3b6c70df7c89779f6

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
12 files changed:
package/dmalloc/0001-add-fpic.patch [deleted file]
package/dmalloc/0001-mips.patch [new file with mode: 0644]
package/dmalloc/0002-fix-parallel-build.patch [new file with mode: 0644]
package/dmalloc/0002-mips.patch [deleted file]
package/dmalloc/0003-fix-parallel-build.patch [deleted file]
package/dmalloc/0003-fix-shlibs.patch [new file with mode: 0644]
package/dmalloc/0004-fix-shlibs.patch [deleted file]
package/dmalloc/0004-fix-strdup.patch [new file with mode: 0644]
package/dmalloc/0005-fix-strdup.patch [deleted file]
package/dmalloc/0005-fix-strndup.patch [new file with mode: 0644]
package/dmalloc/0006-fix-strndup.patch [deleted file]
package/dmalloc/dmalloc.mk