Bug 2352 - also look for host-prefixed ar, to avoid using ie /usr/bin/ar when cross compiling
Summary: also look for host-prefixed ar, to avoid using ie /usr/bin/ar when cross comp...
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: -current
Hardware: Other Linux
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_6_9
  Show dependency treegraph
 
Reported: 2015-02-19 19:00 AEDT by Peter Ãstrand
Modified: 2016-08-02 10:41 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Ãstrand 2015-02-19 19:00:12 AEDT
It seems like this patch:

http://lists.mindrot.org/pipermail/openssh-unix-dev/2013-September/031646.html

...was never accepted. If there are no good reasons to object it, please apply.
Comment 1 Darren Tucker 2015-04-13 18:53:59 AEST
The proposed change to configure.ac is:

-AC_PATH_PROG([AR], [ar])
+AC_CHECK_TOOLS([AR], [ar])

The autoconf man page says:

"Like AC_CHECK_PROG, but first looks for prog-to-check-for with a prefix of the host type as specified by --host, followed by a dash."

compared to AC_PATH_PROG which says:

"Like AC_CHECK_PROG, but set variable to the absolute name of prog-to-check-for if found. The result of this test can be overridden by setting the variable variable. A positive result of this test is cached in the ac_cv_path_variable variable."

I think we just use AR in the Makefile so I don't see a reason it could not be changed.
Comment 2 Darren Tucker 2015-04-17 09:39:29 AEST
comparing the output of configure before and after the proposed change shows

-checking for ar... /usr/bin/ar
+checking for ar... ar

and a similar change in Makefile.

Some of the other tools (notably the compiler) are not referenced by full path so I guess we're not adding any new dependencies on $PATH.
Comment 3 Darren Tucker 2015-04-17 09:44:05 AEST
Patch applied and will be in 6.9p1.

Thanks!
Comment 4 Damien Miller 2016-08-02 10:41:25 AEST
Close all resolved bugs after 7.3p1 release