Commit Graph

1969 Commits (29422b2eda308526cd568507109b0a222eb09449)

Author SHA1 Message Date
Alexey Neyman 8606251585 Add --with-cpu= on 32-bit SPARC
... if building for GLIBC 2.31+.

Signed-off-by: Alexey Neyman <stilor@att.net>
4 years ago
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>
4 years ago
Alexey Neyman 4fa0ba100b
Merge pull request #1270 from nolange/prevent_glibc_cflags_override
prevent the glibc build from overwriting flags
4 years ago
Alexey Neyman 4897426202
Merge pull request #1266 from nolange/move_builddir_kconfig
move BUILD_DIR variable into Kconfig
4 years ago
Alexey Neyman be04d50510
Merge pull request #1303 from stilor/wip
Update docker to ubuntu 19.10
4 years ago
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>
4 years ago
Alexey Neyman a152d61313
Merge pull request #1257 from nolange/fix_binutils_typo
fixup typo in bitutils.sh
4 years ago
Alexey Neyman 90947b3166
Merge pull request #1274 from maxmorozov/master
CT_LIBC_NEWLIB_REGISTER_FINI is processed correctly
4 years ago
Alexey Neyman 66c2932053
Merge pull request #1259 from nolange/add_binutils_deterministic_archives
enable option for binutils deterministic-archives
4 years ago
Alexey Neyman be5d0317d2
Merge pull request #1201 from abrodkin/topic-glibc-multilib
ARC: Support building of multi-lib Glibc toolchain
4 years ago
Alexey Neyman e0a63b8546
Merge pull request #1280 from dimkr/musl-cflags
Resepct CT_TARGET_{C,LD}FLAGS when building musl
4 years ago
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>
4 years ago
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>
4 years ago
Morozov Max 2260dcfff6 CT_LIBC_NEWLIB_FSEEK_OPTIMIZATION and CT_LIBC_NEWLIB_FVWRITE_IN_STREAMIO are took into account now 4 years ago
Morozov Max 21483c6dbb CT_LIBC_NEWLIB_REGISTER_FINI is processed correctly 4 years ago
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>
4 years ago
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>
4 years ago
Norbert Lange 605805b3dd fix nonfunctional --enable-relro option
Signed-off-by: Norbert Lange <nolange79@gmail.com>
4 years ago
Norbert Lange 7469bc8a73 enable option for binutils deterministic-archives
Signed-off-by: Norbert Lange <nolange79@gmail.com>
4 years ago
Alexey Neyman 064711469c Add Linux versions
Signed-off-by: Alexey Neyman <stilor@att.net>
4 years ago
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>
4 years ago
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>
4 years ago
Alexey Neyman 51f1db5c0a
Merge pull request #1178 from stilor/master
Last fixes for 1.24.0
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
Alexey Neyman 9b9e5c4162 Make lzip an optional dependency
Signed-off-by: Alexey Neyman <stilor@att.net>
5 years ago
Alexey Neyman 5bc79c34bb
Merge pull request #1144 from bwalle/expat-docbook
expat: Build without docbook
5 years ago
Dima Krasner 55fe8a8ba7 Fix musl build when CT_SHARED_LIBS=n
Signed-off-by: Dima Krasner <dima@dimakrasner.com>
5 years ago
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>
5 years ago
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>
5 years ago
Alexey Neyman 16efa9d3e7 Add debug output to Kconfig manipulation functions
Signed-off-by: Alexey Neyman <stilor@att.net>
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
Alexey Neyman 32dd66a35a Use -idirafter instead of copying headers.
Signed-off-by: Alexey Neyman <stilor@att.net>
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
Alexey Neyman 3552aa2e40 Update config.{sub,guess}
Signed-off-by: Alexey Neyman <stilor@att.net>
5 years ago
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>
5 years ago
Roy Storey 5d84835f90 decouple darwin/clang here as per #712
https://github.com/crosstool-ng/crosstool-ng/issues/712#issuecomment-300891861
5 years ago
Roy Storey 2306701d2c clang check before add to CT_CFLAGS_FOR_BUILD/HOST 5 years ago