Hi David,

On Mon, Mar 26, 2018 at 01:28:53PM -0700, David Anderson wrote:
> I figured out a simple way to cross-build while
> completely separating build-time objects from target
> objects. Using AC_PATH_PROG as Helmut suggested.
> 
> Nothing complicated about it. Simple 'make'.

Cool. Before we continue, could you do a brief terminology check? Both
autotols and Debian (dpkg) use GNU terminology[1] for build/host/target.
This notably differs from mozilla terminology and tends to cause
confusion. Please stick with GNU terminology, because it is the one that
autotools use and it is more expressive than mozilla terminology.

> Tested with --host=gcc-arm-linux-gnueabihf

This is not a supported host architecture for Debian. It's the cross
compiler package name. The value to pass to --host should be just
arm-linux-gnueabihf.

> which generates libdwarf as arm fine, but
> the dwarfdump final link fails because
> AC_TRY_COMPILE looks for -lz and looks
> in the build machine location, not the cross area.

If AC_TRY_COMPILE checks build aspects rather than host aspects,
something is seriously wrong. You likely need to check for a bad CC
variable or like that in config.status.

> Because the cross area does not have -lz,
> while the build environment does I need
> to find out at build time about
> that target library.

If you need a libz for arm, you need to install it of course. You can
install regular arm packages on your amd64 machine. For doing so, you
enable armhf as an foreign architecture (dpkg --add-architecture armhf),
update your package cache and install zlib1g-dev:armhf.

> I'm not sure how to fix this part, cannot
> find anything on the web but words admitting it is
> a problem.

If all else fails, we can simply wait for Fabian to upload your changes
(even if that takes months). When doing so he'll close this bug, which
triggers a test rebuild on my cross buildd (and has done so previously,
the process works!) and will likely result in me sending patches again.

I have still plenty (like 10000) packages to fix. ;) Thus I aim for
throughput, not low latency.

> Any suggestions to detect -lz in the target
> libraries?

There are too many strange aspects above to say something useful. Maybe
I can say more after addressing those points.

Helmut

[1] https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html

Reply via email to