[ was: Re: x86_64 specific tests in dwz vs. other architectures ] On 11-12-2019 23:12, Jakub Jelinek wrote: > On Wed, Dec 11, 2019 at 10:33:33PM +0100, Tom de Vries wrote: >>> /builddir/build/BUILD/dwz/testsuite/dwz.tests/dw2-skip-prologue.S:309: Error: cannot represent relocation type BFD_RELOC_64 >>> as: /tmp/ccg3sw27.o: unsupported relocation type: 0x1 >>> on i686 etc. Can't we ensure that the tests are assembled only on the >>> corresponding architecture and nowhere else if they are architecture >>> specific? >>> It is fine if some tests are UNSUPPORTED, just we should completely skip >>> them if they can't be assembled. >> >> Indeed, the messages are ugly, but it's not a correctness problem, just >> an annoyance. >> >> The test execs are build directly from the makefile, not by dejagnu, so >> we can't use the target testing available there. I suppose I could test >> for uname -p: >> ... >> $ uname -p >> x86_64 >> ... > > Yeah, and if we e.g. require GNU make to build dwz, I thought we already required that, given the use of '+=', which is listed here ( https://www.gnu.org/software/make/manual/html_node/Features.html ) as something to avoid for portable Makefiles. Anyway, we're now using the addsuffix function, which I think is a GNUism. Also, I suspect the use of the shell function is non-portable, though I didn't find it mentioned at the link above. > we could use all kinds > of GNU make features to conditionalize it easily. > Though, at least for the tests where gdb isn't run on it, perhaps it might > be good enough to replace actual instructions in the assembly sources with > .skip or similar; of course it depends also if the location info doesn't > contain something horribly wrong on other architecture, probably can't mix > 32-bit and 64-bit and some arches use different characters in assembly, so > maybe some portability macros and preprocessing would be needed (e.g. > arm and a few others require %progbits rather than @progbits). I've fixed things for now in the most restrictive way: only compile hardcoded assembly test-cases on x86_64, if they were generated on x86_64, which should fix all those warnings. I hope to eventually replace all hardcoded assembly as well as compressed execs with dwarf assembly, which should work for all architectures. Thanks, - Tom