Commit Graph

2137 Commits

Author SHA1 Message Date
Alexey Brodkin
5c5b4df6d3 gcc: Fix canadian cross building on older hosts
GCC 11+ requires compiler being used to support C++11 standard [1].
And while GCC starting from 6.x has C++11 support enabled by default [2],
older versions need to be forced to implement it with "-std=gnu++11" and luckily
GCC's build-system takes care of that:

 1. For ${host} compiler - [1]
 2. For ${build} compiler - [3, 4]

In a nutshell the configure script tries a couple of options and the one which
helps to build a test source gets appended to CXX (not CXXFLAGS!),
so on say CentOS 7.x with GCC 4.8.5 during cross-compilation of GCC
CXX="x86_64-build_pc-linux-gnu-g++ -std=gnu++11". And all is good.

But in case of canadian cross due to [5] we for some reason* force set
CXX_FOR_BUILD with just a compiler name, effectively overriding all the
magic done by GCC's internals described above.

This leads to a compilation failures like that:
------------------------------------->8----------------------------------
[ALL  ]    In file included from /usr/include/c++/4.8.2/type_traits:35:0,
[ALL  ]                     from .../HOST-x86_64-apple-darwin14/arc-gcc11-elf/src/gcc/gcc/system.h:244,
[ALL  ]                     from .../HOST-x86_64-apple-darwin14/arc-gcc11-elf/src/gcc/gcc/gengtype.c:26:
[ERROR]    /usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
[ALL  ]     #error This file requires compiler and library support for the   ^
------------------------------------->8----------------------------------

* my guess that [5] was done because back in the day indeed we used to have
"--build=${CT_BUILD} --host=${CT_HOST}" in do_cc_core(). But now after [6]
this is no longer necessary as we use "--build=${CT_BUILD} --host=${CT_BUILD}"
and all is safe and clean. So yet another old quirk goes away - hooray!

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5329b59a2e13dabbe2038af0fe2e3cf5fc7f98ed
[2] https://gcc.gnu.org/gcc-6/changes.html
[3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96612
[4] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=7ffcf5d61174dda1f39a623e15f7e5d6b98bbafc
[5] 9c6c090d7b
[6] 08161250ed

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-09-06 23:21:21 -07:00
Chris Packham
b346fa58b1 cc/gcc: Add options for zstd usage
GCC can support using zstd compression for LTO object files. By default
GCC's configure will enable this if libzstd is installed on the machine
building the toolchain. This may be undesirable if the toolchain is to
be used on a different machine. Add an option to control zstd usage and
set the default to the same as the current behaviour (i.e. auto).

Fixes #1579

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-29 21:27:29 +12:00
Chris Packham
672c13eb00 Merge branch 'uclibc-atomics' of https://github.com/foss-for-synopsys-dwc-arc-processors/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-25 20:30:29 +12:00
Chris Packham
86e7788dd0 Merge branch 'gdb-10' of https://github.com/cpackham/crosstool-ng
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-25 20:29:49 +12:00
Steve Bennett
065dabd767 Add support for no-mmu microblaze
no-mmu architectures need to be explicitly listed
in CT_DoKernelTupleValues

Signed-off-by: Steve Bennett <steveb@workware.net.au>
2021-08-25 17:36:47 +10:00
Alexey Brodkin
5463ab4bf6 gdb: Add gdb-10.2
In GDB 10.x gdbserver was promoted to the top-level folder,
see https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=919adfe8409211c726c1d05b47ca59890ee648f1
Which means it is no longer a subfolder in "gdb" and so we have to
build gdbserver now exactly in the same way as normal native GDB.

One interesting detail is gdbserver doesn't need to deal with target
description in .xml so it doesn't depend on libexpat on target,
thus we need to move libexpat explicit selection from do_gdb_backend()
to its callers when building native [full] gdb as well as cross-gdb
for the host.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
[cp: support old/new layout, regenerate patches]
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-08-25 10:12:56 +12:00
Alexey Brodkin
028c372ba6 ARC: No more fiddling with uClibc's CONFIG_ARC_HAS_ATOMICS
Older ARC700 processors had atomic instructions (AKA llock/scond)
as an option and so quite some "atomic" operations were not possible
w/o OS support, which we implemented - see arc_usr_cmpxchg() in the
Linux kernel.

And in uClibc, which was the only Linux libc back in the day of ARC700
era, it is well supported. Well, uClibc could be configured to support it.
Which is done with CONFIG_ARC_HAS_ATOMICS Kconfig option.

But the problem is there's no check for ARC ISA version in uClibc when
this option gets enabled. That leads to a funny situation when even for
ARCv2 processors (ARC HS3x & HS4x) uClibc tries to utilize
arc_usr_cmpxchg() syscall which is not supported for this newer ISA since
ARCv2 processors have atomic instructions built-in all the time.

So what was happening here we didn't specify additional "-matomic"
CFLAG unless we were targeting exactly those ancient ARC770 processors
(ARC700 + MMUv3 + atomics) and so even for ARCv2 we forced uClibc
to not use built-in atomics.

And even though there're ways to add a smarter solution here to handle
that pretty rare by now case of ARC750 (ARC700 + MMUv2 - atomics),
I suggest we just remove this part completely, leaving a possibility
to add needed option in uClibc-ng's configuration
(I mean "packages/uClibc-ng/config").

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-08-24 09:48:56 -07:00
Dimitar Dimitrov
94df240f08 gnuprumcu: Bump to v0.6.0
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>
2021-08-22 18:08:13 +03:00
Kumar Gala
9179450082 newlib-nano: Fix nano.spec based on CT_NEWLIB_NANO_INSTALL_IN_TARGET
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>
2021-07-30 00:02:42 -05:00
Chris Packham
9f0c0193e9 Merge pull request #1561 from keith-packard/picolibc-1.7.1
Picolibc 1.7.1
2021-07-18 19:39:24 +12:00
Chris Packham
26ce3b335e Merge pull request #1560 from stephanosio/upstream_local_common_patch_dir
Support common local patch directory
2021-07-18 19:37:16 +12:00
QBos07
62b5971abe Disable source-highlighting for static build
Fixes #1487
2021-07-18 19:33:48 +12:00
Keith Packard
9dc8ebf871 picolibc: Disable wchar_t use in libstdc++
Picolibc doesn't support wchar_t in stdio, so disable the use of these
functions from libstdc++.

Signed-off-by: Keith Packard <keithp@keithp.com>
2021-07-13 11:18:47 -07:00
Stephanos Ioannidis
b48e1a31f3 Support common local patch directory
This commit updates the patching process such that the local patches
can be applied in a version-independent manner, as with the patches
provided by the crosstool-ng packages.

This is done by reading the patch files from
`${CT_LOCAL_PATCH_DIR}/(package_name)` rather than from
`${CT_LOCAL_PATCH_DIR}/(package_name)/(version)`.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-07-14 00:07:30 +09:00
Chris Packham
3782373c8c
Merge pull request #1551 from rcatolino/add_extra_cxx_flags
Add EXTRA_CXXFLAGS_FOR_BUILD option
2021-07-11 19:26:36 +12:00
Raphael Catolino
c3b13ffdda Add EXTRA_CXXFLAGS_FOR_BUILD option
Signed-off-by: Raphael Catolino <raphael.catolino@gmail.com>
2021-07-06 16:19:17 +01:00
Chris Packham
1aeeea6919 CT_Mirrors: make use of kernel cdn
cdn.kernel.org automatically redirects to a geographically close mirror.
Make use of this instead of www.kernel.org or mirrors.edge.kernel.org.
While were at it make sure we use https.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-07-06 20:23:49 +12:00
Nik Konyuchenko
05c6758985 Fix build of older Glibc using GCC >=10
Issue #1535

GCC 10 changed the default to -fno-common, which leads to a linking error in GLibc older than 2.30.

This change adds -fcommon cflag for the target GLibc versions <=2.29 and GCC >=10.

This change also adds additional cflags for the target GLibc to disable
new GCC11 checks that lead to compilation errors.

Signed-off-by: Nik Konyuchenko <spaun2002mobile@gmail.com>
2021-06-24 00:58:32 -07:00
Chris Packham
96d8a0588f gcc: Make CC_GCC_TM_CLONE_REGISTRY tristate
Explicitly passing --disable-tm-clone-registry causes gcc to create a
crtbegin.o with a zero-sized .init_array/.fini_array. This in turn
causes ld to complain.

Make CC_GCC_TM_CLONE_REGISTRY a tristate so if it's not explicitly
enabled we can let ./configure decide.

Fixes #1531

Fixes: 1e21a302 ("gcc: Add CT_CC_GCC_TM_CLONE_REGISTRY config")
Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-06-20 11:37:00 +12:00
Chris Packham
594b9286f4
Merge pull request #1524 from stephanosio/gcc_custom_libstdcpp_cxx_flags_upstream
Fix libstdc++ build options
2021-06-09 20:11:48 +12:00
Stephanos Ioannidis
1e21a30287 gcc: Add CT_CC_GCC_TM_CLONE_REGISTRY config
This commit adds a new gcc config `CT_CC_GCC_TM_CLONE_REGISTRY` that
enables the GCC transactional memory clone registry feature for libgcc.

Note that the gcc option to control this feature is only available in
gcc 10 and above.
(see gcc commit 5a4602805eb3ebddbc935b102481e63bffc7c5e6)

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-06-08 02:13:45 +09:00
Stephanos Ioannidis
7144b5f275 newlib: Add libstdc++ nano-specific CXXFLAGS
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>
2021-06-07 19:53:28 +09:00
Stephanos Ioannidis
fffa4c5aa5 gcc: Allow setting custom target CXXFLAGS
This commit adds two additional arguments (`cxxflags_for_target` and
`extra_cxxflags_for_target`) for the gcc backend build function that
can be used to specify custom target CXXFLAGS.

By default, the target CXXFLAGS is set to the target CFLAGS. When
`cxxflags_for_target` is specified however, it overrides that behaviour
and allows setting different target CXXFLAGS from the target CFLAGS.

The `extra_cxxflags_for_target` argument can be used to specify the
extra target CXXFLAGS to be appended to the target CXXFLAGS. This is
useful when it is necessary to append CXX-specific flags to the
existing CFLAGS to be used as the target CXXFLAGS.

A useful application of this is building full and nano versions of
libstdc++ with different target CXXFLAGS as necessitated by
`nano.specs`.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-06-07 19:53:28 +09:00
Stephanos Ioannidis
3c637c1eec gcc: Assume '-O2' by default for building gcc target libraries
The gcc target libraries (e.g. libstdc++) are currently built without
any optimisation flag when `CT_CC_GCC_ENABLE_TARGET_OPTSPACE` is not
enabled and default to `-O0` unless user explicitly specifies an
optimisation flag.

This commit updates the gcc build script to assume `-O2` for building
target libraries unless user provides a different optimisation flag.

Note also that this is the default behaviour for gcc when
C[XX]FLAGS_FOR_TARGET is not overridden.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2021-06-07 19:52:58 +09:00
Christoph Muellner
1dc25bf611 scripts/functions: Add better support for annotanted git tags
Annotated git tags are git objects with their own ID.
They contain the commit ID where they point to.

When downloading from annotated tags, we currently get the following warning:
  "Revision being fetched changed to ${new_unique_id};"
The old unique_id is the ID of the annotated tag and the new unique_id
is the commit it points to.

Let's resolve this by first assuming to have an annotated tag and let
git ls-remote dereference it. If that fails (e.g. if it can't be
dereferenced because it is not an annotated tag), then let's proceed as
before and don't do any dereferencing.

Signed-off-by: Christoph Muellner <cmuellner@linux.com>
2021-05-06 02:21:33 +02:00
Chris Packham
0528a9d744 Merge branch 'abrodkin-newlib-nano-relocatable' of git://github.com/foss-for-synopsys-dwc-arc-processors/crosstool-ng 2021-04-19 20:29:26 +12:00
Chris Packham
e27def9d3b Merge branch 'newlib-nano-target' of git://github.com/galak/crosstool-ng 2021-04-19 20:25:49 +12:00
Alexey Brodkin
89273b59af newlib-nano: Use run-time calculated paths in top-level nano.specs
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>
2021-04-16 17:11:01 +03:00
Kumar Gala
8e99639419 newlib-nano: Add option to copy libs into target
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>
2021-04-15 14:29:04 -05:00
Kumar Gala
2816a97a25 newlib-nano: remove whitespace from nano.spec file
Remove trailing whitespace from generated nano.spec file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-15 14:29:04 -05:00
Alexey Brodkin
2baacbfe36 gdb: Don't mess with gdbserver config permissions
Some really old GDB releases did have gdbserver's configure
script w/o execution permissions, so there was a need in the fix.

As per Yann most likely it could have been true for GDB versions in
between v5.3 & 6.6. Moreover it could have been fixed on re-release
of GDB tarballs done in 2011, see [1].

And given we no longer support such old GDB versions in CT-NG
(as of today we have 6.8 - 9.2, moreover it's not clear which of
6.8-7.x versions are still being actively used) we'll revert that old hack
for now in a hope that it won't hurt anybody.

Though if somebody sees that problem again
we'll be able to revert this again ;)

[1] https://sourceware.org/legacy-ml/gdb/2011-09/msg00002.html

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-04-15 16:26:05 +03:00
Chris Packham
3fa241a4e1 build: debug: strace: Add -D__USE_MISC to target CFLAGS
Similar to commit ca45a8f9 ("Add -D__GLIBC__ to target CFLAGS") newer
versions of strace bundle the kernel headers which cause build errors
such as:

[ALL  ]    In file included from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/bundled/linux/include/uapi/linux/in6.h:26,
[ALL  ]                     from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/bundled/linux/include/uapi/linux/if_bridge.h:19,
[ALL  ]                     from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/src/rtnl_mdb.c:16:
[ERROR] /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/bundled/linux/include/uapi/linux/libc-compat.h:109: error: "__UAPI_DEF_IN6_ADDR_ALT" redefined [-Werror]
[ALL  ]      109 | #define __UAPI_DEF_IN6_ADDR_ALT  1
[ALL  ]          |
[ALL  ]    In file included from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/src/rtnl_mdb.c:15:
[ALL  ] /home/x-tool/x-tools/arm-unknown-linux-musleabi/arm-unknown-linux-musleabi/sysroot/usr/include/netinet/in.h:401: note: this is the location of the previous definition
[ALL  ]      401 | #define __UAPI_DEF_IN6_ADDR_ALT 0
[ALL  ]          |
[ALL  ]    cc1: all warnings being treated as errors

By defining __USE_MISC we get __UAPI_DEF_IN6_ADDR_ALT defined in a
compatible manner.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2021-03-30 12:58:47 +13:00
Ivan Kukhta
8b4373d4ee Extend CC_GCC_LIBSSP with manual state
Signed-off-by: Ivan Kukhta <Ivan.Kukhta@acronis.com>
2021-03-17 13:50:45 +03:00
Alexey Brodkin
5171b3033a newlib-nano: Create symlinks for nano-suffixed libs
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>
2021-02-19 19:25:12 +03:00
Chris Packham
30316cd27a
Merge pull request #1448 from dinuxbg/master
Add PRU target configuration
2021-01-25 12:40:31 +13:00
Dimitar Dimitrov
e7d0485ca2 Add package with PRU linker scripts and headers
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>
2021-01-19 21:18:55 +02:00
Dimitar Dimitrov
c800bc8c82 Add PRU cross tool target
Add sample configuration for building cross toolchain for the TI PRU.
PRU cores are present in many of the BeagleBone single board computers.

More information about the PRU can be found in https://bbb.io/pru

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2021-01-19 21:18:55 +02:00
Keith Packard
beb587a271 newlib-nano: Build libstdc++ against newlib-nano if requested
This uses the gcc support for building libstdc++ using alternate lib
header files.

Signed-off-by: Keith Packard <keithp@keithp.com>
2021-01-14 15:05:10 -08:00
Keith Packard
15e053fdc4 Create nano.spec file that sits atop the existing nano build
Signed-off-by: Keith Packard <keithp@keithp.com>
2021-01-14 15:05:10 -08:00
Keith Packard
945b4c6436 Add newlib-nano as companion lib
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>
2021-01-14 15:05:10 -08:00
Chris Packham
e64318656c Merge branches 'elijahr-dtc-1.6.0', 'elijahr-readme-typo', 'foss-for-synopsys-dwc-arc-processors-abrodkin-libgmp-for-mac' and 'keith-packard-picolibc-companion' 2021-01-13 19:50:23 +13:00
Keith Packard
27b18d2fc7 picolibc: Build libstdc++ against picolibc if requested
This uses the gcc support for building libstdc++ using alternate lib
header files.

Signed-off-by: Keith Packard <keithp@keithp.com>
2021-01-11 23:29:01 -08:00
Keith Packard
43f5079382 gcc: Add support for building libstdc++ with alternate libc
This adds another mode to do_gcc_core_backend that builds libstdc++
against an alternate libc implementation.

Signed-off-by: Keith Packard <keithp@keithp.com>
2021-01-11 22:48:46 -08:00
Keith Packard
7e457684ea picolibc: Convert to companion library
This allows configurations to include picolibc without excluding
another C library.

Signed-off-by: Keith Packard <keithp@keithp.com>
2021-01-08 17:48:33 -08:00
Alexey Brodkin
1a65041dc0 libgmp: Fix cross-canadian build for macOS
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>
2020-12-23 18:34:08 +03:00
Alexey Brodkin
b833f45259 gcc: Make it aware of Newlib nano IO feature
Even though GCC as a compiler has nothing to do with a C library
being used it still makes sense to know about Newlib's compact
implementation of IO functions:

 * For targets like MSP430 which require to have such a tuned
   Newlib if "-mtiny-printf" is passed to the GCC's command-line [1]

 * For correct compilation of the following GCC's own DejaGnu tests [2]:
     - gcc/testsuite/gcc.c-torture/execute/920501-8.c
     - gcc/testsuite/gcc.c-torture/execute/930513-1.c
     - gcc/testsuite/gcc.dg/torture/builtin-sprintf.c
     - gcc/testsuite/gcc.c-torture/execute/ieee/920810-1.x

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=02afb6a9321fbfb435452636cedc2cd43f0c4fd2
[2] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=571bbd0d48d5872eacbd0b681fce6e1ae754520b

So we add that missing cross-dependency now.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-12-23 17:54:03 +03:00
Kumar Gala
c12f5b209f Run through 'ct-ng updatetools'
Update config.{sub,guess} to get proper awareness for ARM based MacOS.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-12-04 10:14:53 -06:00
Chris Packham
a4231a555a
Merge pull request #1342 from DspHack/feature/add_support_for_ti_c6x
Experimental: Add support for the Texas Instruments C6X (TMS320C6000 …
2020-11-10 20:29:25 +13:00
Dan Tejada
3a3e645245 c6x: Remove multilib requirement
Restore tuple config check
     Add sample configuration

Signed-off-by: Dan Tejada <dan.tejada@cantada.com>
2020-11-02 16:21:26 -05:00
Chris Packham
beae27d87b arm: Disable context functions for Thumb
Similar to commit 57679b5e ("Disable context functions for Thumb") when
building for thumb we need to unset UCLIBC_HAS_CONTEXT_FUNCS.

Fixes #1397

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2020-11-01 21:17:50 +13:00
Chris Packham
827b42336e Merge branch 'xlocale' of git://github.com/lancethepants/crosstool-ng into lancethepants-xlocale 2020-11-01 20:01:58 +13:00
lancethepants
bc5798a8ea Don't remove XLOCALE support unconditionally.
Signed-off-by: Lance Fredrickson <lancethepants@gmail.com>
2020-10-15 13:59:04 -06:00
Alexey Brodkin
57f5909285 binutils: Disable glob for better portability
Since glibc 2.27 glob interface was changed [1]  and so
"glob" & "glob64" symbols require glibc 2.27+.

For us that means if we build Binutils on a machine with glibc 2.27+
produced binaries won't be any longer usable on machines with older
glibc.

As an example [2]: build on Ubuntu 18.04 (with glibc 2.27) and try to run
on CentOS 7.x (with glibc 2.17), you'll see this:
---------------------->8-------------------
ldd ld
ld: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by ld)
---------------------->8-------------------

Now given glob is not really used by Binutils itself (only needed by GDB)
and we build Binutils & GDB separately let's make at least Binutils
more portable.

In theory we may even try to do the same hack for GDB forcing it to use
imported glob implementation. But since GDB is now built strictly by C++
compiler we'll get waaay to many incompatibilities due to multiple changes
of C++ ABI in between GCC 7.5 of Ubuntu 18.04 and GCC 4.8.5 of CentOS 7.x,
so there's no point to even try.

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=ccf970c7a77e86f4f5ef8ecc5e637114b1c0136a
[2] https://github.com/zephyrproject-rtos/sdk-ng/issues/280

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2020-10-14 23:10:47 +03:00
Chris Packham
99ce9d3861
Merge pull request #1400 from fvalette/fix-m4-build-for-mingw32-host
m4: fix build for mingw32 host
2020-10-07 20:03:16 +13:00
Florent Valette
1c93176e05 m4: fix build for mingw32 host
While building a canadian toolchain for windows host (any target),
the build failed for m4 host companion_tool with a recent mingw-w64
(at least 7.0.0).
m4 needs stack smashing protection which is not part of mingw-w64 c
library and an explicit trigger to link w/ libssp is needed.

Signed-off-by: Florent Valette <florent.valette@gmail.com>
2020-10-06 09:32:40 +02:00
Hans-Christian Noren Egtvedt
60e782fdec glibc: set glibc build system default_cflags empty
By setting glibc build system default_cflags to be empty before
building, we will enforce the build system to only use the crosstool-ng
CFLAGS when building glibc.

Properly solves the issue identified in #1396.

Signed-off-by: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
2020-10-05 15:37:19 +02:00
Chris Packham
ea386017b6 Merge branch 'picolibc-multiarch' of git://github.com/keith-packard/crosstool-ng into master 2020-09-20 21:17:28 +12:00
Keith Packard
e802686d86 picolibc: Use target architecture to drive picolibc configuration
This selects code matching the target architecture within picolibc.

Signed-off-by: Keith Packard <keithp@keithp.com>
2020-09-16 16:04:51 -07:00
Keith Packard
c1c475d0a0 Map picolibc to suitable CT_TARGET_SYS values
picolibc is another bare-metal C library, and so should be mapped
to CT_TARGET_SYS just like newlib does.

Signed-off-by: Keith Packard <keithp@keithp.com>
2020-09-16 11:52:58 -07:00
Mikhail Falaleev
4c4e5ba047 Patches: search package patches in the top package directory
Before patches for specific package were searched in
packages/${pkg_name}/${version}. This means that with usage of custom
version, patches wont be applied. This commit makes ct-ng search bundled
patches also in packages/${pkg_name} directory. That means that we can
put some patches in this directory, that will be applied to any version
of this component.
2020-09-10 17:14:39 +03:00
Chris Packham
54bd54ee19 Merge branch 'BR1_zlinux_cross_comp' of git://github.com/pradghos/crosstool-ng into pradghos-BR1_zlinux_cross_comp 2020-09-06 21:44:21 +12:00
Keith Packard
c15de32ec6 Add picolibc support [v2]
This adds support for using picolibc instead of newlib on embedded
systems.

Signed-off-by: Keith Packard <keithp@keithp.com>

v2:
	Add check for meson and ninja
	Sync option default values with current picolibc defaults
	Remove xtensa sys header file install as those aren't in picolibc
2020-09-01 09:42:53 -07:00
Chris Packham
a2b4eab30c
Merge pull request #1366 from antmak/bugfix/zlib_macos_patch
zlib-1.2.11: Add a patch to cross-compile for macos
2020-08-30 20:57:44 +12:00
Pradipta Ghosh
ebae86dea7 Adding new samples s390x/s390-unknown-linux-gnu
- s390x/s390 is allowed to pair with other vendor name.
- new samples are being added to use this flexibility.

- Fix space issue
2020-08-27 09:51:17 -07:00
Anton Maklakov
6dd9d57280 crosstool-NG: Fix libtool for mangled tuples as all other cross-tools 2020-08-03 13:41:49 +07:00
Stephanos Ioannidis
041427aec9 Enable static libgcc when CT_GDB_NATIVE_STATIC_LIBSTDCXX is set
This commit updates the GDB build script to specify `-static-libgcc`
when `CT_GDB_NATIVE_STATIC_LIBSTDCXX` is enabled. Both libgcc and
libstdc++ are considered to be part of the "standard libraries," and
should be specified by the same flag (the configuration symbol could
potentially use a better name and/or further indirection).

This also semantically aligns the `CT_GDB_NATIVE_STATIC_LIBSTDCXX`
with the equivalent GCC configuration `CT_CC_GCC_STATIC_LIBSTDCXX`,
which also enables static linking of both libgcc and libstdc++.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-26 16:34:31 +09:00
Stephanos Ioannidis
b07da3bb69 Fix CT_GDB_NATIVE_STATIC_LIBSTDCXX reference
This commit fixes an incorrect reference to the configuration
`CT_GDB_NATIVE_STATIC_LIBSTDCXX` in the GDB build script.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-26 16:25:20 +09:00
Dan Tejada
d532f02542 Experimental: Add support for the Texas Instruments C6X (TMS320C6000 series) DSPs
-- c6x: Add support for c6x product families to pass on to uClibC-ng
  -- c6x: Fix multilib support
  -- c6x: Add patch fix internal instruction error (GCC 57295)

Signed-off-by: Dan Tejada <dan.tejada@cantada.com>
2020-05-20 21:16:14 -04:00
Alexey Neyman
8606251585 Add --with-cpu= on 32-bit SPARC
... if building for GLIBC 2.31+.

Signed-off-by: Alexey Neyman <stilor@att.net>
2020-03-03 16:40:33 -08:00
Alexey Neyman
d978290f39 Set --with-cpu-{32,64} for multilib builds
GLIBC 2.31 needs --with-cpu=ultrasparc for both 32/64-bits now, and
--with-cpu only sets the CPU model for the "primary" bitness.

Signed-off-by: Alexey Neyman <stilor@att.net>
2020-02-26 11:05:19 -08:00
Alexey Neyman
4fa0ba100b
Merge pull request #1270 from nolange/prevent_glibc_cflags_override
prevent the glibc build from overwriting flags
2020-02-16 15:22:44 -08:00
Alexey Neyman
4897426202
Merge pull request #1266 from nolange/move_builddir_kconfig
move BUILD_DIR variable into Kconfig
2020-02-16 15:21:45 -08:00
Alexey Neyman
be04d50510
Merge pull request #1303 from stilor/wip
Update docker to ubuntu 19.10
2020-02-09 13:26:47 -08:00
Alexey Neyman
c317f57b40 Suppress YAML support in DTC
... which fails to build if pkg-config is not installed.

Signed-off-by: Alexey Neyman <stilor@att.net>
2020-02-03 16:12:38 -08:00
Alexey Neyman
a152d61313
Merge pull request #1257 from nolange/fix_binutils_typo
fixup typo in bitutils.sh
2020-01-21 16:56:17 -08:00
Alexey Neyman
90947b3166
Merge pull request #1274 from maxmorozov/master
CT_LIBC_NEWLIB_REGISTER_FINI is processed correctly
2020-01-21 16:44:29 -08:00
Alexey Neyman
66c2932053
Merge pull request #1259 from nolange/add_binutils_deterministic_archives
enable option for binutils deterministic-archives
2019-12-23 15:19:24 -08:00
Alexey Neyman
be5d0317d2
Merge pull request #1201 from abrodkin/topic-glibc-multilib
ARC: Support building of multi-lib Glibc toolchain
2019-12-23 15:17:34 -08:00
Alexey Neyman
e0a63b8546
Merge pull request #1280 from dimkr/musl-cflags
Resepct CT_TARGET_{C,LD}FLAGS when building musl
2019-12-23 14:58:45 -08:00
Stephanos Ioannidis
bb1d687e1d Add newlib retargetable locking configuration
This commit adds support for the newlib configuration option
'--enable-newlib-retargetable-locking'.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-12-20 11:18:46 +09:00
Dima Krasner
de0d1dbe02 Resepct CT_TARGET_{C,LD}FLAGS when building musl
I was trying to build static binaries for a range of Broadcom soft-float ARMv7
SoCs and kept getting SIGILL, although I was targeting Cortex A7 (and A5,
later), even on A9 and A15.

I found out that once I add -msoft-float, +mp+sec is to blame:

   Attribute Section: aeabi
   File Attributes
  -  Tag_CPU_name: "7VE"
  +  Tag_CPU_name: "7"
     Tag_CPU_arch: v7
  -  Tag_CPU_arch_profile: Application
  -  Tag_ARM_ISA_use: Yes
     Tag_THUMB_ISA_use: Thumb-2
     Tag_ABI_PCS_wchar_t: 4
     Tag_ABI_FP_rounding: Needed
  @@ -12,8 +10,5 @@ File Attributes
     Tag_ABI_FP_number_model: IEEE 754
     Tag_ABI_align_needed: 8-byte
     Tag_ABI_enum_size: int
     Tag_ABI_optimization_goals: Aggressive Size
     Tag_CPU_unaligned_access: v6
  -  Tag_MPextension_use: Allowed
  -  Tag_DIV_use: Allowed in v7-A with integer division extension
  -  Tag_Virtualization_use: TrustZone and Virtualization Extensions

(This is the readelf -A diff, before and after armv7-a+nofp -> armv7+nofp).

I kept getting SIGILL even after building my application with a toolchain built
with the correct CFLAGS and found out that crosstool-ng doesn't pass the host
CFLAGS when building musl, which pollutes my binary with these ARMv7 extensions.

Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2019-12-04 16:55:20 +02:00
Morozov Max
2260dcfff6 CT_LIBC_NEWLIB_FSEEK_OPTIMIZATION and CT_LIBC_NEWLIB_FVWRITE_IN_STREAMIO are took into account now 2019-11-04 10:11:04 +04:00
Morozov Max
21483c6dbb CT_LIBC_NEWLIB_REGISTER_FINI is processed correctly 2019-11-04 03:40:45 +04:00
Norbert Lange
bd0ea7ed21 prevent the glibc build from overwriting flags
The glibc will append the content of the CFLAGS variable,
overriding previous flags.
If unset, the CFLAGS variable is not empty, so explicitly set it.
Instead prepend the default CFLAGS flags.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
2019-10-27 23:12:25 +01:00
Norbert Lange
ff0e8ac7ca move BUILD_DIR variable into Kconfig
this allows users to reference this variable,
for ex. in TARGET_CFLAGS to remap paths.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
2019-10-19 00:20:55 +02:00
Norbert Lange
605805b3dd fix nonfunctional --enable-relro option
Signed-off-by: Norbert Lange <nolange79@gmail.com>
2019-10-15 11:19:34 +02:00
Norbert Lange
7469bc8a73 enable option for binutils deterministic-archives
Signed-off-by: Norbert Lange <nolange79@gmail.com>
2019-10-10 21:39:29 +02:00
Alexey Neyman
064711469c Add Linux versions
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-10-01 21:22:44 -07:00
Chris Packham
8ad4a8b83f build/internals.sh: Handle pie executables
Fixes: #887

On some systems the file command identifies a pie executable as a shared
object. Update do_finish() to handle this case so that they are stripped
as well.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2019-09-14 22:21:11 +12:00
Alexey Brodkin
de76f7cc82 ARC: Support building of multi-lib Glibc toolchain
From GCC's standpoint ARC's multilib items are defined by "mcpu" values
which we have quite a few and for all of them might be built optimized
cross-toolchain.

From Glibc's standpoint multilib is just multi-ABI [1] and so very limited
versions are supposed to co-exist (e.g. arc700 & archs).

Here we force Glibc to install libraries in GCC's multilib folder to create
a universal cross-toolchain that has libs optimized for multiple CPU types.

But note we only need to mess with installation paths in case of real
multilib, otherwise we keep default "lib/" paths so that GCC finds default
(the one and only) libs where it expects them to be.

Also here we add a sample which allows to build universal Glibc Linux
toolchain for ARC.

[1] https://sourceware.org/ml/libc-alpha/2019-06/msg00018.html

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2019-06-14 17:50:46 +03:00
Alexey Neyman
51f1db5c0a
Merge pull request #1178 from stilor/master
Last fixes for 1.24.0
2019-04-05 14:09:48 -07:00
Alexey Neyman
693d3943b1 Rename JOBSFLAGS -> CT_JOBSFLAGS
... so that it is saved/restored when restarting the build.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-04-04 18:57:42 -07:00
Alexey Neyman
31002a0c0a Add an ability to mark a configuration as invalid
... so that the build will fail early and predictably.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-04-04 18:57:42 -07:00
Alexey Neyman
cc3686ec2f An artifact of merging native/gdbserver backends
... resulted in an attempt to build libinproctrace.so whenever any
of the {gdbserver, native gdb} was enabled.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-04-04 18:57:32 -07:00
Max Filippov
4f360146eb Fix uClibc build for noMMU target
uclibc_backend_once tries to build dummy shared libraries regardless of
whether shared libraries support for target is enabled or not, resulting
in build failure in noMMU bFLT configuration.
Only build dummy shared libraries when shared library support for target
is enabled.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2019-03-23 11:09:45 -07:00
Max Filippov
f8ed7002c6 Add support for noMMU xtensa
scripts/build/kernel/linux.sh only provides suffix to known
architectures when building toolchain targeting noMMU linux.
Add support for xtensa and assign uclinux suffix to it.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2019-03-23 11:09:43 -07:00
Alexey Neyman
a75a770595 Make the proc_service.h workaround apply to gdbserver
... when it is compiled without the native GDB.

Also, fix the gdbserver to be installed without a program prefix in this
case, as it was before the unification of the GDB backend.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-03-12 23:08:58 -07:00
Alexey Neyman
de36f78f89 Allow older GDB to build against newer glibc
Also, fix the subdir used when only gdbserver is built (without native
GDB).

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-03-11 00:33:22 -07:00
Alexey Neyman
1e25ebc7e0 Move GDB build into a common backend function
... needed to create a common runtime test for an incompatible change
in glibc API.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-03-09 18:01:30 -08:00
Alexey Neyman
b3cce054ef Meet our new companion tool, bison
Which is here courtesy of CentOS6, which only has bison 2.4 - while new
glibc requires 2.7.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-03-04 00:22:02 -08:00
Alexey Neyman
862c35457d Fix build of glibc 2.29 on systems with obsolete host programs
- Force building make as a companion tool if host make is older than
4.0 (CentOS 7 currently has 3.82)
- Disable 2.29 as a choice if host python is older than 3.4
(CentOS 7 has 2.6 unless python from EPEL is installed)
- Python2 emits its version information to STDERR. Ugh.

While there, also use the detected host Python for GDB configuration.

Signed-off-by: Alexey Neyman <stilor@att.net>
2019-03-02 15:45:37 -08:00
Alexey Neyman
9b9e5c4162 Make lzip an optional dependency
Signed-off-by: Alexey Neyman <stilor@att.net>
2019-02-28 17:13:12 -08:00
Alexey Neyman
5bc79c34bb
Merge pull request #1144 from bwalle/expat-docbook
expat: Build without docbook
2019-02-25 15:32:10 -08:00
Dima Krasner
55fe8a8ba7 Fix musl build when CT_SHARED_LIBS=n
Signed-off-by: Dima Krasner <dima@dimakrasner.com>
2019-02-24 09:36:46 +02:00
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