On 27 February 2014 00:05, Simon Atanasyan <simon at atanasyan.com> wrote:> > Install tool invokes strip. GNU install allows to configure which > strip to use (--strip-program). In general (for example on FreeBSD) it > is not possible and install always runs just 'strip'. In case of > cross-compilation that leads to the error.Actually it is possible on FreeBSD -- from install(1): ENVIRONMENT The install utility checks for the presence of the STRIPBIN environment variable and if present, uses the assigned value as the program to run if and when the -s option has been specified. I'm not aware of other BSDs having this though, and supporting a collection of command options and environment settings on various platforms seems like it would be rather awkward. However, FreeBSD will likely soon migrate to strip, nm, size and such from the elftoolchain project, and those tools are natively cross-arch so strip should just work for this case.
On Thu, Feb 27, 2014 at 08:53:20AM -0500, Ed Maste wrote:> On 27 February 2014 00:05, Simon Atanasyan <simon at atanasyan.com> wrote: > > > > Install tool invokes strip. GNU install allows to configure which > > strip to use (--strip-program). In general (for example on FreeBSD) it > > is not possible and install always runs just 'strip'. In case of > > cross-compilation that leads to the error. > > Actually it is possible on FreeBSD -- from install(1): > > ENVIRONMENT > The install utility checks for the presence of the STRIPBIN environment > variable and if present, uses the assigned value as the program to run if > and when the -s option has been specified. > > I'm not aware of other BSDs having this though, and supporting a > collection of command options and environment settings on various > platforms seems like it would be rather awkward.For NetBSD, it is STRIP. Joerg
The problem seems to be the executable llvm-config-host this is the wrong file type for the machine that I'm on. I'm building a hosted mips clang/llvm compiler, starting by compiling llvm with clang/llvm on x86 producing a mips executable. The question then is where to run install. If I run install on the mips target, then file llvm-config-host is an x86 executable so strip will fail. ../install/bin/llvm-config-host: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x64e37bd56c1edc16be1447ec301bfce3f207477d, not stripped rkotler at mipsswbrd006-le:~/caviumllvmwclang/build$ If I tried to do the install on the host, there would be a bigger problem because then strip would fail on every other executable. So the main problem is that install should not be trying to strip rkotler at mipsswbrd006-le:~/caviumllvmwclang/build$ which strip /usr/bin/strip rkotler at mipsswbrd006-le:~/caviumllvmwclang/build$ Perhaps I just need to delete that file from the build directory. On 02/27/2014 06:19 AM, Joerg Sonnenberger wrote:> On Thu, Feb 27, 2014 at 08:53:20AM -0500, Ed Maste wrote: >> On 27 February 2014 00:05, Simon Atanasyan <simon at atanasyan.com> wrote: >>> >>> Install tool invokes strip. GNU install allows to configure which >>> strip to use (--strip-program). In general (for example on FreeBSD) it >>> is not possible and install always runs just 'strip'. In case of >>> cross-compilation that leads to the error. >> >> Actually it is possible on FreeBSD -- from install(1): >> >> ENVIRONMENT >> The install utility checks for the presence of the STRIPBIN environment >> variable and if present, uses the assigned value as the program to run if >> and when the -s option has been specified. >> >> I'm not aware of other BSDs having this though, and supporting a >> collection of command options and environment settings on various >> platforms seems like it would be rather awkward. > > For NetBSD, it is STRIP. > > Joerg >
All the tools in ./BuildTools/Release+Asserts/bin/ Are host tools. Since I'm not doing the make install on the target, then strip does not know about these. It knows enough to install these as xxx-host but not enough to not call strip. On 02/27/2014 06:19 AM, Joerg Sonnenberger wrote:> On Thu, Feb 27, 2014 at 08:53:20AM -0500, Ed Maste wrote: >> On 27 February 2014 00:05, Simon Atanasyan <simon at atanasyan.com> wrote: >>> >>> Install tool invokes strip. GNU install allows to configure which >>> strip to use (--strip-program). In general (for example on FreeBSD) it >>> is not possible and install always runs just 'strip'. In case of >>> cross-compilation that leads to the error. >> >> Actually it is possible on FreeBSD -- from install(1): >> >> ENVIRONMENT >> The install utility checks for the presence of the STRIPBIN environment >> variable and if present, uses the assigned value as the program to run if >> and when the -s option has been specified. >> >> I'm not aware of other BSDs having this though, and supporting a >> collection of command options and environment settings on various >> platforms seems like it would be rather awkward. > > For NetBSD, it is STRIP. > > Joerg >