Commit Graph

21 Commits

Author SHA1 Message Date
Alexey Neyman
59bab98b2d Revert "Determine whether -E/-r option selects extended regexp"
This reverts commit 7bcf18bfab.
2017-02-26 19:06:35 -08:00
Alexey Neyman
df1e3e32cf Revert "Fix breakage from sed_r change in some auxiliary scripts"
This reverts commit 5ea3f2967f.
2017-02-26 19:06:10 -08:00
Alexey Neyman
5ea3f2967f Fix breakage from sed_r change in some auxiliary scripts
... do not overquote the variables from paths.sh.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-16 12:45:51 -08:00
Alexey Neyman
7bcf18bfab Determine whether -E/-r option selects extended regexp
... and then use the right option. See the note in scripts/functions
on where we should use ${foo} and where just 'foo'; this boils down to
whether we can expect the build tools override to be in effect (e.g. in
the actual build scripts) or not (i.e. outside of scripts/build).
While running in scripts/functions, or in scripts/crosstool-NG.sh the
build tools override directory (.build/tools/bin) may have not been
set up (yet, or at all).

Also, modify the installed scripts (populate, xldd) accordingly.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-13 22:47:40 -08:00
Bryan Hundven
6f8e89cb5c consistency: Use exported variables of required tools
We check for apps:

* make
* sed
* grep
* awk
* libtool/libtoolize
* install
* patch
* and more

...during configure. Our scripts should be consistent about using the
variables that define where the found tool was found.

Of course, we do hard-link these tools in buildtools, but that should be
a backup for the components we are building. Our scripts should always
use the tools we find.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-11-17 02:48:09 -08:00
Yann E. MORIN
fb321268f7 populate: also search for gconv modules
The gconv modules are present in the (e)glibc toolchains, and some
applications directly link with one or more of those modules (even
though the classic way of using them is by dlopen()ing them).

So, also look in /usr/lib/gconv when searching for libraries.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2015-05-31 21:23:36 +02:00
Jean-Marie Lemetayer
991ec3ac85 populate: fix empty files.list
The output format of the file(1) command have changed since (at least)
the version 5.14. We need to to take care of an extra space.

Signed-off-by: Jean-Marie Lemetayer <jeanmarie.lemetayer@gmail.com>
[yann.morin.1998@free.fr: do not right-shift trailing back-slashes]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2014-09-11 23:34:59 +02:00
Anthony Foiani
e9cb0c788c Allow multi-word "install" command.
Autoconf can determine that the correct install command includes flags,
e.g., "/usr/bin/install -c".  When using this as a command, we can't
enclose the value in double-quotes, as that makes some shells use the
whole expression as a filename:

  # this is the value returned by autoconf and stored in CT_install
  $ ins="/usr/bin/install -c"

  # if we call it with quotes, the command is not found
  $ "${ins}"
  bash: /usr/bin/install -c: No such file or directory

  # removing the quotes lets it work as expected
  $ ${ins}
  /usr/bin/install: missing file operand
  Try `/usr/bin/install --help' for more information.

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
2012-04-26 19:55:59 -06:00
Yann E. MORIN"
c009897aee misc: fix more typos here and there...
Reported-by: "Antony N. Pavlov" <antony@niisi.msk.ru>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-07-17 16:53:40 +02:00
Yann E. MORIN"
94be1f470c config: add an option to name the sysroot directory
Depending on local policies, some users have expressed a need to
have the sysroot be named differently than the hard-coded name.

Add an option for that.
Default to 'sysroot' to match the existing literature.

While at it, replace 'sys-root' with 'sysroot' everywhere we
reference the sysroot.

Reported-by: Alexey Kuznetsov <Alexey.KUZNETSOV@youtransactor.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-01-25 20:31:16 +01:00
Yann E. MORIN"
d8d2459ca4 scripts/populate: optimise search loop
Curently, populate will iterate over all ELF (shared objects|executables)
to look for missing NEEDED DSOs, adding to the list at every iterations
of the search loop.

Instead of looking again at previously handled ELF files, recursively
resolve every ELf files.

Also, in case there are a whole lot of files (more than the shell can
accept as arguments list, or creating a command line longer than the
shell can cope with), use a temporary file with the list of files
to search for missing dependencies.
2010-03-29 00:15:32 +02:00
Yann E. MORIN"
ec4181e4d2 scripts/populate: cleanups and misc fixes
- it's a POSIX compliant shell script: drop bash, use /bin/sh
- fix help text
- use an absolute path for sysroot
- replace "echo" with "printf"
- replace "stat -c '%i'" with "ls -1id"
- replace "pushd / popd" with "cd / cd -"
- remove superfluous break
- bail out if required lib not found, except if forced
2010-03-28 23:01:19 +02:00
Yann E. MORIN"
1913d355b3 scripts/populate: fix handling the forced libraries list-file
If a list-file is used, then each library in the file will be handled
twice (not a real issue, as the second iteration will find the library
already present, just avoid doing the job twice).
2010-03-26 23:17:23 +01:00
Yann E. MORIN"
f36ceb7f54 scripts/populate: properly locate the sysroot and required tools
This fixes two problems:
- the sysroot might be in a sub-directory (think SYSROOT_DIR_PREFIX)
- it is not needed to have the target tuple to properly detect the sysroot
  and the required tools

As a side effect, this script is now no longer dependent on the target
tuple, and in the future, we might be able to share it across many
toolchains (when/if we can install all of them in the same place).
2010-03-25 22:42:00 +01:00
Yann E. MORIN"
a67a23877f scripts/populate: add -m option, to merge source and dest
Merge the source rootfs into the (pre-existing) destination rootfs,
and populate the result accordingly.
2010-03-24 22:36:51 +01:00
Nate Case
ceca768ee6 scripts/populate: add option to use an alternate sysroot
Add a new command line option, "-r", which allows the user to specify
an alternate sysroot location to copy libraries from.  This is useful
when using the toolchain in combination with a separate root filesystem,
or when working with multiple different root filesystems.

Signed-off-by: Nate Case <ncase@xes-inc.com>
2010-03-23 19:27:41 +01:00
Yann E. MORIN"
8908eb3037 misc: do not use "tar cf - |tar xf -"
Using this: tar cf - -C "/some/place" |tar xf - -C "/some/other/place"
to copy a directory to another place does not properly fail (when it does).

Using this instead: cp -av "/some/place" "/some/other/place"
makes it easy to see why and how it failed.

Impacted:
    libc/uClibc
    debug/ltrace
    tools/sstrip
    scripts/populate
2010-01-02 18:00:54 +01:00
Yann E. MORIN"
c564be2675 populate: fix installing dynamic linker 'ld.so'
The dynamic linker, ld.so, needs the execute bit to be set.
Detect tht the library being installed is in fact ld.so and
install it with 0755 instead of 0644.

Fix detecting src == dst.

Use a simpler command to copy src -> dst.

Also change echo to printf, get rid of 'echo -n', which is
highly non-portable.


 -------- diffstat follows --------
 /trunk/scripts/populate.in |   76    43    33     0 +++++++++++++++++++++++++++++-----------------------
 1 file changed, 43 insertions(+), 33 deletions(-)
2009-06-11 21:47:19 +00:00
Yann E. MORIN"
8eed91405e Fix populate to correctly use tools discovered via ./configure.
/trunk/scripts/functions   |   11     8     3     0 ++++++++---
 /trunk/scripts/populate.in |    6     4     2     0 ++++--
 2 files changed, 12 insertions(+), 5 deletions(-)
2009-02-01 22:41:16 +00:00
Yann E. MORIN"
2aaa5b8b68 Update populate:
- use tools found by ./configure
- some POSIX and eye-candy cleanups

 /trunk/scripts/functions   |    7     4     3     0 +++--
 /trunk/scripts/populate.in |   70    46    24     0 ++++++++++++++++++++++++++++++++++------------------
 2 files changed, 50 insertions(+), 27 deletions(-)
2009-01-29 22:35:26 +00:00
Yann E. MORIN"
790695af6f Move populate.in from tools/ to scripts/
/trunk/scripts/crosstool.sh |    2     1     1     0 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2008-12-11 18:16:54 +00:00