Commit Graph

1969 Commits

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>
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