summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2021-04-19Merge branch 'abrodkin-newlib-nano-relocatable' of ↵Chris Packham1-3/+3
git://github.com/foss-for-synopsys-dwc-arc-processors/crosstool-ng
2021-04-19Merge branch 'newlib-nano-target' of git://github.com/galak/crosstool-ngChris Packham1-1/+26
2021-04-16newlib-nano: Use run-time calculated paths in top-level nano.specsAlexey Brodkin1-3/+3
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-15newlib-nano: Add option to copy libs into targetKumar Gala1-0/+25
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-15newlib-nano: remove whitespace from nano.spec fileKumar Gala1-1/+1
Remove trailing whitespace from generated nano.spec file. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-15gdb: Don't mess with gdbserver config permissionsAlexey Brodkin1-5/+0
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-03-29build: debug: strace: Add -D__USE_MISC to target CFLAGSChris Packham1-1/+1
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-17Extend CC_GCC_LIBSSP with manual stateIvan Kukhta1-10/+10
Signed-off-by: Ivan Kukhta <Ivan.Kukhta@acronis.com>
2021-02-19newlib-nano: Create symlinks for nano-suffixed libsAlexey Brodkin1-0/+32
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-01-24Merge pull request #1448 from dinuxbg/masterChris Packham2-0/+94
Add PRU target configuration
2021-01-19Add package with PRU linker scripts and headersDimitar Dimitrov1-0/+89
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-19Add PRU cross tool targetDimitar Dimitrov1-0/+5
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-14newlib-nano: Build libstdc++ against newlib-nano if requestedKeith Packard1-0/+45
This uses the gcc support for building libstdc++ using alternate lib header files. Signed-off-by: Keith Packard <keithp@keithp.com>
2021-01-14Create nano.spec file that sits atop the existing nano buildKeith Packard1-0/+16
Signed-off-by: Keith Packard <keithp@keithp.com>
2021-01-14Add newlib-nano as companion libKeith Packard1-0/+128
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-13Merge branches 'elijahr-dtc-1.6.0', 'elijahr-readme-typo', ↵Chris Packham3-18/+156
'foss-for-synopsys-dwc-arc-processors-abrodkin-libgmp-for-mac' and 'keith-packard-picolibc-companion'
2021-01-12picolibc: Build libstdc++ against picolibc if requestedKeith Packard1-0/+46
This uses the gcc support for building libstdc++ using alternate lib header files. Signed-off-by: Keith Packard <keithp@keithp.com>
2021-01-12gcc: Add support for building libstdc++ with alternate libcKeith Packard1-7/+77
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-09picolibc: Convert to companion libraryKeith Packard1-12/+25
This allows configurations to include picolibc without excluding another C library. Signed-off-by: Keith Packard <keithp@keithp.com>
2020-12-23libgmp: Fix cross-canadian build for macOSAlexey Brodkin1-0/+9
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-23gcc: Make it aware of Newlib nano IO featureAlexey Brodkin1-0/+5
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-04Run through 'ct-ng updatetools'Kumar Gala2-446/+717
Update config.{sub,guess} to get proper awareness for ARM based MacOS. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-11-10Merge pull request #1342 from DspHack/feature/add_support_for_ti_c6xChris Packham2-1/+80
Experimental: Add support for the Texas Instruments C6X (TMS320C6000 …
2020-11-02c6x: Remove multilib requirementDan Tejada1-2/+0
Restore tuple config check Add sample configuration Signed-off-by: Dan Tejada <dan.tejada@cantada.com>
2020-11-01arm: Disable context functions for ThumbChris Packham1-0/+1
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-01Merge branch 'xlocale' of git://github.com/lancethepants/crosstool-ng into ↵Chris Packham1-1/+0
lancethepants-xlocale
2020-10-15Don't remove XLOCALE support unconditionally.lancethepants1-1/+0
Signed-off-by: Lance Fredrickson <lancethepants@gmail.com>
2020-10-14binutils: Disable glob for better portabilityAlexey Brodkin1-0/+4
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-07Merge pull request #1400 from fvalette/fix-m4-build-for-mingw32-hostChris Packham1-0/+8
m4: fix build for mingw32 host
2020-10-06m4: fix build for mingw32 hostFlorent Valette1-0/+8
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-05glibc: set glibc build system default_cflags emptyHans-Christian Noren Egtvedt1-0/+2
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-09-20Merge branch 'picolibc-multiarch' of ↵Chris Packham3-8/+8
git://github.com/keith-packard/crosstool-ng into master
2020-09-16picolibc: Use target architecture to drive picolibc configurationKeith Packard1-5/+5
This selects code matching the target architecture within picolibc. Signed-off-by: Keith Packard <keithp@keithp.com>
2020-09-16Map picolibc to suitable CT_TARGET_SYS valuesKeith Packard2-3/+3
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-10Patches: search package patches in the top package directoryMikhail Falaleev1-3/+5
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-06Merge branch 'BR1_zlinux_cross_comp' of ↵Chris Packham2-9/+2
git://github.com/pradghos/crosstool-ng into pradghos-BR1_zlinux_cross_comp
2020-09-01Add picolibc support [v2]Keith Packard1-0/+111
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-08-30Merge pull request #1366 from antmak/bugfix/zlib_macos_patchChris Packham1-1/+1
zlib-1.2.11: Add a patch to cross-compile for macos
2020-08-27Adding new samples s390x/s390-unknown-linux-gnuPradipta Ghosh2-9/+2
- s390x/s390 is allowed to pair with other vendor name. - new samples are being added to use this flexibility. - Fix space issue
2020-08-03crosstool-NG: Fix libtool for mangled tuples as all other cross-toolsAnton Maklakov1-1/+1
2020-05-26Enable static libgcc when CT_GDB_NATIVE_STATIC_LIBSTDCXX is setStephanos Ioannidis1-0/+1
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-26Fix CT_GDB_NATIVE_STATIC_LIBSTDCXX referenceStephanos Ioannidis1-2/+2
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-21Experimental: Add support for the Texas Instruments C6X (TMS320C6000 series) ↵Dan Tejada2-1/+82
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-03-04Add --with-cpu= on 32-bit SPARCAlexey Neyman1-15/+26
... if building for GLIBC 2.31+. Signed-off-by: Alexey Neyman <stilor@att.net>
2020-02-26Set --with-cpu-{32,64} for multilib buildsAlexey Neyman3-13/+39
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-16Merge pull request #1270 from nolange/prevent_glibc_cflags_overrideAlexey Neyman1-1/+4
prevent the glibc build from overwriting flags
2020-02-16Merge pull request #1266 from nolange/move_builddir_kconfigAlexey Neyman1-1/+0
move BUILD_DIR variable into Kconfig
2020-02-09Merge pull request #1303 from stilor/wipAlexey Neyman1-0/+6
Update docker to ubuntu 19.10
2020-02-04Suppress YAML support in DTCAlexey Neyman1-0/+6
... which fails to build if pkg-config is not installed. Signed-off-by: Alexey Neyman <stilor@att.net>
2020-01-22Merge pull request #1257 from nolange/fix_binutils_typoAlexey Neyman1-1/+1
fixup typo in bitutils.sh