We tell the autoconf configure script that we are going to install stuff
to prefix "/" with libdir being set to "/lib", so the script ends up writing
"libdir='/lib'" to the libtool *.la scripts.
This is all fine and dandy until we do a 'make install' with DESTDIR set to
our actual package deploy directory. Libtool goes "OMG WTF we aren't
instaling to / afterall" and thinks it needs to do a relinking phase.
During relinking, it passes "-L$libdir" to gcc, which ends up as "-L/lib".
Now, gcc tries to link against local system libraries. Best case, the build
breaks and we know something stupid happened. It really bites us if we try
to cross compile from e.g. x86 to x86.
Until now, it worked to simply patch the *.la scripts before 'make install',
like other distros do, but recent versions of util-linux now ship with a
newer version of the libtool script which simply regenerates the *.la files.
This commit adds an extension to the patch script that patches the actuall
libtool script itself.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Automagically strip all executables (recursively for subdirectories in lib
and bin) inside the mk.sh build loop.
This removes the necessity in the build scripts to strip the files. This also
allows us to remove the error prone install-strip target from the build
scripts.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
When "libdir" is not the final path where we install the library,
libtool will mess up the relinking process and prepend the global
library directories to the linker search path.
If we fix the libdir path, libtool will insert it into the rpath
in the binary, which is also pretty bonkers.
Maybe, there is a way to do this correctly, but the various GNU
mailing lists, Debian wiki, etc.. could not provide a better
alternative than patching up libtool scripts.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
The simplification of the overide behaviour may be worth the slight
duplication overhead.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
- build needs a pair of product and board name
- some products can only be built for some boards
- Config files in product/<name> directory override those in board/<name>
- For some config files, like LDPATH or ROOTFS, the files are merged
- product/common provides defaults
Add default config for various services:
- Add default config for unbound
- Add default config for dnsmasq
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
- Don't duplicate shared objects, use the ones from the deploy
directory when building dependend packages
- Add helper function for moving headers, static libraries
and pkgconfig data to devdeploy directory
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>