Commit Graph

2133 Commits

Author SHA1 Message Date
Bernhard Walle
d295d45b0c expat: Build without docbook
This fixes following build error on Debian 9:

   configure: error: Your local docbook2man was found to work with SGML rather
      than XML. Please install docbook2X and use variable DOCBOOK_TO_MAN to point
      configure to command docbook2x-man of docbook2X.
      Or use DOCBOOK_TO_MAN="xmlto man --skip-validation" if you have xmlto around.
      You can also configure using --without-docbook if you can do without a man
      page for xmlwf.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
2019-02-20 18:34:26 +01:00
Alexey Neyman
8088c6ef47 Select flat/FDPIC in accordance with ct-ng setting
uClibc-ng 1.0.31 enabled FDPIC as an option for ARM/no-MMU
configurations and defaults to that option if not set explicitly.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-20 00:43:39 -08:00
Alexey Neyman
16efa9d3e7 Add debug output to Kconfig manipulation functions
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-19 23:45:44 -08:00
Alexey Neyman
865171abc7 Stash the uClibc config after our mods
... before running `make olddefconfig`. This helps in debugging.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-19 23:39:14 -08:00
Alexey Neyman
a0249703fd Duh! do not override ${cflags}
... in the backend function with ${CFLAGS_FOR_HOST}. The caller either
supplies them already, or (in case of pass-1/2 of the canadian cross)
passes ${CFLAGS_FOR_BUILD} there.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-19 17:38:21 -08:00
Alexey Neyman
d083cbea80 Move moxiebox build to post_cc
core-2 gcc does not search the final prefix now for newlib's headers.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-17 23:55:16 -08:00
Alexey Neyman
32dd66a35a Use -idirafter instead of copying headers.
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-17 16:57:57 -08:00
Alexey Neyman
f71d3cb1c2 Disable CXX while building glibc
Otherwise, glibc 2.29 tries to use it - but we haven't built libstdc++ yet.
We really need to implement #808... Until now, pass empty CXX to make.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-16 00:00:13 -08:00
Alexey Neyman
7217116836 Check/increase ulimit -n setting
... 2.32 ld runs out of file descriptors while linking uClibc-ng on
SuperH.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-15 18:46:39 -08:00
Alexey Neyman
7c7eca2fab Improve error detection
... by filtering the messages that contain a *word* "warning" or
"error", i.e. is preceded by a space or is at the beginning of the line.
This improves the output from new uClibc-ng releases - which produce a
warning about an unused label, `mprot_error`.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-14 15:08:01 -08:00
Alexey Neyman
3552aa2e40 Update config.{sub,guess}
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-13 15:56:34 -08:00
Alexey Neyman
841c6fc8c1 Use CFLAGS for both CFLAGS/CXXFLAGS in GDB
These config variables are documented as such anyway.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-13 13:42:15 -08:00
Roy Storey
5d84835f90 decouple darwin/clang here as per #712
https://github.com/crosstool-ng/crosstool-ng/issues/712#issuecomment-300891861
2019-02-13 13:23:46 -08:00
Roy Storey
2306701d2c clang check before add to CT_CFLAGS_FOR_BUILD/HOST 2019-02-13 13:23:40 -08:00
Alexey Neyman
2219aab336 Implement an option to store downloads in subdirs
... following the buildroot model.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-13 01:05:13 -08:00
Alexey Neyman
74a53fdf3e Use enhanced framework for 'ct-ng update-samples'
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-09 15:55:16 -08:00
Alexey Neyman
09cb590847 Improve upgradability of defconfig files
- Switch to two-pass reading of the config file to track both (a) the
option's value and (b) if the option has been explicitly called out in
the .config being processed.
- Split off per-version functions into separate files.
- Add a README with some guidelines on writing new upgrade scripts.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-09 14:09:20 -08:00
Alexey Neyman
5aed6ab6e2
Merge pull request #1134 from stilor/upgrading
Upgrade script + test suite
2019-02-06 22:46:14 -08:00
Alexey Neyman
27f0c8b838 Add a few tests to upgrade testsuite
... coverage not complete, but pretty diverse and covers most
non-trivial conversions. PRs with better coverage for 1.23.o options
welcome.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-06 00:01:55 -08:00
Alexey Neyman
523534c9db Start a testsuite for upgrade script
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-05 00:53:36 -08:00
Alexey Neyman
3b86d2d0e6 Upgrade script for v2 of the config
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-01 00:15:20 -08:00
Alexey Neyman
0fe21f8db8 Config v2: select relevant parts of each package version
Also, remove a couple of config options that dealt with package versions
that have been since retired.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-01-30 00:09:30 -08:00
Alexey Neyman
adc16046f7 Add upgrade logic to version-check.sh
Slightly rework config version detector to catch the case where neither
CONFIG_VERSION/CONFIG_VERSION_CURRENT is defined in the config file.

Add olddefconfig and use it after the upgrade.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-01-27 22:55:26 -08:00
Alexey Neyman
57e5be632d Basic framework for checking config file version
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-01-26 13:13:32 -08:00
Dima Krasner
de797aa99d Coding style fixes in functions
Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2019-01-23 09:56:05 +02:00
Dima Krasner
d44a626968 Coding style fix in uClibc.sh
Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2019-01-23 09:54:29 +02:00
Dima Krasner
2870ffae51 Moved uClibc configuration installation to uClibc.sh
Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2019-01-23 09:52:04 +02:00
Dima Krasner
1635c149a4 Store the uClibc .config alongside the ct-ng .config
Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2019-01-22 22:36:15 +02:00
Alexey Neyman
92ad0fe0ab Dump how multilib iterator is invoked
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-01-14 23:58:22 -08:00
Alexey Neyman
e05fa86bba Canonicalize prefix dir and sysroot
... because GCC prints the sysroot with symlinks resolved.

Fixes #892.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-01-14 23:56:40 -08:00
Alexey Neyman
9fc729b4b0 Bionic modifies CT_TARGET_CFLAGS
... which, after a recent change, is not reflected into CT_ALL_TARGET_CFLAGS
for non-multilib configurations.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-15 00:39:04 -08:00
Alexey Neyman
e46f6d9966 Use "package ksym" when fetching/extracting
... in the default implementation of the fetch/extract methods.

Fixes #1116.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-14 18:50:51 -08:00
Alexey Neyman
f2b64524b0 Add a symlink to LTO for binutils
... so that ar can find the plugin even when invoked directly, not
via the gcc-ar plugin.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-11 08:55:07 -08:00
Alexey Neyman
5cf859d9d9 Add config flags for omitting 'arch' and 'vendor'
... parts of the config tuple. While here, remove parts that are
setting portions of the target tuple to a value that's already
the default.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-10 01:10:01 -08:00
Alexey Neyman
afb17244d2 Run through 'ct-ng updatetools'
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-09 16:53:47 -08:00
Alexey Neyman
e85ec884ad Use -mel/-meb for moxie
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-07 14:49:03 -08:00
Alexey Neyman
8bee41d734 Remove a TBD
It only applied to core-pass-2 compiler; final compiler can locate
the linker script just fine.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-07 14:46:00 -08:00
Alexey Neyman
e149e28e57 Disable -fstack-protector* from being used by glibc
... until it was fixed (to some extent) in 2.25.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-07 00:03:04 -08:00
Alexey Neyman
9d2a5f8413 Set ALL_TARGET_CFLAGS initially for !MULTILIB
Fixes #1107.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-07 00:03:04 -08:00
Alexey Neyman
f5b57504d2 Add configuration options for enabling SSP
... in uClibc and glibc.

Fixes #681.

While here, relocate additional "sources" for uClibc/binutils into packages/
directory.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-04 16:15:37 -08:00
Alexey Neyman
893932e90f Add a config option for default RELRO setting
Fixes #656.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-03 20:19:09 -08:00
Alexey Neyman
d9afcd80fc Warn if architecture is empty on x86/32bit
as that defaults to i386, which will fail with glibc (and likely other
libcs).

Fixes #617.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-03 16:17:25 -08:00
Alexey Neyman
8c6cf388cd Fix uClibc builds after moxie merge
Broken because of the capitalization of the name.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-03 13:04:44 -08:00
Alexey Neyman
a4dc14dba4 Consider it success if DoForceRmdir removes only the content
Fixes #929.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-01 14:44:08 -08:00
Alexey Neyman
40d5bf6440 Add moxiebox as a choice for libc
This required some rework of the libc selection, as moxiebox is a layer on
top of another libc - newlib.

Also, moxiebox'es host VM (`sandbox`) needs a libcrypto on the host. We will
not have it if we're cross-compiling a canadian cross. Fortunately, all moxiebox
needs from libcrypto is SHA256, and it already includes a standalone implementation
of SHA256 in its runtime. Provide a little wrapper that allows moxiebox use
that implementation for the host binary, too.

Also, automate collecting/printing the list of all packages in a given category
(e.g. LIBC or COMP_TOOLS), generate a list of all Kconfig symbols for a given
category.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-12-01 10:10:51 -08:00
Alexey Neyman
172308cb1b Add moxie architecture
and a moxie-unknown-elf target (which is what #1088 apparently wanted).

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-28 00:30:10 -08:00
Alexey Neyman
da76ae3ea3 Add DTC as a companion tool
(needed for cross-gdb targeting the moxie-* targets)

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-28 00:30:10 -08:00
Alexey Neyman
35bec76b63 Fix installation of the license file
... for ct-ng configured without --enable-local. Also, install
licenses in subdirectories of the components.

Also, ct-ng configured with --enable-local removed the scripts directory
upon `ct-ng distclean`.

Also, misspelled CT_WGET/CT_CURL variables prevented use of
`ct-ng updatetools`.

Fixes #1091.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-12 01:19:04 -08:00
Alexey Neyman
8fe21d70a2 Make license collection optional, on by default
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-07 12:59:29 -08:00
Alexey Neyman
4270b8e62e
Merge pull request #1084 from antmak/collect_licences
Collect licenses for the distribution
2018-11-07 11:26:45 -08:00
Alexey Neyman
4acea9cc95 Fix detection of missing overlays
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-06 23:48:51 -08:00
Anton Maklakov
b36e89d294 Add an ability to use a regular directory for overlaying. If it doesn't exist, the tarball is still used 2018-11-05 15:49:51 +08:00
Anton Maklakov
aec70d5310 Collect licenses for the distribution 2018-11-05 15:39:47 +08:00
Alexey Neyman
2808fdb6a3
Merge pull request #985 from antmak/platform_headers
Use the platform headers in the pass-2 and canadian gcc stages
2018-11-03 15:38:51 -07:00
Alexey Neyman
f232d6d09a Add an ability to modify an exported variable
... and use that ability to permanently set CTNG_LD_IS in case gold is default linker
and we're building glibc.

Fixes #988. This was a long-standing breakage in crosstool-NG (at least since it began
to run each step in a sub-shell).

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-11-01 15:50:12 -07:00
Alexey Neyman
21af769802 Detect errors in CT_SaveLocal
The function is called from a conditional and therefore, the CT_OnError
handler is not invoked on failures. Need to return an error and check
for the error return in the caller.

Also, while here, fix the issue that was causing the failure -
move can fail if it crosses a filesystem, so fall back to 'cp+rm' in
that case.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-10-27 13:56:22 -07:00
Alexey Neyman
e12e90c798
Merge pull request #1069 from austin-beer/master
Prevent Bash from searching $PATH when sourcing the .config file
2018-10-25 21:15:54 -07:00
Austin Beer
11e65e75f9 Add comment about preventing Bash from searching $PATH 2018-10-25 15:07:55 -06:00
Austin Beer
93d86b7e5c Prevent Bash from searching $PATH when sourcing the .config file 2018-10-24 18:56:12 -06:00
Alexey Neyman
091b7e4c87 Generate correct tuple for PowerPC with SPE ABI
Fixes #1018.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-10-23 23:22:01 -07:00
Alexey Neyman
782b45d0da Supply "very old" and "very new" glibc versions
... as 1.0 and 99.99, respectively, to gcc configure.

Fixes #1031.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-10-21 19:05:19 -07:00
Alexey Neyman
ce7eea8003 Try to use 'git fetch --depth 1' if possible
It should be possible if fetching a tag/branch, and it may be possible
if fetching a changeset if a server is configured to allow it.

Fixes #986

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-10-20 23:33:14 -07:00
Alexey Neyman
e72d7df359 Fix state dir location
Fixes #1054

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-10-19 17:03:14 -07:00
Alexey Neyman
e697b4694a Create glibc-ports symlink inside CT_SRC_DIR
... so that it works in both "bundled" and "bundled,local" cases.

Fixes #1060.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-10-16 00:02:18 -07:00
Alexey Neyman
efe65615d0 Fix up timestamps after patching
... so that autotools-based packages do not re-run autoconf/autoheader/automake.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-09-28 11:48:01 -07:00
Alexey Neyman
2acab2f061 Make CT_PREFIX_DIR/CT_WORK_DIR/CT_BUILD_TOP_DIR absolute
... if they aren't already.

Fixes #1010.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-09-27 01:01:20 -07:00
Alexey Neyman
d573c15758 Use 'chmod a-x' instead of 'chmod -x'
There is a subtle difference when executable bit is a part of the umask.
And at least some versions (Debian/stretch) fail if the resulting mode
would've been different if not for the umask setting.

Fixes #998.

Although, with such chmods/umasks it is likely that some package installation
will break anyway. But I'll leave it until somebody complains.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-09-26 23:54:55 -07:00
Alexey Neyman
29f0662c18 Fix restarting after a complete build
It is much, much better to *first* make the directory writable and *then*
do a test for case-sensitivity (which requires writing in that directory).

Fixes #1033.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-09-26 16:20:12 -07:00
Alexey Neyman
b82b8adb44
Merge pull request #984 from slash3g/master
Properly handle newlib configuration flags
2018-09-25 23:52:05 -07:00
Alexey Neyman
b0e7b57c4a Restore *-android build
Modify CT_TARGET_CFLAGS (which are passed to GCC's FOR_TARGET flags) rather
than CT_ALL_TARGET_CFLAGS.

Fixes #1006.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-09-24 22:43:08 -07:00
Alexey Neyman
c426acbee7
Merge pull request #990 from antmak/fix_newlib_multilib_opt
Fix a wrong name for the newlib's multilib option
2018-09-21 23:37:29 -07:00
Anton Maklakov
b1dbc3ce9a Fix a wrong name for the newlib's multilib option 2018-06-15 13:42:44 +08:00
Anton Maklakov
1dea24ce9a Use the platform headers in the pass-2 and canadian gcc stages 2018-06-12 17:07:06 +08:00
Daniele Baracchi
398030c11a Properly handle newlib configuration flags 2018-06-11 21:42:20 +02:00
Alexey Neyman
d7ee16cb28 Make patch order overridable by individual packages
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-06-06 00:50:36 -07:00
Alexey Neyman
57679b5e61 Disable context functions for Thumb
They're written in ARM dialect, and `ldmia r14, {r14, pc}` is not accepted in T2
encoding. GCC8 changed the list of multilibs for arm-*, which now includes a
variant with CPU that supports T2 but not A1 encoding.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-06-05 16:38:30 -07:00
Alexey Neyman
0ce942862e Add --enable-obsolete for powerpc-*-spe
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-06-05 00:16:53 -07:00
Alexey Neyman
4137c422c6 Detect errors from gas
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-06-05 00:16:37 -07:00
Alexey Neyman
07ec87f14f Avoid adding arch/cpu/tune flags for target to GCC build
... as it may need to override them for building runtime-selectable code.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-06-05 00:16:37 -07:00
Alexey Brodkin
0a64056dd3 ARC: Disable CONFIG_ARC_HAS_ATOMICS in uClibc if building without -matomics
In case we build for ARC core which has no support of atomic ops among
other things we need to configure libc to use Linux kernel helper to emulate
HS atomic ops. This is done with disabling of CONFIG_ARC_HAS_ATOMICS in uClibc.

Currently we __remove__ this option from .config but this makes no sense as
its default state is "y" so we need to explicitly disable it instead.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-05-21 15:03:17 +03:00
Alexey Neyman
d274ab06fe
Merge pull request #967 from stilor/fix-building-older-glibc
Fix building older glibc
2018-05-15 16:41:28 -07:00
Alexey Brodkin
86bbb14649 Add ARC architecture support
Synopsys' DesignWare ARC Processors are a family of 32-bit CPUs
that SoC designers can optimize for a wide range of uses,
from deeply embedded to high-performance host applications in a variety
of market segments.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-05-15 16:37:08 +03:00
Alexey Neyman
37ac0e8474 Too many fixes need backporting for GCC8...
... so instead, disable -Werror for older versions of glibc.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-05-14 23:47:17 -07:00
Alexey Neyman
387c8d8e2c First batch of fixes
- Incompatible function type for ifunc alias
- Multiple statements macro expansion in strftime
- if_nametoindex size checking

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-05-12 13:03:29 -07:00
Alexey Neyman
3f16a8e269 Restore a missing GDB option
(whether GDB has --disable-build-with-cxx) and use it.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-05-06 15:20:50 -07:00
Alexey Neyman
e1610ee7b6 Preserve each variant of libwinpthread.dll
... in the corresponding /lib directory. Mingw-w64 installs it to /bin,
so multiple variants in a multilib configuration override each other.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-05-03 22:28:10 -07:00
Alexey Neyman
a3cc62a52c Restore the ability to build multiple configurations
... in the shared .build directory.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-29 23:01:43 -07:00
Alexey Neyman
74979fb19b Add checking for *sum and unzip
Also improve logging (add an ability to log commands/files/environment variables
to config.log)

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-29 12:06:54 -07:00
Alexey Neyman
0f34b0ebf0 Fix strace 4.21+ on aarch64
... which now defaults to --enable-mpers=yes, which attempts to
invoke aarch64-*-gcc with -m32 and fails.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-29 12:06:54 -07:00
Alexey Neyman
4e7d0906c1 Support out-of-tree local builds
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 14:39:56 -07:00
Alexey Neyman
bc542408ca config.sub/config.guess must either be executable
or be run through shell

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
9dc94f3662 Install "pure data" directories
... and update .gitignore. Survives 'make distcheck'.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
69df9ae9dd Remove the need for configure substitutions in scripts
... so that scripts/ directory can be installed verbatim.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
9238b58721 WIP: autotoolization
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:03:17 -07:00
Alexey Neyman
0bcb67fa52 Use autoconfig-archve/automake tests
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-04-07 12:02:33 -07:00
Alexey Neyman
89181ae277 Avoid calling CT_Abort from CT_Mirrors
... see the comment for the reason. Defer aborting until the result of
CT_Mirrors is actually used (if it is used).

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-02-15 22:45:46 -08:00
M1cha
ea702af5c3 cc/gcc: use correct sysroot arg for do_gcc_core_backend
This fixes gccs LIMITS_H_TEST detection for baremetal targets
so limits.h will be installed correctly.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
2018-02-12 07:45:54 +01:00
Alexey Neyman
a20c29dcef Make libiconv an option in the menu config
Signed-off-by: Alexey Neyman <stilor@att.net>
2018-02-10 14:51:45 -08:00
Alexey Neyman
1c329c33bf Ncurses fixes for 6.1
- Update to 20180129
- Throw in --disable-db-install if database is disabled; otherwise
  'make install' tries to run tic which is not built.
- Select appropriate strip utility for the host; otherwise non-x86
  architectures fail to install (unless --disable-stripping is also
  added)

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-01-29 22:47:26 -08:00
Alexey Neyman
ba165ed4c0
Merge pull request #900 from stilor/issue-897
Only decorate TARGET_ARCH if using specific CPU
2018-01-24 23:18:05 -08:00
Alexey Neyman
7c720ae394 Only decorate TARGET_ARCH if using specific CPU
Otherwise, binutils don't recognize it as a valid target - even though
GCC does.

Fixes #897.

Signed-off-by: Alexey Neyman <stilor@att.net>
2018-01-21 19:45:13 -08:00
Sergey Korolev
6c9027b401 Fix gdb build flags forming
Build flags are scalar variables.

Signed-off-by: Sergey Korolev <s.korolev@ndmsystems.com>
2017-12-18 02:35:58 +03:00
Alexey Neyman
37caa3d4d7
Merge pull request #882 from ksergeyv/gdb-link
Fix variables passing to gdb configure scripts
2017-12-17 11:42:07 -08:00
Sergey Korolev
70a1584e15 Fix variables passing to gdb configure scripts
These changes mainly fix static linking errors when building static
native gdb and gdbserver (tested with gcc 7.2.0 + uClibc-ng 1.0.27 +
binutils 2.29.1 for MIPS):

[ALL  ]    .../lib/libstdc++.a(eh_throw.o): In function `__cxa_throw':
[ALL  ]    (.text.__cxa_throw+0x64): undefined reference to `_Unwind_RaiseException'
[ALL  ]    (.text.__cxa_throw+0x6c): undefined reference to `_Unwind_RaiseException'
[ALL  ]    .../lib/libstdc++.a(eh_throw.o): In function `__cxa_rethrow':
[ALL  ]    (.text.__cxa_rethrow+0x78): undefined reference to `_Unwind_Resume_or_Rethrow'
[ALL  ]    (.text.__cxa_rethrow+0x80): undefined reference to `_Unwind_Resume_or_Rethrow'
...

The problem is in mixing of CPP, CC, CXX, and LD with CPPFLAGS, CFLAGS,
CXXFLAGS, and LDFLAGS before passing to configure scripts.
gcc is sensitive to argument order and the scripts are normally responsible
to combine the variables in a proper way.

Signed-off-by: Sergey Korolev <s.korolev@ndmsystems.com>
2017-12-14 22:55:43 +03:00
Sergey Korolev
1de8f5e98b Do not build a native gdbserver automatically
Signed-off-by: Sergey Korolev <s.korolev@ndmsystems.com>
2017-12-14 00:09:36 +03:00
Alexey Neyman
9fdb93cce0 Make comp.libs use generated templates, too
This allows us to include the component-to-package relation in the
generated kconfig files and make use of that information in the
show-config.sh script.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-11-29 23:44:49 -08:00
Alexey Neyman
d759137c46 Align script names with the ct-ng commands
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-11-19 21:50:28 -08:00
Alexey Neyman
5495a3497b showConfig.sh no longer has anything substituted
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-11-19 21:50:28 -08:00
Alexey Neyman
f1cca2a7c2 Retire wiki-printer
It is not used anymore and is currently broken.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-11-19 21:50:28 -08:00
Alexey Neyman
63e91f4eba A few fixes for showSamples
- Use fork's name, not the master package name
- Allow to use a choice selector when printing a package
- Consider complibs always present (they are, gcc does require gmp/...)

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-11-19 21:50:28 -08:00
Sergey Korolev
5e0d62fac6 scripts/showSamples.sh: support custom package versions
Signed-off-by: Sergey Korolev <s.korolev@ndmsystems.com>
2017-11-19 21:50:28 -08:00
Sergey Korolev
146c6814c9 scripts/functions: add CT_GetPkgBuildVersion
This allows to get a configured custom version of a package.

Signed-off-by: Sergey Korolev <s.korolev@ndmsystems.com>
2017-11-19 21:50:28 -08:00
Antony Pavlov
69c2ca97fb add RISC-V architecture support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
2017-11-19 04:50:14 +03:00
Sergey Korolev
a1f930bb70 showSamples.sh: fix description of a selected tool set
Signed-off-by: Sergey Korolev <s.korolev@ndmsystems.com>
2017-11-12 11:08:18 +03:00
Sergey Korolev
63ca8c75fc showSamples.sh: fix uClibc-ng detection
Signed-off-by: Sergey Korolev <s.korolev@ndmsystems.com>
2017-11-12 10:38:47 +03:00
Sergey Korolev
09151040fb use ${CT_${cc}_VERSION} to show a compiler version
Signed-off-by: Sergey Korolev <s.korolev@ndmsystems.com>
2017-11-11 23:38:13 +03:00
Alexey Neyman
a91765156a When handling overlay, move rather than symlink
... as 'tar' does not follow symlink, rather creating a new directory instead.

Fixes #846.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-10-20 09:27:29 -07:00
Alexey Neyman
a6dbc8f701 Do not change {pkg}_VERSION
Instead, use new variable ${pkg_dir} to locate auxiliary files.

Fixes #838.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-10-01 13:55:29 -07:00
Alexey Neyman
ca45a8f9ab Add -D__GLIBC__ to target CFLAGS
... when using musl to compile strace.

Also, honor CT_TARGET_CFLAGS in scripts compiling target libs/binaries.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-09-30 18:47:35 -07:00
Alexey Neyman
529e429c6e expat 2.2.4 dropped INSTALL_ROOT
... in favor of its alias, DESTDIR. Before, it supported both.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-09-29 21:29:09 -07:00
Alexey Neyman
b3038a0a41 Add digests for all packages
Also fix test-packages: it was saving the output from CT_DoLog into
the checksum file. Also use one file per version.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-09-29 17:05:22 -07:00
Alexey Neyman
48a949cf60 Add an ability to verify the digest/signature
Fixes #611.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-09-27 22:40:21 -07:00
Alexey Neyman
602304b230 Use the new SuperH fixes in the two multilib samples
- Glibc configure args and tuple need adjustment on SuperH
- Only allow "both endian" and "with CPU" for unspecified arch
  variant. May reconsider endianness (was breaking things before
  adjusting glibc tuple)
- Retire non-multilib sample, it should be a subset of the
  multilib one now.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-09-03 12:12:14 -07:00
Alexey Neyman
1e4eeb5c3b Workaround for static uClibc-ng issue with -lpthread
Also, preserve .config when running test-package.sh.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-09-03 12:12:14 -07:00
Alexey Neyman
413f5f6100 Super-H multilib toolchain fixes
1. On SuperH, configuring GCC with explicit variant of the CPU
(like "sh4") limits the default set of multilibs to just that CPU
and requires --with-multilib-list to change. Allow for "unspecified"
variant, so that we can defer to GCC to determine the list.

2. Support toolchains with both endiannesses at the same time.

3. Add a SuperH/newlib sample

4. Add more flags processing for uClibc

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-09-03 12:11:23 -07:00
Nathan Chancellor
1d724767bd config: Add package versioning flexibility
Some users (like myself) may want to omit the crosstool-NG version
from the binaries' versioning output, as it can be incredibly long
and not too helpful. Add a config option to disable it. The possible
combinations are as follows:

- crosstool-NG version (default)
- crosstool-NG version - custom toolchain ID
- Custom toolchain ID
- No crosstool-NG version OR custom toolchain ID

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2017-09-01 16:48:59 -07:00
Alexey Neyman
eba1a82686 Make --enable-obsolete-rpc an option in ct-ng
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-26 13:01:45 -07:00
Alexey Neyman
5324905c14 Fix glibc-ports with the new framework
While here, also consider patched by anything other than "bundled patches"
as per-target sources. Add scary warnings in case of a failure.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-26 13:01:37 -07:00
Alexey Neyman
f8d4ce3d0e Implement a script for checking packages
Then use this script to check that all packages can be extracted and patched.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-23 16:05:40 -07:00
Alexey Neyman
20e0f706c6 Fix PPC64LE by supplying --with-glibc-version
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-22 16:48:45 -07:00
Alexey Neyman
0346153bdb Save export status for environment vars
... and limit our modifications to our variables.

Fixes #762.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-21 08:41:14 -07:00
Alexey Neyman
2bdb632495 Reject set-but-empty environment variables
... which also lead to cryptic failures.

Fixed #743.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-21 08:41:14 -07:00
Alexey Neyman
b75f031462 Check for config file changes when restarting
Also, save/restore per-target source directory.

Fixes #800.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-21 08:41:14 -07:00
Alexey Neyman
d26dc5d5f5 Use per-package list of formats to determine downloads
Fixes #789

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-19 00:18:25 -07:00
Alexey Neyman
be399f1046 Record tarball formats
Also, missed upgrades of gmp, isl, mingw-w64

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-18 22:39:26 -07:00
Alexey Neyman
73e8b0b228 Merge pull request #801 from stilor/regressions
Regressions
2017-08-16 17:54:14 -07:00
Alexey Neyman
3d470580ce Fix version check in mingw-w64
Fixes #782.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-16 10:47:52 -07:00
Alexey Neyman
e6bc8dfe86 Fix DoLog -> DoExecLog
Fixes #788.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-08-16 09:30:36 -07:00
Kirill Smirnov
aa757c345f scripts: remove superfluous dot
Tarball extensions list already contains leading dot,
do not add another one.

Signed-off-by: Kirill Smirnov <kirill.k.smirnov@gmail.com>
2017-08-03 12:22:15 +03:00
Alexey Neyman
3182001a27 Pin sparc-leon to GCC6, again
Also, change the name for uClibc config to be version-agnostic,
the version changes too fast.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-18 10:31:28 -07:00
Alexey Neyman
46c3e5e3d4 Fix archive yymm directory
In case there is a "patchlevel" suffix.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-17 12:19:43 -07:00
Alexey Neyman
ec430d2f1f Fix linaro downloader
Fixes #779.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-17 11:53:07 -07:00
Alexey Neyman
2472ebce2e Fix new framework for running from installed path
Fixes #777

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-16 22:56:30 -07:00
Alexey Neyman
fd522eed50 Resolve a few more TBDs
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-09 23:08:12 -07:00
Alexey Neyman
64d5c254c7 Fix xtensa overlays
They are unpacked properly, but fail during build.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 21:43:27 -07:00
Alexey Neyman
9d91f44bc8 Separate the notions of package name/label
Also, remove resolved TBDs.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:57 -07:00
Alexey Neyman
c9b31439db Some locations were missed while renaming kconfig symbols
... because there the symbols were constructer part by part.

Also, remove cc.sh and source $(CT_CC).sh directly - we only build
a single compiler at a time.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:57 -07:00
Alexey Neyman
ae71ce4106 Kconfigize choice/menu items
Also, add a poor man's upgrade script.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
6805245679 Allow VCS versions to be patched via some unique revision ID
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
50a387afa7 Remove support for pregenerated locales in uClibc
It fails to compile with the only locale version available (030818)
(on master too, with exactly the same error).

uClibc-ng does not use pregenerated locales.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
16a56ed75b uClibc locale "package"
Does not build, though.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
f63fbd356f Allow for custom archive names
... and directories therein.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
d0ff020e23 Fixes for building
- Need GDB8.0 milestone
- Make uClibc "master" package
- Rename bionic -> android-ndk to match the package name and
  support suffixes for archives

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
c7a924a073 Fix printing the branch used in Git
... and prefer exact specified name, if it exists.
More bootstrap script specifications for packages.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
9cde8a61b0 Fix downloading released tarballs
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
bec14208a7 Builds comp.libs from VCS
... fails on DUMA because it cannot be compiled by newer C++, and patches
are not applied to checkouts from VCS.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
993b4acec5 Building packages using the new framework
(fails at building GMP off the VCS because it needs to run bootstrap scripts)

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
ee983f5f92 Downloading packages using new framework
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
567277099a Fix the references to old config variables
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
57426168ad Convert the rest of packages to new framework
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
e7deac3aad Switch comp.libs/tools and debug to new framework.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:57:56 -07:00
Alexey Neyman
85599c4743 Point bundled patches location to packages/
Also disable per-arch patch application: this doesn't play well with the
reuse of the sources in .build/src

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-08 10:56:29 -07:00
Alexey Neyman
6c07462bc6 Merge pull request #773 from stilor/fix-bionic-32bit
Fix ARM32 name for android
2017-07-07 15:11:03 -07:00
Alexey Neyman
1029dcf91a Fix ARM32 name for android
Must have eabi suffix for GCC to accept it. Also:
- We only have one glibc now, no need to account for eglibc.
- Rename aarch64 samples, eabi suffix does not apply to them
  (and ct-ng saveconfig was saving them into a different directory).

Fixes #772.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-07-07 12:38:32 -07:00
Kirill K. Smirnov
984ae94918 scripts/nios2: do not override precomputed flags
Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
2017-07-01 15:16:28 +03:00
Nye Liu
50df064004 Add option to build gdbserver for target that does not require libstdc++.so 2017-06-16 22:28:07 -07:00
Alexey Neyman
1e37cd5450 Honor CFLAGS_FOR_BUILD
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-06-15 23:07:00 -07:00
Chris Packham
a4feec224c Set CT_BUILD_DIR prior to using it
Fixes #731

CT_BUILD_DIR is used in CT_DoExecLog. We need to ensure that it is
set before the first call to CT_DoExecLog.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2017-06-15 16:29:21 +12:00
Alexey Neyman
1b4e784a0b Fix debuild warnings/errors
- Update .gitignore, do not place .gitignore into directories installed
in bulk
- Remove executable permissions and shebangs from the scripts that are
supposed to be invoked only via ct-ng frontent; prepend them with $(bash).
Despite what showSamples.sh said, it already has some bashisms.
- Remove --with autotools-dev and override dh_update_autotools_config
to avoid having config.{sub,guess} clobbered with older versions
- Install bash completion where Debian (now) expects it
- Update man page to use .\" as the comment delimiter, instead of
undefined macro (."); also, minor text edits.
- Install kconfig.mk without execute permission.
- Remove shell wrappers from 170-localedef-fix-trampoline.patch, we
do not use that for applying patches
- Revoke execute permissions on 210-expat.sh
- Get flags from dpkg-buildflags if available

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-06-07 22:38:53 -07:00
Alexey Neyman
72a5a1d6de Add GDB 8.0 ...
... which now requires C++.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-06-04 23:23:09 -07:00
Andrew Wygle
61d1fa57c9 Added a sample of the MSP430 architecture and removed config.sub
override from msp430.sh

Signed-off-by: Andrew Wygle <awygle@gmail.com>
2017-06-02 15:32:55 -07:00
Andrew Wygle
68d0cfd0e0 Added MSP430 architecture support.
Signed-off-by: Andrew Wygle <awygle@gmail.com>
2017-06-02 13:06:29 -07:00
Alexey Neyman
20a8525e8b Retire CT_CC_GCC_TARGET_FINAL
Make this behavior default in case the core gcc backend is used
for final compiler (i.e., for baremetal configurations). Not
setting this option breaks canadian baremetal configurations,
and not setting it makes little sense at all in any baremetal
configuration (since in baremetal we don't have any libc to begin
with).

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-05-24 23:03:34 -07:00
Alexey Neyman
753236ea22 Handle ming32 as a host
zlib refuses to run configure with mingw32 host and insists that
win32/Makefile.gcc is used instead.

This requires a change in this Makefile to support static-only builds.

Fixes #694.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-05-24 23:03:02 -07:00
Alexey Neyman
8e7947cb35 Print gcc version in the same way as the rest
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-05-14 15:23:41 -07:00
hyc
8762c7698c Preliminary bionic/Android support
Mostly from Crystax NDK
2017-05-14 15:23:34 -07:00
Alexey Neyman
ef762bfe8e Merge pull request #716 from stilor/gcc7
Add GCC 7.1.0
2017-05-14 09:51:28 -07:00
Alexey Neyman
842915db44 Separate uclibc's multilib headers on MIPS, too
The generated sysnum.h is different for o32/n32/64 ABIs.

This needs to be revisited; either do this for all architecutres or
perhaps, compare the headers for various multilibs and combine them
if the are identical.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-05-14 00:04:05 -07:00
bRad
8543414be6 Simplified error message for CC 2017-05-10 13:00:23 -07:00
bRad
f4ef083099 Fixed up representation of PATH env. var in error message 2017-05-10 07:23:53 -07:00
bRad
079bdf1c91 Added CT_TestAndAbort trivial sanity checks for CC and CXX to avoid libiconnv build failures https://github.com/crosstool-ng/crosstool-ng/issues/711 2017-05-10 04:48:59 -07:00
Alexey Neyman
c9dad33728 Use config from the install location
... no need to create a local symlink.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-22 23:33:36 -07:00
Alexey Neyman
105e4b59b7 Get rid of config.gen
Instead, prepare the files as a part of bootstrap and install them.
This avoids rebuilding these files in each working directory; they
don't change anyway as they are generated from the same installed
source.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-22 18:41:50 -07:00
Alexey Neyman
368a0169a2 Merge pull request #690 from stilor/fix-empty-symlinks
Avoid creating symlinks with empty prefix
2017-04-13 08:43:42 -07:00
Alexey Neyman
8f5dfe97c2 Avoid creating symlinks with empty prefix
(regression after Cygwin fix)

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-13 00:08:36 -07:00
Alexey Neyman
9976611216 Doc renames & issue template
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-13 00:07:29 -07:00
Alexey Neyman
59651566a5 Make guidelines for bug reporting more explicit
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-10 14:01:08 -07:00
Alexey Neyman
9a91220aa2 Fix MINGW_SECURE_API test
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-07 13:57:56 -07:00
Alexey Neyman
16e703a4e5 Merge pull request #676 from tamird/mingw-secure-api
MinGW: add --enable-secure-api config option
2017-04-07 10:13:06 -07:00
Tamir Duberstein
2e9863531f libc/mingw: quote variable in comparison
Building with CT_MINGW_TOOLS unset before this change produces:

	/usr/local/ct-ng/lib/crosstool-ng-1.23.0-rc2/scripts/build/libc/mingw.sh: line 212: [: =: unary operator expected
2017-04-06 20:14:36 -07:00
Tamir Duberstein
89468256ec
MinGW: add --enable-secure-api config option
Without this flag, MinGW does not expose secure variants of functions
such as strcpy_s.

See https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-headers/crt/sec_api/string_s.h#l11.
2017-04-06 21:23:49 -04:00
Alexey Neyman
0fc6f1c47e CC_FOR_BUILD in gdb.sh
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-02 15:55:07 -07:00
Alexey Neyman
9a9b02acef Pass HOSTCC to uclibc's make
Else it looks for 'gcc'.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-02 13:25:41 -07:00
Alexey Neyman
ae58824a7e Pass CC_FOR_BUILD to binutils
Otherwise, it fails if 'gcc' is not available.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-02 13:18:07 -07:00
Alexey Neyman
4562aa2cff Handle Python with non-default names
Check for python2/python3 and if found, pass them to --with-python.
Allow user to override the choice via a new config option. This
fixes systems where there is no "python", only "python2" or "python3".

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-01 19:19:35 -07:00
Alexey Neyman
91c192e318 Always build ncurses-for-build
If the build machine lacks tic, we need to build it in the first pass
even if host==build: ncurses Makefiles are not smart enough to build
'tic' first and use the just-built tic to compile fallback terminfo.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-01 19:17:31 -07:00
Alexey Neyman
d6bf8e2d98 Fix symlinking to multiarch tools on Cygwin
On cygwin, creating both "foo.exe" and "foo" results in 'ln -sf'
returning an error ("File exists"). However, ln silently removes
the "foo.exe" in this case, so an attempt to re-run the same command
manually then succeeds.

Hence, make binutils.sh also create symlinks with .exe prefix,
using the new & shiny routine.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-04-01 10:12:05 -07:00
Alexey Neyman
7111f95dc3 MinGW-W64 fixes
- libpthread requires iteration over multilibs, unlike the core, it
does not detect and build multilibs by itself.

- Disable parallel builds for mingw-w64 components; until mingw-w64 core
builds clean, I am not trusting it.

- Make the list of tools to build configurable

- Turn on multilib in x86_64 sample.

- Make warnings about tuple less redundant. As in, "one WARN is enough,
no need to shout it three times".

- Messages about various steps/substeps are more aligned with the rest
of the components.

- Use 'make' instead of ${make} to invoke the companion make just built,
if applicable.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-30 19:11:33 -07:00
Alexey Neyman
a7edff1820 Merge pull request #667 from stilor/cross-gdb-deps
cross-gdb: account for canadian/crossnative toolchains
2017-03-29 23:13:08 -07:00
Alexey Neyman
6af04d822b cross-gdb: account for canadian/crossnative toolchains
... when determining if it can be linked statically, and if Python
scripting should default to y.

Prompted by a failure of i686-w64-mingw32,nios2-spico-elf sample
on a system where configure didn't report static linking support.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-29 18:50:09 -07:00
Alexey Neyman
d83a003618 Add symlinks from the libraries' original location to the new one.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-29 13:29:31 -07:00
Alexey Neyman
a596ec5b39 Fix up the sysroot issue for sh4 in a different way
(see the comments in the code for details on the issue)

Old workaround in 100-gcc.sh stopped working (probably, due to one
of GCC version upgrades), so switch to the other approach originally
described there: adjust the list of multilibs to not include the
default target explicitly.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-26 23:32:27 -07:00
Alexey Neyman
67ab129fc5 Do not create multilib symlinks if not using sysroot
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-23 09:13:51 -07:00
Alexey Neyman
3d1678a7f6 Make creation of ld.so.conf optional
... enabled by default for multilib and disabled otherwise. Buildroot
has been complaining about /etc/ld.so.conf presence for almost a year
now and I missed that.

After the release, xldd will be modified to query the compiler for
the list of multilibs to search. This would be too invasive change
before 1.23, though.

Note that it may lead to configurations where xldd currently does not
find the libraries (if both DEMULTILIB and CREATE_LDSO_CONF are turned
off). This is not the default setting in Kconfig, though.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-22 10:57:45 -07:00
Alexey Neyman
de4433298a Add a release creation script
One TBD left is the signing of the tarballs.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-21 14:04:12 -07:00
Alexey Neyman
3906acc007 Move some scripts to a new directory, maintainer
... which are not of much interest to the end user.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-21 14:03:31 -07:00
Alexey Neyman
9ed513c2d8 Cross-ldd: handling e_flags is tricky and depends on arch
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-20 14:51:17 -07:00
Alexey Neyman
89f0971391 Merge pull request #639 from stilor/tweak-gcc-movelibs
When moving gcc libs, prefer the same directory as libc
2017-03-19 00:34:51 -07:00
Alexey Neyman
63b2a19de4 Add an option to "demultilib"
It turns out buildroot does not currently accept a toolchain where a dynamic
linker does not reside in the multi-os-directory. Unfortunately this is
how glibc installs itself on AArch64 without any extra tricks.

So, provide an option to force everything into /lib or /usr/lib; patch to
buildroot will be worked on separately.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-17 14:31:17 -07:00
Alexey Neyman
b00dea9951 Check libraries for compatibility
... as we are going through various multilibs in ld.so.conf

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-14 19:28:26 -07:00
Alexey Neyman
11b52ab6d7 Create ld.so.conf
Also a fix for CT_IterateMultilibs: it didn't pass multi_os_dir_gcc, so
it only worked if the caller did *not* declare it as a local variable.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-13 01:08:13 -07:00
Alexey Neyman
b090e0f74d Fix up ld.so symlinks for musl
Convert absolute targets to relative so that they are valid on the host,
too. The procedure is very similar to uclibc, so it is moved into a
common function.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-12 19:41:09 -07:00
Alexey Neyman
8600f3ce56 Move tools alias creation to a common function
... and in addition to final toolchain aliasing, use it when configuring
multilibs for glibc/musl. Note that uClibc does not need it, it is
explicitly selecting the tools using CROSS_PREFIX.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-12 16:56:19 -07:00
Alexey Neyman
dd55349646 Disable Guile in make if building for host in canadian
make's configure uses pkg-config to detect if Guile should be enabled;
on ArchLinux, this picks up Guile from build machine's pkgconfig and then
it fails to compile.

A better solution might be to create a ${CT_HOST}-pkg-config in
buildtools/bin that would report "unsupported" for all packages.
However a quick grep only showed pkg-config being used by GCJ
(not sure if it will build in canadian cross - we don't have any
samples with GCJ) and Blackfin simulator in GDB (Blackfin is not
currently supported by crosstool-ng). Hence, leave such pkg-config
implementation and testing for another day.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-10 11:59:52 -08:00
Alexey Neyman
fc2f73fc08 When moving gcc libs, prefer the same directory as libc
If libc ended up in a directory other than /lib, place GCC's libs
in that directory as well.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-09 19:07:21 -08:00
Alexey Neyman
55c806a360 Correct warning text to include newer glibc versions
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-08 15:47:48 -08:00
Alexey Neyman
bfcc1e112a Merge pull request #635 from stilor/macos-skip-locales
Skip locales on macos
2017-03-07 08:51:43 -08:00
Alexey Neyman
456cccc0a7 Merge pull request #634 from stilor/macos-canadian
A couple of fixes for canadian samples on macos
2017-03-07 08:51:35 -08:00
Alexey Neyman
ea7f559ef4 Merge pull request #627 from dankm/freebsd
FreeBSD build support
2017-03-07 08:50:43 -08:00
Alexey Neyman
2ef7d36efb Disable format warnings for clang
It picks up gettext string and results in [ERROR] messages from ct-ng
when gettext strings happen inside an error() call.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-07 00:15:29 -08:00
Alexey Neyman
3e94b4f680 Skip building locales on macos, too
--enable-hacker-mode is not sufficient, in 2.25 configure then
fails while checking for sysdeps fragments that apply to a given
configuration, and with that worked around, fails on binutils &
compiler version check.

In brief: if someone wants locales on cygwin/macos, you'd have to
implement cross-localedef (similar to cross-rpcgen) in glibc and
submit it upstream.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-06 23:12:16 -08:00
Alexey Neyman
b3b94e4807 Only add clang-specific flags to clang
I.e., only to CFLAGS_FOR_BUILD if the build is canadian.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-06 18:57:12 -08:00
Alexey Neyman
6cdf0df01b Use CHOST instead of CROSS_PREFIX
The latter does not prevent zlib's configure from overriding 'AR' with
/usr/bin/libtool on macos, and that breaks canadian crosses.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-06 18:57:12 -08:00
Dan McGregor
7f961026c1 Explicitly use gcc for GMP
GMP's configure script tries to be too smart, and if it determines
that it's not cross-compiling it chooses gcc or cc instead of the
wrapper we create at the start of the build.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
2017-03-06 08:56:36 -06:00
Alexey Neyman
120792a97d Sanitize CT_PREFIX_DIR, too
Having .. in it breaks GCC's relocatability.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-05 16:22:40 -08:00
Alexey Neyman
2f24d5cd75 Add libiconv 1.15
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-03 16:50:31 -08:00
Alexey Neyman
865a095d70 Do not pretend we're downloading anything
... when we're actually don't.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-03-03 16:45:05 -08:00
Dan McGregor
c88621f740 glibc: hide native c++ executable from build
If glibc's configure finds the host c++ executable it assumes that
c++ should be enabled for the build. In case we don't have cross g++
built yet (ie, for headers), this causes the build to fail creating
C++ headers. So hide C++ from the build.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
2017-03-01 22:23:39 -06:00
Dan McGregor
a0ab14c4a7 Use BUILD_PREFIX and BUILD_SUFFIX for gcc version
It's possible that "gcc" is not the compiler being used for the build,
so respect BUILD_PREFIX and BUILD_SUFFIX when finding its version.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
2017-03-01 22:23:38 -06:00
Dan McGregor
6d1bcaa2f5 Use configure to find the processor count
configure.ac now finds how to count the CPUs in a system. Currently
the getconf method and sysctl methods are supported. Adding more is
easy enough.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
2017-03-01 22:22:13 -06:00
Dan McGregor
f2f782dd1c Bring in FreeBSD support
Check for FreeBSD specific issues, it is mostly the same as Darwin.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
2017-03-01 22:22:02 -06:00
Alexey Neyman
864d1358e0 Merge pull request #625 from stilor/skip-localedef
Skip localedef
2017-02-28 21:52:06 -08:00
Alexey Neyman
e7163a46c4 Skip locale build on Cygwin
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-28 20:35:14 -08:00
Alexey Neyman
b04d2e84a8 Avoid -T, it is not available on macos
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-28 18:40:51 -08:00
Alexey Neyman
439cab379e Require xz to be present
Some software starts to adopt xz-only distribution (strace,
gcc-linaro, ...). Better that than deal with cryptic errors like
"cannot find strace-.tar.bz2".

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-27 22:55:57 -08:00
Alexey Neyman
2dae1cf816 Require GNU sed
After much struggling with macos (BSD) sed and even getting everything
work in crosstool-ng itself, I had to abandon that because some
components rely on GNU syntax. Specifically, GNU libc uses '/.../{H;g}'
(note absense of the separator after 'g').

So, revert the -r/-E detection and check for sed's being of GNU origin.
MacOS people, sorry, but you'd have to install GNU sed.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-26 20:42:32 -08:00
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
85ae00c1a6 Merge pull request #614 from stilor/elf2flt-cygwin
Fix the build of elf2flt on Cygwin
2017-02-22 22:19:28 -08:00
Alexey Neyman
8397ad2c1a Fix the build of elf2flt on Cygwin
The -lcygwin -lc actually breaks the build: elf2flt picks up the symbols for getopt/optarg via
<getopt.h> in binutils-X.Y/include, where optarg is declared without dllimport attribute.
Therefore it pulls in getopt() from libc/libcygwin, but since optarg is not prefixed with
_imp__, it is pulled from libiberty. But the object file in libiberty also contains getopt()
thus resulting in multiple definitions thereof.

While there, kill extraneous -ldl passed into configure - configure detects -ldl successfully.

Upstream: https://github.com/uclinux-dev/elf2flt/pull/6
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-22 22:17:49 -08:00
Alexey Neyman
4de4507a65 Merge pull request #375 from jasmin-j/add_tls_config
Added new gcc config option CC_GCC_CONFIG_TLS
2017-02-22 22:00:03 -08:00
Alexey Neyman
c72f7101c9 Kill a generated file
... and add it to .gitignore.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-21 23:10:24 -08:00
Jasmin Jessich
c8d7d79e20 Added new gcc config option CC_GCC_CONFIG_TLS
Adding new tristate configuration for TLS (Thread Local Storage) to
add "--enable-tls" (y), "--disable-tls" (n) or nothing (m).

Signed-off-by: Jasmin Jessich <jasmin@anw.at>
2017-02-21 09:10:22 +01:00
Alexey Neyman
6a1b5a3d77 Merge pull request #608 from stilor/static-no-plugins
Disable LTO for static toolchain
2017-02-19 23:27:21 -08:00
Alexey Neyman
4d723d0892 More garbage collection
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-18 23:20:55 -08:00
Alexey Neyman
45512b003d Have LTO depend-on non-static builds
Loading a dynamic library (LTO plugin) from a static binary fails
on ArchLinux. It is also prone to break if a system is ever upgraded.

Also, disable plugins if not enabled explicitly.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-18 19:00:25 -08:00
Alexey Neyman
264b0c8686 More GC
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-18 18:41:04 -08:00
Alexey Neyman
f0716643b4 Garbage collection for GCC options that are same
... on all supported versions.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-18 18:36:34 -08:00
Alexey Neyman
a417c31875 Add --disable-database and --with-fallbacks separately
The dependency between them has been removed in Kconfig.

Signed-off-by: Alexey Neyman <stilor@att.net>
2017-02-17 12:07:39 -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