[make-initrd] [PATCH 2/2] [e2k] ftbfs workaround (disable TLS)

Michael Shigorin mike at altlinux.org
Wed Aug 18 19:21:15 MSK 2021


The problem looks like this:

lcc: "/usr/include/bits/byteswap.h", line 105: error #1348: declaration hides
          variable "__x" (declared at line 706 of
          "/usr/src/RPM/BUILD/make-initrd-2.20.1/external/busybox/upstream/networking/tls.c")
          [-Werror=shadow=global]
        ({ register __uint64_t __v, __x = (x);                                \
                                    ^
 in expansion of macro "__bswap_64" at line 37 of "/usr/include/byteswap.h"
 in expansion of macro "bswap_64" at line 198 of
           "/usr/src/RPM/BUILD/make-initrd-2.20.1/external/busybox/upstream/include/platform.h"
 in expansion of macro "bb_bswap_64" at line 214 of
           "/usr/src/RPM/BUILD/make-initrd-2.20.1/external/busybox/upstream/include/platform.h"
 in expansion of macro "SWAP_BE64" at line 706 of
           "/usr/src/RPM/BUILD/make-initrd-2.20.1/external/busybox/upstream/networking/tls.c"
 in expansion of macro "SWAP_BE64" at line 706 of
           "/usr/src/RPM/BUILD/make-initrd-2.20.1/external/busybox/upstream/networking/tls.c"
        tls->write_seq64_be = SWAP_BE64(1 + SWAP_BE64(tls->write_seq64_be));
                              ^

We think it's improper for toolchain to define
quite common single-character symbols like this,
thus I've filed mcst bug #6061.
---
 make-initrd.spec | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/make-initrd.spec b/make-initrd.spec
index bc48e97..907d3ed 100644
--- a/make-initrd.spec
+++ b/make-initrd.spec
@@ -204,6 +204,11 @@ Feature adds smart card daemon and smart card utilities.
 
 %prep
 %setup
+%ifarch %e2k
+# avoid ftbfs due to __v shadowing in /usr/include/bits/byteswap.h (mcst#6061)
+sed -i -r 's,^CONFIG_(TLS|SSL_CLIENT|FEATURE_WGET_HTTPS)=y,CONFIG_\1=n,' \
+	external/busybox/config
+%endif
 
 %build
 ./autogen.sh
-- 
2.25.4



More information about the Make-initrd mailing list