It's necessary for building native GDB 13+. It depends
on MPFR but it hasn't presented in scripts yet for building
for target.
Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
Old options %(newlib_nano_link) for the linker must be passed
otherwise linking may fail. E.g., in case of multilib
configurations a correct emulation mode may be not passed.
Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
These values are used when constructing the default linker scripts
used with picolibc. Setting reasonable defaults allows simple test
applications to be compiled without additional configuration.
Signed-off-by: Keith Packard <keithp@keithp.com>
This moves the picolibc configuration values under C-library -> picolibc
so that they will be more easily discovered.
Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
Add zstd to the companion libs witch allows to use lto zstd compression
in a canadian or cross-native enviroment
Signed-off-by: QBos07 <62326551+QBos07@users.noreply.github.com>
Signed-off-by: Quentin Boswank <62326551+QBos07@users.noreply.github.com>
libgccjit is still under development and, despite its name, may also be used for
ahead-of-time compilation.
Documentation can be found on the gcc website:
https://gcc.gnu.org/onlinedocs/jit/internals/index.htmlhttps://gcc.gnu.org/wiki/JIT
With this change it's possible to enable the building of the libgccjit. It's
enabled as a language (with --enable-languages=jit) even if not a language
frontend at all.
The main changes are related to the requirement of having everything host side
built as Position Independent Code (PIC) with --enable-host-shared. GCC has the
needed logic for building its dependencies (mpc, gmp, mpfr, ...) correctly when
built "in-tree", which is not the case with crosstool-ng (see
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=05048fc29f0)
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
When GMP is being "cross" compiled for the same architecture (i.e. build
== host) it does not pick the right compiler. Set CC_FOR_BUILD and
CPP_FOR_BUILD to override the default compiler.
Fixes#1328
Signed-off-by: Chris Packham <judge.packham@gmail.com>
When `CT_NEWLIB_NANO_INSTALL_IN_TARGET=y`, the `nano.specs` file
emitted by the newlib-nano build script contains an invalid include
path, resulting in the full `newlib.h` being included instead of the
nano `newlib.h` by the application.
`=/include/newlib-nano` is not a valid path (`=` does not mean anything
and that string is taken as an include path as-is) and GCC ignores this
include path, resulting in application including the `newlib.h` from
`include/` which contains the newlib build configurations for the full
newlib.
This commit modifies the newlib-nano build script to emit a proper
newlib-nano include path relative to the `GCC_EXEC_PREFIX`.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
... and the code dependent on them, after the latest wave of obsolete
package removals. This concludes the glorious history of the original
uClibc (non-NG) with lots of kludges removed.
There was a choice here, whether to call the resulting libc "uClibc" or
"uClibc-ng". I opted in favor of giving uClibc-ng the recognition it
deserves, although it had some ripple effect in the ct-ng code.
Signed-off-by: Alexey Neyman <stilor@att.net>
Changes since v0.5.0:
* Add spec files for am64x SoCs.
* Require Binutils at least version 2.37.
* Require pru-gcc to be installed.
* Remove linker scripts. Instead set memory sizes from specs.
* Activate --gc-sections linker option by default.
* The "--host=pru" configure option must be used instead of "--target=pru.
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
The spec file was missing replacing various libs like libc, libm, etc
with their nano equiv when CT_NEWLIB_NANO_INSTALL_IN_TARGET=y. Update
the nano.spec file that is generated to rename libc, libm, etc if
CT_NEWLIB_NANO_INSTALL_IN_TARGET=y
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit adds a new config that can be used to specify the target
CXXFLAGS specific to the libstdc++ newlib-nano variant.
By default, this config is set to specify the `-fno-exceptions` option,
which disables C++ exception handling support and greatly reduces the
compiled binary size.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
In currently generated top-level "nano.specs" we resolve
paths during toolchain building and then use those pre-defined
full paths once the toolchain got built.
That's OK until the toolchain is used right were it was built,
otherwise paths used in the top-level "nano.specs" become
irrelevant and linker fails to find "nano" libs reverting to
non-"nano" libs in the default location.
See https://github.com/crosstool-ng/crosstool-ng/issues/1491.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Add an option that will install a copy of newlib-nano lib*.a file in
the target dir but renamed with a nano.a suffix (eg: libc_nano.a) as
some default nano.spec files from newlib expect this setup.
Additionally the newlib-nano version of newlib.h will get copied to
include/newlib-nano/newlib.h.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If existing board's .specs are used for linking of a user's application,
then instead of normally used libs like libc.a & libstdc++.a might be
requested their "nano"-suffixed siblings: libc_nano.a, libstdc++_nano etc.
That way:
----------------------------->8---------------------------
%rename link_gcc_c_sequence myboard_link_gcc_c_sequence
*myboard_libc:
%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano}
*link_gcc_c_sequence:
%(myboard_link_gcc_c_sequence) --start-group %G %(myboard_libc) --end-group
----------------------------->8---------------------------
Our companion newlib-nano libs are all built optimized for size, so we'd like
to use them for linking. But given linker will see "-lc_nano -lstdc++_nano"
on its command line non-suffixed libs will be ignored.
To solve it we create those "_nano"-suffixed libraries as simple symlinks to
existing libs..
Fixes https://github.com/crosstool-ng/crosstool-ng/issues/1458.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Include the gnuprumcu package in PRU cross toolchain.
Toolchain is somewhat useless without device specs and
linker scripts for the various SoCs.
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
This allows building newlib-nano in addition to newlib and picolibc,
allowing users to select between C libraries within the same toolchain.
Signed-off-by: Keith Packard <keithp@keithp.com>
Currently when building cross-canadian toolchain for macOS
the folowing error happens when GCC is configured:
|ld: illegal text-relocation to '___gmp_binvert_limb_table' in
|... /.build/... /buildtools/complibs-host/lib/libgmp.a(mp_minv_tab.o) from '___gmpn_divexact_1' in
|... /.build/... /buildtools/complibs-host/lib/libgmp.a(dive_1.o)
|collect2: error: ld returned 1 exit status
Apparently this might be solved with GMP configured with "--with-pic",
even though we're talking about static library here.
That solution was found here:
https://github.com/Homebrew/homebrew-core/pull/25470
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
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>
- 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>
... 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>
- 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>
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>
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>
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>
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>
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>