besser82/libxcrypt

Build failure on Microblaze since version 4.4.19

Closed this issue · 8 comments

Build fails on Microblaze since version 4.4.19 and 38f7f06 because libxcrypt assumes that all architectures support .symver attribute with gcc 10:

lib/crypt-gensalt-static.c:33:1: error: symver is only supported on ELF platforms
   33 | SYMVER_crypt_gensalt;
      | ^~~~~~~~~~~~~~~~~~~~

However, this is a wrong assumption for Microblaze: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766.
This build failure could be fixed by adding a test in autotools to check for .symver availability. We could also disable libxcrypt with Microblaze on buildroot. What is the best option?

Full build log: http://autobuild.buildroot.org/results/476/4766bfce9813b7f321369ec45298d16cd6dc251a/build-end.log

@ffontaine Can you please check and verify, whether the referenced PR will fix your issue?

Nope, the PR doesn't work.

static int foo( void ) { return 0; }
static int bar( void ) __attribute__(($1("foo@2.0")));

should be replaced by (inspired by libfuse/libfuse@3aba09a):

__attribute__(($1("foo@2.0")))
void foo(void) {}

Can you please retry with the updated PR?

Unfortunately, this is still not working.

The issue is still that

static int foo( void ) { return 0; }
static int bar( void ) __attribute__(($1("foo@2.0")));

is building fine whereas

__attribute__(($1("foo@2.0")))
void foo(void) {}

raises a build failure.
But I'm not an expert in symver attribute.

The issue is still that

static int foo( void ) { return 0; }
static int bar( void ) __attribute__(($1("foo@2.0")));

is building fine …

Sry, I didn't realize the static declarations in my testcase until now…

I hope, things will work as expected with the updated PR.

Yes, the updated PR is working fine, thanks for taking time to fix this issue.

You're welcome!

I've tagged v4.4.26 as a new version shipping this fix.