Bug 388971 - Add unit test to check for R_386_PC32 relocations, patch by Ted fixed up by myself, r=theotheroneofus a=build only
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 13 Oct 2010 08:43:03 -0400
changeset 55412 b4811d1b1feab72f666ffeff27ec334e42cf0c57
parent 55411 0582d89db9307dbed9113377ab81eed5f97b76bd
child 55413 a6ed567bdfb8f8c7165a4f09ac983827c1797611
push idunknown
push userunknown
push dateunknown
reviewerstheotheroneofus, build
bugs388971
milestone2.0b8pre
Bug 388971 - Add unit test to check for R_386_PC32 relocations, patch by Ted fixed up by myself, r=theotheroneofus a=build only
Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -223,8 +223,15 @@ maybe_clobber_profiledbuild: clean
 else
 maybe_clobber_profiledbuild:
 endif
 else
 maybe_clobber_profiledbuild:
 endif
 
 .PHONY: maybe_clobber_profiledbuild
+
+# Look for R_386_PC32 relocations in shared libs, these
+# break x86_64 builds and SELinux users.
+ifeq ($(OS_TARGET)_$(TARGET_XPCOM_ABI),Linux_x86-gcc3)
+scheck::
+	@relcount=`find $(DIST)/bin -name "*.so" | xargs objdump -R | grep R_386_PC32 | wc -l` && if test $$relcount -gt 0; then echo "FAILED: R_386_PC32 relocations detected in a shared library.  Did you use a system header without adding it to config/system-headers?"; exit 1; else echo "PASSED"; fi
+endif