[scc-dev] musl compilation on aarch64

From: Brian Mayer <bleemayer_at_gmail.com>
Date: Thu, 14 Mar 2024 17:14:45 -0300

Hello again.

Following up with the aarch64 support, now I'm trying to compile it
for a musl system, I'm using buildroot that uses GCC with a musl libc
compiled.

My build commands are:

make LIBPROFILE=musl config
make

Build fails while compiling something on qbe submodule:


make[4]: Entering directory
'/home/blmayer/git/distro/buildroot/output/build/scc-13fabd7c1b99fc97c8fe9cfb58f4e898eb8599f9/src/cmd'
/home/blmayer/git/distro/buildroot/output/host/bin/aarch64-buildroot-linux-musl-gcc
    -L../../lib/scc nm.o -lmach -lscc -o ../../bin/scc-nm
/home/blmayer/git/distro/buildroot/output/host/bin/aarch64-buildroot-linux-musl-gcc
    -L../../lib/scc ar.o posix.o -o ../../bin/scc-ar
/home/blmayer/git/distro/buildroot/output/host/bin/aarch64-buildroot-linux-musl-gcc
    -L../../lib/scc strip.o -lmach -lscc -o ../../bin/scc-strip
/home/blmayer/git/distro/buildroot/output/host/bin/aarch64-buildroot-linux-musl-gcc
    -L../../lib/scc size.o -lmach -lscc -o ../../bin/scc-size
/home/blmayer/git/distro/buildroot/output/host/bin/aarch64-buildroot-linux-musl-gcc
    -L../../lib/scc ranlib.o posix.o -lmach -lscc -o
../../bin/scc-ranlib
/home/blmayer/git/distro/buildroot/output/host/bin/aarch64-buildroot-linux-musl-gcc
    -L../../lib/scc objdump.o -lmach -o ../../bin/scc-objdump

/home/blmayer/git/distro/buildroot/output/host/bin/aarch64-buildroot-linux-musl-gcc
    -L../../lib/scc objcopy.o -lmach -o ../../bin/scc-objcopy
/home/blmayer/git/distro/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-musl/12.3.0/../../../../aarch64-buildroot-linux-musl/bin/ld:
ar.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `stderr'
which may bind externally can not be used when making a shared object;
recompile with -fPIC
/home/blmayer/git/distro/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-musl/12.3.0/../../../../aarch64-buildroot-linux-musl/bin/ld:
ar.o(.text+0x64): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation
against symbol `stderr'
/home/blmayer/git/distro/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-musl/12.3.0/../../../../aarch64-buildroot-linux-musl/bin/ld:
final link failed: bad value
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:63: ../../bin/scc-ar] Error 1

Not sure if the commands I'm issuing are correct. Can I get some help?

By the way, there is a minor note about make:

scripts/arm64.mk:7: target 'uninstall-arm64' given more than once in
the same rule

But that is easy I think.

Thanks again.
Brian
--
To unsubscribe send a mail to scc-dev+unsubscribe_at_simple-cc.org
Received on Thu 14 Mar 2024 - 21:14:45 CET

This archive was generated by hypermail 2.3.0 : Thu 14 Mar 2024 - 21:20:41 CET