On some hosts, and for certain toolchains (eg. toolchain targetting
the upcoming Darwin), it may be necessary to pass arbitrary CFLAGS
and/or LDFLAGS when building the components.
And necessary infrastructure:
- EXTRA_{CFLAGS,LDFLAGS}_FOR_{BUILD,HOST} as config options
- pass those extra flags to components
Fix-up a slight typo in elf2flt at the same time (misnamed cflags).
Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com>
Message-Id: <d24043276c9243a35421.1353077450@macbook-smorlat.local>
Patchwork-Id: 199645
sstrip has been obsoleted for a while now, as it's still broken
for some archs, and there seems to be no incentive to fix it
upstream. Besides, the space gained with sstrip is marginal at
best.
Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com>
Message-Id: <65c8bf534d0647ce52cd.1353320545@macbook-smorlat.local>
Patchwork-Id: 199970
Use the same method as companion tools for providing generic and
extendable companion libs.
Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com>
Message-Id: <515c5c4635d99ebe4877.1353074410@macbook-smorlat.local>
Patchwork-Id: 199613
Replace the 32-bit-only mingw32 with mingw-w64 that is capable
of building toolchains for both 32-bit and 64-bit Windows.
kernel/mingw: replace mingw32 with generic Windows
kernel/windows: New windows kernel supporting 32 and 64 bit arch
libc/mingw: Remove old options
patches: Remove old mingw libc options' patches
Signed-off-by: "Yann Diorcet" <diorcet.yann@gmail.com>
[yann.morin.1998@free.fr: array var in libc/mingw.sh, typos]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <b045ac08fc9eac2e5ee3.1352898499@blackmint>
Patchwork-Id: 198901
The extra CFLAGS override the product defaults, causing the product to
be built without optimisation or debug. Be explicit and add these in.
Reported-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Michael Hope <michael.hope@linaro.org>
Message-Id: <CANLjY-=3Gbio6nzUPhhevDHV7cUN=6Vigooe9nSf-RnGCqnjog@mail.gmail.com>
Patchwork-Id: 198808
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
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>
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
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
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>
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>
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>
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
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>
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>
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
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
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>
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>
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
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
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
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
--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
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
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>
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
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
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
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>
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>
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>
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>