Commit Graph

1230 Commits

Author SHA1 Message Date
Yann E. MORIN"
6530528cf9 scripts/functions: fix debug-shell
Properly catch resuming the build when continuing past the
failed command.

The 'case ;;&' construct is a bash4ism. Get rid of it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
(transplanted from 2af20cfd210bac338ec18d774458c84fd585ef07)
2012-11-22 19:43:26 +01:00
Daniel Price
b15822f702 scripts: fail on ':' in paths
Signed-off-by: Daniel Price <daniel.price@gmail.com>
[yann.morin.1998@free.fr: split original patch for self-contained changes]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <163f86b5216fc08c672a.1353459722@nipigon.dssd.com>
Patchwork-Id: 200536
(transplanted from 15cd5dc25929d0ccd0e1f187fe721a1ca0d48919)
2012-11-20 16:59:17 -08:00
Daniel Price
6ea41bead2 scripts: unquoted variable reference in glibc-eglibc.sh-common
Signed-off-by: Daniel Price <daniel.price@gmail.com>
Message-Id: <12f092a95a94bcf76912.1353367250@redfish.dssd.com>
Patchwork-Id: 200215
(transplanted from 51160d293e1fdbd69305310d3b34aa0054ce2399)
2012-11-19 15:20:13 -08:00
Johannes Stezenbach
a8318facc4 libc/eglibc: enable rpc in eglibc-2.16+
While eglibc-2.16 recommends to use TI-RPC instead of the old sunrpc, the
old one can be included using a configure option. Since the user can still
use TI-RPC to override the libc implementation, we enable rpc unconditionally.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Message-Id: <20121102140404.GA7707@sig21.net>
Patchwork-Id: 196564
2012-11-02 04:04:04 +00:00
Yann E. MORIN"
05a3ceff5a scripts/xldd: fix debug output layout
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-11-07 21:55:42 +01:00
Yann E. MORIN"
baba086806 libc/uClibc: remove use of snapshots and specific date
We now have the ability to use a custom location, so supporting
snapshots or custom date is no longer needed. Let the user do the
required preparation in this case.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-10-31 23:31:32 +01:00
David Holsgrove
5ed8715c9d libc/uClibc: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom
CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: fix indentation, don't patch custom dir location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <712995e3e719fbbe24af.1349931201@localhost.localdomain>
PatchWork-Id: 190794
2012-10-11 14:39:44 +10:00
Johannes Stezenbach
5ddbc863e1 scripts/functions: fix endless loop in debug-shell with IO redirection
CT_DEBUG_INTERACTIVE is disabled when stdin, stdout or
stderr are redirected, but the check is only done at
the start of the build and doesn't catch when individual
build commands use redirection.  When stdin is redirected
it will cause the debug shell to exit immediately, causing
and endless loop.  Thus, save the stdin/our/err file handles
and restore them before invoking the debug shell.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Message-Id: <20121030102225.GA8303@sig21.net>
Patchwork-Id: 195409
2012-10-30 00:22:25 +00:00
Johannes Stezenbach
34a6501a2e scripts/functions: use patch -i instead of IO redirection
This makes the patch name show up on the command line
logged by CT_DoExecLog so it's easier to see
what is going on.  The -i for patch is specified
by Posix and supported by GNU patch and busybox patch.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[yann.morin.1998@free.fr: remove now-useless debug message]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <20121030103620.GB8303@sig21.net>
Patchwork-Id: 195418
2012-10-30 00:36:20 +00:00
Yann E. MORIN"
de0ef330c3 libc/newlib: remove getting from CVS
We now have the ability to use a custom local directory/tarball, so
it no longer makes sense to have the ability to use the CVS repository.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-10-30 22:40:48 +01:00
David Holsgrove
66a2b08680 libc/newlib: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom
CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: fix indentation]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <d02252752d4dc5e68ae3.1349931202@localhost.localdomain>
PatchWork-Id: 190795
2012-10-11 14:39:45 +10:00
Yann E. MORIN"
8bcd5c689c cc/gcc: remove svn source
Since we now have the opportunity to use a custom local directory/tarball
as the source for gcc, it no longer makes sense to retrieve gcc ourselves
from its subversion repository.

Cc: Bryan Hundven <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-10-30 00:30:47 +01:00
Yann E. MORIN"
79243c2f8d debug/gdb: remove ncurses cleanup
That's legacy code that was usefull when ncurses was installed
in the sysroot. Still it's not longer the case (it's installed
in a special dedicated directory), we can remove that piece of
code.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-10-30 00:23:51 +01:00
David Holsgrove
35f55a7495 debug/gdb: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom
CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: don't patch custom dir location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <9ea1b5021fc77582867f.1349931197@localhost.localdomain>
PatchWork-Id: 190791
2012-10-11 14:39:42 +10:00
David Holsgrove
33d3919c3e binutils/elf2flt: Add CUSTOM version, CUSTOM_LOCATION config options, GetCustom
CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.

Change elf2flt CT_ELF2FLT_VERSION from 'head' to 'cvs' if cvs selected in config

Also remove hardcoded 'cvs-' from elf2flt component name, used in CT_Extract,
CT_Patch and as the CT_SRC_DIR location for the configure stage.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: fix indentation, don't patch custom dir location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <288db3721a37844defa5.1349931196@localhost.localdomain>
PatchWork-Id: 190789
2012-10-11 14:39:42 +10:00
David Holsgrove
2ace8ed697 binutils/binutils: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom
CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: fix indentation, don't patch custom dir location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <7a604b5df9c84a1e20c3.1349931195@localhost.localdomain>
PatchWork-Id: 190788
2012-10-11 14:39:41 +10:00
David Holsgrove
6b8740dd6d cc/gcc: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom
CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: don't patch custom directory location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <f2272ac0f37cedd0bb91.1349931194@localhost.localdomain>
PatchWork-Id: 190787
2012-10-11 14:39:41 +10:00
Johannes Stezenbach
b8baed585d fix eglibc-2.16 manual build
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Message-Id: <20121022133228.GA16536@sig21.net>
Patchwork-Id: 193156
2012-10-22 03:32:28 +00:00
Yann E. MORIN"
f378c3c1ff scripts/functions: return a proper error code in CT_DoExecLog
Since we added the debug-shell feature, CT_DoExecLog no longer
returns the error code of the command, but always return 0.

This breaks the download mechanism, which relies on CT_DoExecLog
to fail _on_purpose_ to detect that the ressource was not found
at the specified URL.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-10-21 22:27:17 +02:00
Yann E. MORIN"
623a30ed45 scripts/functions: properly catch failure in CT_Test* helpers
So we get caught by the trap-handler and
have a chance to run the debug-shell.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Johannes Stezenbach <js@sig21.net>
2012-10-17 22:01:25 +02:00
Yann E. MORIN"
dd98145bc1 scripts: add option to start an interactive debug shell
Add an option that, when a command fails:
  - starts an interactive shell with the failed command's environment
  - attempts re-execution of the failed command, continues, or aborts
    at user's whim.

Before starting the debug-shell, the backtrace is printed.
When exiting for an abort, the standard error message is printed.

Based on an idea and a patch from: Johannes Stezenbach <js@sig21.net>
    http://sourceware.org/ml/crossgcc/2012-09/msg00144.html

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[yann.morin.1998@free.fr: integrate in the fault handler]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Johannes Stezenbach <js@sig21.net>
Patchwork-Id: 191571
Patchwork-Id: 191668
2012-10-06 23:48:07 +02:00
Johannes Stezenbach
df3be9eef3 scripts: move backtrace marker to CT_WORK_DIR
Avoid error when commands in scripts/crosstool-NG.sh fail
before CT_BUILD_DIR is set.

So we need to remove the backtrace marker of a potential previous
build. Previously, it was implicitly removed because we did remove
the directory it was in, which is no longer the case.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[yann.morin.1998@free.fr: remove backtrace marker on start of build]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <20121015094615.GA18673@sig21.net>
Patchwork-Id: 191498
2012-10-14 23:46:15 +00:00
Yann E. MORIN"
899981e4c4 scripts: fix default work-dir name
It's been a long time the default work-dir changed its name
from 'target' to '.build'.

Change the left-over.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-10-17 21:52:59 +02:00
Yann E. MORIN"
8a1008cf4f kernel/linux: fix missing 'then'
Reported-by: David Holsgrove <david.holsgrove@xilinx.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-10-17 21:21:44 +02:00
Yann E. MORIN"
e1806b1d22 kernel/linux: fix using custom location
Currently, extract and patch are skipped as thus:
  - using a custom directory of pre-installed headers
  - a correctly named directory already exists

Otherwise, extract and patch are done.

The current second condition is wrong, because it allows the following
sequence to happen:
  - a non-custom kernel is used
  - a previous build only partially extracted the non-custom sources
  - that p[revious build broke during extraction (eg. incomplete tarball...)
  - a subsequent build will find a properly named directory, and will
    thus skip extract and patch, which is wrong

Fix that by following the conditions in this table:

Type                  | Extract | Patch
----------------------+---------+-------
Pre-installed headers |    N    |   N
custom directory      |    N    |   N
custom tarball        |    Y    |   N
mainstream tarball    |    Y    |   Y

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: David Holsgrove <david.holsgrove@xilinx.com>
2012-10-16 20:57:44 +02:00
David Holsgrove
1e0b160dd8 scripts: update config.sub
Latest from upstream config-patches repo. (No change to config.guess)

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
Message-Id: <f15b7c69c142e935391e.1350284600@localhost.localdomain>
Patchwork-Id: 191476
2012-10-15 16:59:11 +10:00
David Holsgrove
bdc4ed3df1 kernel/linux: use generic custom infrastructure
Config options remain the same as before, just generalised to be used by other
components also.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: fix indentation, fix comment]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <50674fe47431174aab80.1349931193@localhost.localdomain>
PatchWork-Id: 190786
2012-10-11 14:39:40 +10:00
David Holsgrove
f242016a09 scripts/functions: add a generic custom location infrastructure
Add a generic custom location infrastructure (inspired by the one in
kernel/linux) to allow the user to use custom tarballs or directories
for any component.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: move config option, improve help text, fix API doc]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <131c163c69f9cc81d2be.1349931191@localhost.localdomain>
PatchWork-Id: 190784
Message-Id: <0bbaba9190a76ba97f72.1349931192@localhost.localdomain>
PatchWork-Id: 190785
2012-10-04 13:26:14 +10:00
Yann E. MORIN"
dad17e6e88 cc/gcc: do not print multilib for canadian-cross
Previous import from patchwork missed one hunk (in cset #d8feb93b3e49)
Apply it now.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Patchwork-Id: 189053
2012-10-13 18:26:26 +02:00
David Holsgrove
071606c0a0 scripts/gcc: Canadian Cross skip -print-multi-lib log output
Attempting to ${CT_TARGET}-gcc -print-multi-lib will fail

In do_cc_core_backend, for the final compiler in a canadian cross
baremetal, warn that multi-libs cannot be determined

In do_cc_backend, for either final compiler for a canadian cross,
warn that multi-libs cannot be determined

(Plus fixed CT_PREFIX_DIR in do_cc_backend to be ${prefix})

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
Message-Id: <CAM=EW8aQDoNx-CkJHjXBoDP4iTDJ8z5hh3=KhO5UTU6rp3Pj=w@mail.gmail.com>
Patchwork-Id: 189053
2012-10-04 15:59:31 +10:00
Zhenqiang Chen
5094e8bc0a debug/gdb: disable nls when CT_TOOLCHAIN_ENABLE_NLS is not selected
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
Message-Id: <CACgzC7Bn+WpbgDruNeZ4s1z0x1deF6n4YyS22Dy7p_d1fFDVCA@mail.gmail.com>
PatchWork-Id: 191042
2012-09-29 14:34:15 +08:00
David Holsgrove
f6eeea1881 scripts/gdb: If not building expat for gdb, disable
--with-expat=yes is unconditionally passed to the gdb configure
stage, instead of respecting the ${do_expat} decision.

Disable if not needed. Prevents error building canadian cross;

configure: error: expat is missing or unusable

Where configure stage fails to find expat on the host compiler.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Message-Id: <4c4410a2a8aab24a29c5.1349244128@localhost.localdomain>
PatchWork-Id: 188711
2012-10-03 15:59:22 +10:00
Esben Haabendal
651b79e7ce kernel/linux: change m68k/no-mmu linux arch tuple to use -uclinux
GCC requires m68k arch tuples to be *-*-uclinux-* to support Linux on
no-mmu m68k (ColdFire) cpus.

Blackfin arch tuple must be *-*-linux-uclibc for FD_PIC_ELF toolchains,
so we cannot just switch to uclinux for no-mmu Linux toolchains.

Signed-off-by: "Esben Haabendal" <esben@haabendal.dk>
Message-Id: <876271s1ee.fsf@arh128.prevas.dk>
PatchWork-Id: 186976
2012-09-26 09:09:23 +02:00
Yann E. MORIN"
4cda47b3dc scripts: update config.{guess,sub}
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-09-25 23:23:53 +02:00
Yann E. MORIN"
4828ca9541 scripts: exporting (even empty) LIBRARY_PATH and/or LPATH breaks gcc
If either LIBRARY_PATH or LPATH is set, even to the empty string,
the gcc build breaks.

Fix that by bailing-out rather than re-setting.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-09-26 00:53:29 +02:00
Zhenqiang Chen
fd26fc9b1d scripts: Use ${CT_TARGET}-strip to strip gdbserver
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
[yann.morin.1998@free.fr: quote variables]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <CACgzC7BU9CPZ2cE+EYqnMe2WNz-wYby6f4tsmjJi715WmPmbWw@mail.gmail.com>
PatchWork-Id: 185303
2012-09-20 11:20:16 +08:00
Erik Inge Bolsø
8ab3a18e21 scripts: unset LIBRARY_PATH and LPATH
These environment variables set search path for gcc at link time, which can break the build.

Signed-off-by: Erik Inge Bolsø <knan-ct@anduin.net>
Message-Id: <alpine.BSF.2.00.1205130131550.21551@anduin.net>
PatchWork-Id: 186872
2012-05-13 01:09:20 +02:00
Jang, Bongseo
f1be07d210 kernel/linux: symlink custom kernel source dir with '-f'
build fails to symlink to custom kernel dir when the build is not the first time
because of 'ln -s' without '-f' option.

Signed-off-by: "Jang, Bongseo" <graycells@gmail.com>
Message-ID: <543e2981f2b723ecd850.1348370892@localhost.localdomain>
PatchWork-ID: 186178
2012-09-23 11:59:28 +09:00
David Holsgrove
395dca5ea8 arch/microblaze: add new architecture
Add Microblaze architecture support.

This depends on EXPERIMENTAL, as upstream projects do not yet
include full support to build a modern microblaze compiler.
This is in the process of being updated, but is not currently
publicly accessible.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
Message-Id: <9c93e18b3d68b19303f3.1348113870@localhost.localdomain>
PatchWork-ID: 185305
2012-09-20 14:01:38 +10:00
Yann E. MORIN"
15bde07c86 scripts: add option to only use the mirror
Currently, if downloads are forbidden, the mirror is still tried for.

Change this way:
  - if downlaods forbidden, do not try neither upstream locations nor mirror
  - add option to only use the mirror, and avoid upstream locations

Signed-off-by: Austin Morton <austinpmorton@gmail.com>
[yann.morin.1998@free.fr: broaden the if USE_MIRRORto enclode mirror location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-08-12 07:45:42 -04:00
Zhenqiang Chen
649c04594a scripts: strip gdbserver
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2012-09-12 17:42:38 +08:00
Yann E. MORIN"
8c43cdb436 cc/gcc: Add the ability to build gcc from svn
I took some of the svn functionality from eglibc.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
[yann.morin.1998@free.fr: fix the conditional test in build script]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-08-22 12:26:10 -07:00
Yann E. MORIN"
3127749581 libc/{,e}glibc: remove rude wordings in commetns
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-08-22 23:11:03 +02:00
Yann E. MORIN"
bb74a0544d scripts/functions: remove rude wordings
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-08-22 18:28:07 +02:00
Yann E. MORIN"
a7eb2dea72 cc/gcc: cleanup comments from rude wordings
That comes from way back when nothing would work as expected, and I would
easily get heated as soon as anything would break. Sigh, those were the
old days.

Apologies.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-08-22 18:08:39 +02:00
Bryan Hundven
0997c18f1e debug/expat: Update expat to 2.1.0
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Message-Id: <c59009fdaf23d82822c6.1345364052@flambe.is-a-geek.org>
2012-08-19 01:11:45 -07:00
Bryan Hundven
6e65a05261 scripts: use generic urls for sourceforge
For expat, duma, and strace, use the generic url and 302 to the mirror
instead of trying to download a file from a downed mirror and
failing.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Message-Id: <b69ebeb72fef93c04c84.1345364051@flambe.is-a-geek.org>
2012-08-19 01:09:40 -07:00
Zhenqiang Chen
270b8ddf64 binutils/binutils: CT_BINUTILS_GOLD_THREADED should be CT_BINUTILS_GOLD_THREADS
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>
2012-08-07 14:03:03 +08:00
Yann E. MORIN"
989d474a64 scripts: update config.{guess,sub}
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-08-04 23:40:16 +02:00
Yann E. MORIN"
fa0ca9dfea cc/gcc: remove duplicate code in core pass-1
Whatever the threading model (NPTL, LT...), we build the same
core pass-1 compiler, so there is no need to have a case-esac
construct.

Remove now mis-leading and incorect comment.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2012-08-04 23:15:02 +02:00