Bug 17306 - Patch to make crosscompilation of libtool more well-behaved
Summary: Patch to make crosscompilation of libtool more well-behaved
Status: ASSIGNED
Alias: None
Product: Scratchbox 2
Classification: Unclassified
Component: generic (show other bugs)
Version: 1.99.0.x
Hardware: Other All
: medium normal
Assignee: Lauri Leukkunen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-26 02:36 UTC by Linus Walleij
Modified: 2008-09-26 14:35 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch that makes libtool crosscompile on my host (720 bytes, patch)
2008-08-26 02:36 UTC, Linus Walleij
Details | Splinter Review

Description Linus Walleij 2008-08-26 02:36:37 UTC
Created attachment 18521 [details] [review]
Patch that makes libtool crosscompile on my host

On my host (RHEL 3) the libtool cross-compilaton with the
CodeSourcery toolchain doesn't work out very well. This patch
fixes two issues:

1) Loose the --strip-components=1 argument to tar and instead
   just descend into the untar:ed directory. --strip-components
   is a very new features in tar, please don't use it yet in
   a few years. If you absolutely have to untar into the current
   directory, I'll come up with something, perhaps like:

   tar zxf $LOCAL_SOURCEFILE
   cd $NAME-$VERSION
   mv * ..
   cd ..
   rm -rf $NAME-$VERSION

2) I don't know for sure what the libtool build is intended
   to do, please document... I assume that it wants to
   cross-compile libtool for the target, simply. Using just
   --build=<target-triplet> won't work, you need --build
   --host and --target like this, and $(uname -m) will on my
   setup give you arm-* when crosscompiling, and the
   compiler tries to use an ARM host to build. (Then you'd
   have to use sb2 in QEMU, catch 22.)

This excerpt of how it looked before was anonymized with "<path>" 
inserted for the path on my build system:

Running <path>/bin/sb2-build-libtool failed
You can run this manually later, otherwise your
sb2 environment is correctly setup and ready to use
> sb2-init -m maemo maemo <path>/bin/arm-none-linux-gnueabi-gcc
Using <path>/bin/arm-none-linux-gnueabi-gcc to detect target architecture:
Reading mode-specific settings..
Finished writing sb2.config
checking for a BSD-compatible install... <path>/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... <path>/bin/mkdir -p
checking for gawk... /usr/bin/awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
 
 
Running <path>/bin/sb2-build-libtool failed
You can run this manually later, otherwise your
sb2 environment is correctly setup and ready to use
Comment 1 Lauri Leukkunen 2008-09-26 14:35:10 UTC
The build is supposed to take place inside SB2, so cross-compiling should happen by default. I believe that it fails, the reason is not so clear. This needs a bit more investigation before I'm willing to change the ./configure step.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.