aboutsummaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Disable implicit-function-declaration error for newlibNik Konyuchenko2024-05-181-0/+3
| | | | | | | | | GCC14 will treat implicit-function-declaration as an error by default. See https://gcc.gnu.org/gcc-14/porting_to.html for details. Some libc function like __trap34 are defined in assembly and break this GCC diagnostic. Signed-off-by: Nik Konyuchenko <spaun2002mobile@gmail.com>
* mingw-w64: enable wildcardMateusz Mikuła2024-04-241-0/+1
| | | | | | Wildcard is an opt-in (disabled by the default) feature that is used by many GNU tools like Binutils. Signed-off-by: Mateusz Mikuła <mati865@gmail.com>
* scripts/functions: Use CT_Abort when paths.sh is missingChris Packham2024-04-241-1/+1
| | | | | | | | | Code added to deal with --enable-local used the non-existent CT_Error instead of CT_Abort. Use the correct function so the build aborts with a useful error message. Fixes #2141 Signed-off-by: Chris Packham <judge.packham@gmail.com>
* gdb: Use correct libexpat for native buildChris Packham2024-03-131-10/+1
| | | | | | | | | | The native gdb needs the version of libexpat built for the target. On some systems gdb's configure will find the one from the build machine. Use --with-expat= to point at the correct one for the target. Fixes: 2092 Signed-off-by: Chris Packham <judge.packham@gmail.com>
* gnuprumcu: Pass host sysroot to build toolchainDimitar Dimitrov2024-03-111-1/+18
| | | | | | | | | | | | | | | | | | | | | | In canadian builds, the target toolchain running on the build machine is not compiling and installing target Newlib. Thus it cannot by itself link target executables. This results in errors for gnuprumcu package when its configure script attempts to test the compiler: .../ld: cannot find crt0.o: No such file or directory configure:3738: error: C compiler cannot create executables Fix by passing the host toolchains's sysroot in target CFLAGS. While at it, also add a missing passing of target LDFLAGS. Successfully tested the following canadian builds: x86_64-unknown-linux-gnu,pru x86_64-w64-mingw32,pru arm-unknown-linux-gnueabihf,pru Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
* glibc: fix the broken build for glibc 2.19 with gcc 13.Hao Li2024-03-011-2/+2
| | | | | | macos silicon SDK does not contain stat64 (and other LFS extension), and glibc 2.19 makes use of it. Signed-off-by: Hao Li <hayatelee@gmail.com>
* gdb: Fix extra config variable name for cross GDBChris Packham2024-03-011-2/+2
| | | | | | | | | Similar to commit 65e5960a ("gdb: Fix extra config variable name for native GDB") we need to use cross_extra_config for the options we're passing to the gdb build when cross compiling. Fixes: 5463ab4b ("gdb: Add gdb-10.2") Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Revert "binutils: Disable glob for better portability"Chris Packham2024-03-011-4/+0
| | | | | | | | | | | | | | This reverts commit 57f59092852dff18fbda68fdbf23f850ad182c40. This was originally added so that a toolchain could be built on a newer system but run on an older one. With the benefit of hindsight that is probably the wrong approach. The best way of achieving that goal would be to use docker/podman container to provide an environment that is the same as the oldest supported system and build inside that. The resulting toolchain should be compatible with the old system and the new one. Closes #2094 Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Ignore a bad id command to allow dockerQuentin Boswank2024-02-181-1/+1
| | | | Signed-off-by: Quentin Boswank <qubos@outlook.de>
* Update config.{guess,sub}Bryan Hundven2024-02-022-113/+205
| | | | | | from: git://git.savannah.gnu.org/config.git Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* gdb: Explicitly point to target's libgmp for native buildAlexey Brodkin2024-01-301-0/+8
| | | | | | | | | | | | | | | Starting from GDB 11.x, gmp is needed as a dependency to build full gdb. And by default build system of native GDB will try to link with libgmp of the build host. And to make sure that doesn't happen we need to specify location of the target's sysroot so that library search starts from there. Which we do in that change. Fixes [1] & [1]. [1] https://github.com/crosstool-ng/crosstool-ng/issues/2084 [2] https://github.com/crosstool-ng/crosstool-ng/issues/1656 Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* Fix zlib build on win32 near enviromentsQuentin Boswank2023-12-181-2/+0
| | | | | | | We set some variables for linking zlib to '' which we shouldn't do. Let the Makefile sort these things out. Signed-off-by: Quentin Boswank <qubos@outlook.de>
* scripts/build/binutils: Update path for libbfdChris Packham2023-12-081-1/+1
| | | | | | | | | As of binutils 2.41 libbfd.a is not placed directly in the output directory. Fortunately the libtool .libs location seems to have been in place for some time so we can update the path without worrying about backwards compatibility. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Adjust GUESS tuple for PA-RISC linux.John David Anglin2023-11-251-7/+9
| | | | | | | | | | | | 64-bit kernels can support running both 32 and 64-bit user code. Select hppa-unknown-linux-$LIBC or hppa64-unknown-linux-$LIBC depending on whether compiler defines LP64 or not. Always select hppa-unknown-linux-$LIBC with 32-bit kernel. This will generate 32-bit PA 1.1 code. If PA 2.0 code is desired, user can use a compiler option to select it. Signed-off-by: John David Anglin <dave.anglin@bell.net>
* Map parisc64 to hppa64 in config.sub.John David Anglin2023-11-251-0/+8
| | | | | | | Debian and Gentoo use hppa/hppa64 for the PA-RISC ports. These are the proper CPU designations for configuring most packages. Signed-off-by: John David Anglin <dave.anglin@bell.net>
* Add support for 32 and 64-bit PA-RISC linux build targets.John David Anglin2023-11-251-0/+14
| | | | | | | Note: The 64-bit target lacks a glibc port and doesn't build. Also, there is no uclibc support. Signed-off-by: John David Anglin <dave.anglin@bell.net>
* gdb: Use correct arguments for static linkingChris Packham2023-11-021-1/+5
| | | | | | | | | | | | As of version 13.x GDB uses libtool for linking instead of g++ these take different arguments for static linking. Commit 6146b5a6 ("use -all-static when building a static gdb") attempted to deal with this but had the effect of causing older GDB versions to fail to build statically. Add a new internal flag GDB_CC_LD_LIBTOOL and use this to decide whether to pass `-static` or `-all-static`. Fixes #2053 Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Add gnatls & gnatlinkc-grant2023-11-021-1/+2
| | | | | | | | add gnatls and gnatlink to list of tools since it is needed to support Ada just like gnatmake and gnatbind Update crosstool-NG.sh & TODO Signed-off-by: c-grant <60671494+c-grant@users.noreply.github.com>
* Add more caching to the CIQuentin Boswank2023-10-041-0/+1
| | | | | | | | | | | more specificaly to the tarballs download. The function CT_Fetch now touches the already existing files to be comparable to the not used ones that can araise when a package is updated. This comparsion is needed because if it would not exist the tarball would grow in size due to not used but still cached packages. This would take time but is definitly something to worry about. Signed-off-by: Quentin Boswank <qubos@outlook.de>
* use -all-static when building a static gdbChris Copeland2023-09-241-2/+8
| | | | | | | | | | | gdb is linked with libtool, which has a different meaning for -static, and -all-static must be used to get a static executable. The binutils build script already uses this option for static builds. Also remove unnecessary -static from cflags for the gdb build. Signed-off-by: Chris Copeland <chris@chrisnc.net>
* Add a musl variable LIBC_MUSC_EXTRA_CFLAGSNorbert Lange2023-09-241-2/+5
| | | | Signed-off-by: Norbert Lange <nolange79@gmail.com>
* fix toolchain build with linker pluginsNorbert Lange2023-09-241-1/+11
| | | | | | | | | older binutils dont automatically pick up plugins, but need to manually use wrappers like gcc-ar. This fix allows to compile the host toolchain with -ftlo on debian stretch. Signed-off-by: Norbert Lange <nolange79@gmail.com>
* glibc: Add option for building libcryptChris Packham2023-08-251-0/+4
| | | | | | | As of glibc-2.38 libcrypt is not built by default. Add an option to allow building libcrypt support into glibc. Signed-off-by: Chris Packham <judge.packham@gmail.com>
* gdb: fix build with recent ncursesKirill K. Smirnov2023-08-151-1/+8
| | | | | | For mingw host a special macro NCURSES_STATIC must be defined. Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
* Add option to re-enable ˋlibstdc++ˋ on avr targets.Quentin Boswank2023-08-142-18/+52
| | | | | | | | | | | Due to the small flash space on AVR devices the library containing the standard types in C++ (ˋlibstdc++ˋ) does not get built normally when enabling the C++ language support. This option is an easy way to go back to the PC-way where ˋlibstdc++ˋ is built. Signed-off-by: Quentin Boswank <qubos@outlook.de>
* Properly build multilib bare-metal RISC-VKirill K. Smirnov2023-07-141-0/+6
| | | | | | | | | To build multilib RISC-V toolchain one should use --with-multilib-generator option instead of --with-multilib-list. Add corresponding example configuration file. Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
* Add default msvcrt options for mingw-w64Timo Rothenpieler2023-06-041-1/+19
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* gdb: Static cross GDB is linked statically with std c++ libraryMaksim Morozov2023-05-311-1/+2
| | | | | | | | | | If static cross GDB configuration is selected, cross GDB will be linked statically with std c++ library, because there is no separate option for static std c++ library for cross GDB. The use of not existing variable CT_GDB_NATIVE_STATIC_LIBSTDC has been replaced with CT_GDB_NATIVE_STATIC_LIBSTDCXX. Signed-off-by: Maksim Morozov <maxim.morozov.a@gmail.com>
* gdb: Use a relative includedir for native gdb and gdbserverYuriy Kolerov2023-05-281-2/+13
| | | | | | | | | | Use a relative path for include directory if gdb or gdbserver is being built and installed for a target. Otherwise headers are installed in ${destdir}${CT_HEADERS_DIR} - a concatenation of ${destdir} and an absolute path to sysroot's include directory. As a result debug-root may contain wrong paths for includes. Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
* mpfr: Add support of building MPFR for targetYuriy Kolerov2023-05-191-3/+53
| | | | | | | | 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>
* gdb: Fix extra config variable name for native GDBYuriy Kolerov2023-05-191-2/+2
| | | | | | | Variable native_extra_config must be used for configuration options instead for extra_config for native GDB. Signed-off-by: Yuriy Kolerov <ykolerov@synopsys.com>
* newlib: Add missing linker options for nano.specsYuriy Kolerov2023-05-101-1/+1
| | | | | | | | 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>
* picolibc: Allow default memory layout values to be configuredKeith Packard2023-04-191-0/+4
| | | | | | | | 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>
* picolibc: Don't disable libstdc++ wchar_t for 1.8.1 or newerKeith Packard2023-04-192-2/+6
| | | | | | | Picolibc 1.8.1 has wchar_t stdio support, so libstdc++ can include it. Signed-off-by: Keith Packard <keithp@keithp.com>
* Add option for experimental bundled patchesBryan Hundven2023-03-161-24/+30
| | | | | | | | | | | | | | | | | | This adds 3 new options to patch order: * bundled + bundled_exp * bundled + bundled_exp + local * local + bundled + bundled_exp The path for bundled experimental patches is: ${CT_LIB_DIR}/packages/${pkg_dir}/experimental and patches that are still being reviewed, but not yet applied upstream may be toggled with ENABLE_EXPERIMENTAL_BUNDLED_PATCHES. Also fix modelines for editors on bootstrap and scripts/functions, and fix mix whitespace in scripts/functions. Closes: #1916 Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* binutils: Add binutils 2.40Chris Packham2023-03-081-0/+6
| | | | | | https://sourceware.org/pipermail/binutils/2023-January/125671.html Signed-off-by: Chris Packham <judge.packham@gmail.com>
* picolibc: Add configuration to select picolibc as the system libcJoakim Nohlgård2023-03-082-69/+112
| | | | | | | 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>
* gcc: Add --disable-wchar_t and --enable-stdio=pure for picolibcKeith Packard2023-03-081-0/+12
| | | | | | | | | Picolibc needs two additional gcc build options so that libstdc++ works correctly. When building picolibc as a companion library, those are added in do_cc_libstdcxx_picolibc, but when built with picolibc as the main C libary, those need to be added in the main GCC build. Signed-off-by: Keith Packard <keithp@keithp.com>
* picolibc: Use ${CT_CC} for compilerJoakim Nohlgård2023-03-081-1/+1
| | | | Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
* gdb: Add gdb 13.1Chris Packham2023-02-251-0/+6
| | | | | | | https://sourceware.org/pipermail/gdb-announce/2023/000134.html https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob_plain;f=gdb/NEWS;hb=gdb-13.1-release Signed-off-by: Chris Packham <judge.packham@gmail.com>
* Add zstd to the companion libsQuentin Boswank2023-02-082-1/+103
| | | | | | | | 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>
* Merge pull request #1763 from cpackham/tarballBryan Hundven2023-01-161-0/+15
|\ | | | | Add option to build toolchain tarball
| * Add option to build toolchain tarballChris Packham2022-06-151-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add TARBALL_RESULT option that will produce a tarball of the final toolchain to make it easier to deploy the toolchain to other machines. The implementation uses `find | sort` instead of `tar --sort` because this was introduced in GNU Tar v1.28, which is not available in some LTS Linux distributions. This is a variation of the command recommended here: https://wiki.debian.org/ReproducibleBuilds/FileOrderInTarballs Closes #1262 Signed-off-by: Chris Packham <judge.packham@gmail.com>
* | Enable support for building libgccjitMarc Poulhiès2022-12-187-5/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.html https://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>
* | Add BPF architecture target supportCupertino Miranda2022-12-141-0/+7
| | | | | | | | | | | | | | | | | | BPF is a virtual machine and associated ISA that resides in the Linux kernel. Initially intended for user-level packet capture and filtering, BPF is nowadays generalized to serve as a general-purpose infrastructure also for non-networking purposes. Signed-off-by: Cupertino Miranda <cupertino.miranda@oracle.com>
* | scripts/gcc: Add extra include dir with -idirafterJoakim Nohlgård2022-12-111-1/+14
| | | | | | | | | | | | | | | | Fixes Canadian cross builds failing with missing include file 'stdio.h' when building libstdc++ for a companion libc with system libc set to LIBC_NONE. Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
* | scripts/gcc: align test conditionals with rest of repoJoakim Nohlgård2022-12-111-5/+4
| | | | | | | | | | | | | | | | | | Most scripts in crosstool-ng use [ -z "${string}" ] to check for empty variables. Deleted one duplicate declaration of the local exec_prefix Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
* | Detect if a package src_dir is missingJoakim Nohlgård2022-12-041-1/+2
| | | | | | | | | | | | | | | | If a user deletes the package directory under .build/src/ but fails to remove the hidden stamp files the CT_DoExtractPatch function will detect this, delete the stamps and perform the full extract-and-patch step. Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
* | Update config.{guess,sub}Bryan Hundven2022-10-272-8/+31
| | | | | | | | Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
* | linux: Add 6.0.2 bump LTSChris Packham2022-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Add 6.0.2 Bump 5.19.2 -> 5.19.16 Bump 5.15.58 -> 5.15.74 Bump 5.10.134 -> 5.10.148 Bump 5.4.208 -> 5.4.218 Bump 4.9.325 -> 4.9.330 Bump 4.19.254 -> 4.19.261 Bump 4.14.290 -> 4.14.295 Signed-off-by: Chris Packham <judge.packham@gmail.com>