Closed sikmir closed 2 years ago
I guess it should be specified with some magic in Makefile.am
, but I can't find in automake documentation how to do it.
sorry for the late reply, I saw the notification but was busy
I guess it should be specified with some magic in Makefile.am
Exactly. We need to build pagebundler
with the host compiler,
but I can't find in automake documentation how to do it.
neither do I 🙈
I'll see what can be done. To be honest, pagebundler
was just a way to avoid checking if the linker is able to bundle files in shared objects. If we don't find a good way to convince automake to use the correct compiler, we can just as well use the linker and ask folks who cross-compile to use a recent-ish linker :)
Could you please test #6?
I've added two configure variables:
% ./configure --help | grep HOSTC
HOSTCC The C compiler on the host.
HOSTCFLAGS CFLAGS for the host compiler
which should help for the cross-compile use case. ./autogen.sh
now complains about:
Makefile.am:55: warning: user target 'pagebundler$(EXEEXT)' defined here ...
/usr/local/share/automake-1.16/am/program.am: ... overrides Automake target 'pagebundler$(EXEEXT)' defined here
Makefile.am:52: while processing program 'pagebundler'
but I think is fine.
In theory only ./configure --target=... HOSTCC=cc
should be needed, but I've added HOSTCFLAGS
too in case it helps (it defaults to CFLAGS
anyway.)
Could you please test #6?
Build is OK now:
telescope-aarch64-unknown-linux-gnu> ====> hostcc is /nix/store/da9l6ifizmh883j94gzx5n51h8lrrp00-gcc-wrapper-10.3.0/bin/cc
telescope-aarch64-unknown-linux-gnu> ====> hostcflags is $(CFLAGS)
Thanks!
I've tried to cross-compile telescope and build failed with:
The reason is that pagebundler should be built with build-platform compiler, not with target-pllatform compiler.