summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2022-08-26 12:08:09 +0200
committerSlávek Banko <slavek.banko@axis.cz>2022-08-26 12:08:09 +0200
commit7671e683909a3d8dbabab6584f7bcddc983b6831 (patch)
tree7ba5d1475bb6b99aef0a756f5a4fffa664a17bc5
parent6706910e4ff0e9cee42b617f84a5bd0fe9b7fb89 (diff)
downloadlibr-7671e683909a3d8dbabab6584f7bcddc983b6831.tar.gz
libr-7671e683909a3d8dbabab6584f7bcddc983b6831.zip
Use __WORDSIZE instead of BFD_HOST_64BIT_LONGr14.1.1r14.1.0
to verify the conformity of architecture. This resolves FTBFS with binutils >= 2.39 on amd64. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--src/libr-bfd.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libr-bfd.h b/src/libr-bfd.h
index 7b6ea3e..9fae8f5 100644
--- a/src/libr-bfd.h
+++ b/src/libr-bfd.h
@@ -7,11 +7,12 @@
#include <stdint.h>
#include <bfd.h>
-#if BFD_HOST_64BIT_LONG
+#if (__WORDSIZE == 64)
#if defined(__i386)
#error "Using incorrect binutils header file for architecture."
#endif
-#else
+#endif
+#if (__WORDSIZE == 32)
#if defined(__amd64)
#error "Using incorrect binutils header file for architecture."
#endif