Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use AM_PROG_AR to find ar #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

lopsided98
Copy link

This is needed to support prefixed compilers when cross-compiling. Currently, attempting to cross-compile results in the following error:

ar cru libcli++.a main.o messages.o only_long.o
/nix/store/26a78ync552m8j4sbjavhvkmnqir8c9y-bash-4.4-p23/bin/bash: ar: command not found
make[3]: *** [Makefile:321: libcli++.a] Error 127
make[3]: Leaving directory '/build/nullmailer-2.2/lib/cli++'
make[2]: *** [Makefile:449: all-recursive] Error 1
make[2]: Leaving directory '/build/nullmailer-2.2/lib'
make[1]: *** [Makefile:364: all-recursive] Error 1
make[1]: Leaving directory '/build/nullmailer-2.2'
make: *** [Makefile:305: all] Error 2

This is needed to support prefixed compilers when cross-compiling.
@lopsided98
Copy link
Author

I still rely on this patch to cross-compile nullmailer, and it would be great to get it merged.

Note that when I refer to prefixed compilers, I mean that the binary names are prefixed with a target description, like armv7l-unknown-linux-gnueabihf-. Therefore, ar in my environment is named armv7l-unknown-linux-gnueabihf-ar. This is a standard convention when working with cross-toolchains, and is supported other macros like AC_PROG_CC. See also: https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html

AM_PROG_AR was added in automake 1.11.2 (released Dec. 2011, see release notes). I believe older versions will still work, but they may produce a warning about an undefined macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant