aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/gcc
Commit message (Collapse)AuthorAgeFilesLines
* toolchain: gcc: backport inline subword atomic support for riscvTianling Shen2023-06-169-3/+6174
| | | | | | | | | | | RISC-V has no support for subword atomic operations; code currently generates libatomic library calls. This patch changes the default behavior to fast inline subword atomic calls that do not require libatomic. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> (cherry picked from commit 7b4a966de88aa0e1f9b7faa62a4d6cb7b01e9f8f)
* toolchain: gcc: update to 12.3.0Nick Hainke2023-05-126-7/+7
| | | | | | | | | | | | | Release notes: https://gcc.gnu.org/gcc-12/changes.html Refresh patches: - 230-musl_libssp.patch - 910-mbsd_multi.patch - 920-specs_nonfatal_getenv.patch - 970-macos_arm64-building-fix.patch Signed-off-by: Nick Hainke <vincent@systemli.org>
* toolchain: gcc: backport patch for gcc 13 fixing access path analysisNick Hainke2023-05-051-0/+69
| | | | | | | | | | | | While improving access path analysis a typo happened. Now it can happen that gcc misscompiles. The patch is fixing the issue. However, also other gcc versions 10.2+ are affected. They also should be bumped or the fix should be backported. For more bug information have a look at: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109585 Signed-off-by: Nick Hainke <vincent@systemli.org>
* toolchain: gcc: add support for GCC 13Nick Hainke2023-05-0513-28/+40
| | | | | | | | | | | | | | | | | | | | | Release Notes: https://gcc.gnu.org/pipermail/gcc-announce/2023/000175.html Manually Refreshed: - 910-mbsd_multi.patch - 970-macos_arm64-building-fix.patch Automatically Refreshed: - 010-documentation.patch - 230-musl_libssp.patch - 300-mips_Os_cpu_rtx_cost_model.patch - 820-libgcc_pic.patch - 840-armv4_pass_fix-v4bx_to_ld.patch - 850-use_shared_libgcc.patch - 870-ppc_no_crtsavres.patch - 920-specs_nonfatal_getenv.patch Signed-off-by: Nick Hainke <vincent@systemli.org>
* toolchain: gcc: copy patches from 12.x to 13.xNick Hainke2023-05-0517-0/+605
| | | | | | This simplifies the gcc bump patch review. Signed-off-by: Nick Hainke <vincent@systemli.org>
* toolchain/gcc: enable zstd supportAndre Heider2023-03-171-1/+4
| | | | | | | | | | | | | LTO object files will now be compressed using zstd. Compressing debug sections with zstd will have to wait for GCC 13, which adds support for -gz=zstd. NOTE: wiping the ccache is strongly recommended, not doing so might yield build error later on: "lto1: internal compiler error: original not compressed with zstd" Signed-off-by: Andre Heider <a.heider@gmail.com>
* toolchain: remove installing twice in the "initial" subdirAndre Heider2023-02-191-3/+1
| | | | | | | | | | | | | | | | This was apparently introduced to recreate the toolchain (wipe staging_dir/toolchain*, but keep build_dir/toolchain*, followed by a `make toolchain/compile`). But it leaves leftovers and causes re-links to happen at src_install phase, because of the changed paths, possibly adding yet another source of issues. With the prior commits removing various hacks related to the "initial" folder we can remove installing it twice altogether. The recreated toolchain is exactly the same as before. Signed-off-by: Andre Heider <a.heider@gmail.com>
* toolchain/musl: remove libgcc_initial hackAndre Heider2023-02-191-4/+0
| | | | | | | | | | | | This reverts r15599 [0]. This was added to fix an uclibc rebuild issue, but since uclibc isn't supported anymore [Fixes:] this can be removed. [0] https://git.openwrt.org/?p=openwrt/svn-archive/archive.git;a=commitdiff;h=016a052efeee6bc2da3f501a8c66b5aea20350b4 Fixes: 63fb1752 "toolchain: remove uClibc-ng" Signed-off-by: Andre Heider <a.heider@gmail.com>
* toolchain/gcc: remove glibc libgcc_eh hackAndre Heider2023-02-191-2/+0
| | | | | | | | | A modern glibc only links against libgcc_eh for its tests or when building it static, which doesn't happen here. Reverts a hunk of: a3edea1b "add support for alternative C libraries..." Signed-off-by: Andre Heider <a.heider@gmail.com>
* toolchain/gcc: clean up CFLAGSAndre Heider2023-02-091-9/+13
| | | | | | | | | | | Instead of having two different ways to pass flags to the gcc build process, add them as configure args, which is a reliable way to let gcc pass them around to its various pieces. Also add CXXFLAGS, since gcc started to use c++ for itself recently (~10 years ago now). Signed-off-by: Andre Heider <a.heider@gmail.com>
* toolchain/gcc: use explicit configure argsAndre Heider2023-02-092-0/+3
| | | | | | | Spell out what we want to enable or disable. This prevents host libs to leak in, so everyone get the same feature set. Signed-off-by: Andre Heider <a.heider@gmail.com>
* treewide: strip useless `default n` Kconfig linesTony Butler2023-02-031-5/+0
| | | | | | | | | | Kconfig docs say: > The default value deliberately defaults to 'n' in order to avoid > bloating the build. Apply this rule everywhere, to avoid more cloning of bad examples Signed-off-by: Tony Butler <spudz76@gmail.com>
* toolchain/gcc: use STAGING_DIR_HOST instead of hardcoding defaultChristian Marangi2023-01-092-5/+5
| | | | | | | Use STAGING_DIR_HOST to reference staging host directory instead of hardcoding it to default path. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* toolchain/gcc: fix broken gcc version selectionChristian Marangi2023-01-091-1/+1
| | | | | | | | | | | | | | | Config evaluation require default with if to be put before the generic default config with no condition. Putting the default config before any conditional default results in always selecting the non conditional one. This results in the version be hardcoded to gcc 12 even if gcc 11 is selected in the Advanced build options. Fix this by putting the gcc 12 default option as last after ANY conditional default config. Fixes: d9de5252a44e ("toolchain/gcc: switch to version 12 by default") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* toolchain/gcc: switch to version 12 by defaultHauke Mehrtens2023-01-092-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was build tested with all core packages on all targets successfully. Most packages from the feed are also building fine. This was run tested on the following systems: * lantiq/xrx200 musl * pistachio/generic musl * sunxi/cortexa53 musl * x86/64 musl * x86/64 glibc * armvirt/64 musl The size of the images stays more or less the same for MIPS BE and aarch64. I haven't tested other architectures. With GCC 11 I got these sizes for lantiq/xrx200: 7,219,848 openwrt-lantiq-xrx200-tplink_tdw8970-initramfs-kernel.bin 7,472,208 openwrt-lantiq-xrx200-tplink_tdw8970-squashfs-sysupgrade.bin With GCC 12 I got these sizes for lantiq/xrx200: 7,217,355 openwrt-lantiq-xrx200-tplink_tdw8970-initramfs-kernel.bin 7,406,674 openwrt-lantiq-xrx200-tplink_tdw8970-squashfs-sysupgrade.bin The sysupgrade image is probably padded. The initramfs image is 0.03% smaller. With GCC 11 I got these sizes for armvirt/64: 4,143,943 openwrt-armvirt-64-default-rootfs.tar.gz 10,887,176 openwrt-armvirt-64-Image 24,911,880 openwrt-armvirt-64-Image-initramfs 4,141,572 openwrt-armvirt-64-rootfs.cpio.gz 4,255,854 openwrt-armvirt-64-rootfs-ext4.img.gz 3,391,178 openwrt-armvirt-64-rootfs-squashfs.img.gz With GCC 12 I got these sizes for armvirt/64: 4,142,778 openwrt-armvirt-64-default-rootfs.tar.gz 10,887,176 openwrt-armvirt-64-Image 24,911,880 openwrt-armvirt-64-Image-initramfs 4,138,105 openwrt-armvirt-64-rootfs.cpio.gz 4,255,463 openwrt-armvirt-64-rootfs-ext4.img.gz 3,390,390 openwrt-armvirt-64-rootfs-squashfs.img.gz Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* toolchain/gcc: Fix GCC version checkHauke Mehrtens2023-01-091-1/+1
| | | | | | | | | | The version check which sets GCC_VERSION_FILE to the correct value only worked when the advanced options menu was active and not when it was not active. Thank you Tony Butler for the fix. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* toolchain: gcc: backport patches to fix build with glibc 2.36Hauke Mehrtens2022-12-211-0/+39
| | | | | | | | | | | glibc 2.36 changed the definition of enum fsconfig_command, it now collides with the same definition from sys/mount.h. Remove the include of linux/fs.h This still compiled with musl too. This backports a patch which is already in the stable branch of GCC 11 and GCC 12. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* toolchain: gcc: Remove gcc 10.x supportHauke Mehrtens2022-10-2321-851/+0
| | | | | | This compiler is old and was never used by default in OpenWrt. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* toolchain: gcc: Remove gcc 8.x supportHauke Mehrtens2022-10-2322-862/+0
| | | | | | This compiler is old and not used by OpenWrt for some time now. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* Revert "toolchain/gcc: use zstd from tools"Christian Marangi2022-09-271-1/+0
| | | | | | | This reverts commit e6cc3ded0709aa6c7a190c31575bb5c19e204cd2. Require more testing as it does cause compilation error. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* toolchain/gcc: use zstd from toolsRosen Penev2022-09-271-0/+1
| | | | | | pkgconfig is not used for some reason. Match other used tools. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* toolchain: gcc: improve patch handling by introducing major versionNick Hainke2022-09-1174-1/+2
| | | | | | | | | | | Every minor version bump of a major version will result in a huge patch diff because of the moving of all the patches from version e.g. 11.2.0 to 11.3.0. This commit only use the major version for the patch folders to differentiate between the different gcc versions. This will significantly improve the reviewing of the smaller version bump patches and help to see what really changed in a minor version bump. Signed-off-by: Nick Hainke <vincent@systemli.org>
* toolchain: bump GCC 12 to 12.2.0Nick Hainke2022-08-2819-9/+9
| | | | | | | | Refreshed patches: - 910-mbsd_multi.patch - 970-macos_arm64-building-fix.patch Signed-off-by: Nick Hainke <vincent@systemli.org>
* toolchaini/gcc: fix libstdc++ dual abi modelIvan Maslov2022-07-071-1/+1
| | | | | | | | | | libstdcxx-dual-abi needs to be enabled to actually support C++11 ABI. Enable the config flag to also permit support of .NET 6 development on OpenWrt. Signed-off-by: Ivan Maslov <avenger_msoft@mail.ru> [ reword commit description and title ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* toolchain: add support for GCC 12Rui Salvaterra2022-06-0120-2/+625
| | | | | | | | | | | | | | | | GCC 12.1 is out. Add support for it. Deleted (upstreamed): 011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch 931-libffi-fix-MIPS-softfloat-build-issue.patch Deleted (unneeded?) 970-macos_arm64-building-fix.patch Other patches manually rebased due to C++ conversion and consequent file name changing (.c to .cc). Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* toolchain: bump GCC 11 to 11.3.0Rui Salvaterra2022-06-0122-123/+9
| | | | | | Remove an upstreamed patch and rebase all remaining patches. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* toolchain/gcc: use ELFv2 ABI on ppc64 with muslStijn Tintel2021-12-211-0/+1
| | | | | | | | | | | | | | At configuration time, gcc assumes that ppc64be targets use the ELFv1 ABI, and ppc64le targets use the ELFv2 ABI. However, musl libc does not support the ELFv1 ABI on ppc64 at all, regardless of the endianness. Therefore, when building for a ppc64 arch and with musl libc, instruct gcc to use the ELFv2 ABI. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93157 for more info. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Reviewed-by: Rui Salvaterra <rsalvaterra@gmail.com>
* toolchain/gcc: refresh gcc-11.2.0 patchIlya Lipnitskiy2021-12-171-7/+3
| | | | | | | | | Run make toolchain/gcc/minimal/refresh (with glibc, with musl toolchain/gcc/{initial,final}/refresh don't work) Fixes: ab241e0937c9 ("toolchain/gcc: fix build on MacOS arm64") Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
* toolchain/gcc: replace revert with upstream fixIlya Lipnitskiy2021-12-172-160/+114
| | | | | | | This will make upgrade to v11.3.0 easier and follows upstream more closely. Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
* toolchain/gcc: remove upstreamed patch, add backportIlya Lipnitskiy2021-12-172-111/+46
| | | | | | | | | | | | | | | | | | | | This patch has been upstream since GCC 10. Dragan Mladjenovic (2): Emit .note.GNU-stack for soft-float linux targets. Emit .note.GNU-stack for hard-float linux targets. Link: https://gcc.gnu.org/g:a3c1e1f2ff88 Link: https://gcc.gnu.org/g:54b3d52c3cca Add backport patch to define TARGET_LIBC_GNUSTACK on musl to add .note.GNU-stack on hard-float MIPS targets. Link: https://gcc.gnu.org/g:25abbb924968 The net effect should be the exact same functionality while following upstream code instead of a custom outdated patch. Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
* toolchain/gcc: fix build on MacOS arm64Sergey V. Lobanov2021-12-021-0/+49
| | | | | | | | | | | | | | | | Added patch for GCC to fix compilation issues on MacOS arm64 The original commit message from Przemysław Buczkowski: GCC: Patch for Apple Silicon compatibility This patch fixes a linker error occuring when compiling the cross-compiler on macOS and ARM64 architecture. Adapted from: https://github.com/richfelker/musl-cross-make/issues/116#issuecomment-823612404 Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
* toolchain/gcc: revert a faulty upstream commit that caused miscompiled codeFelix Fietkau2021-11-161-0/+160
| | | | | | This broke at least the OKLI loader, but possibly other things as well Signed-off-by: Felix Fietkau <nbd@nbd.name>
* toolchain/gcc: switch to version 11 by defaultPaul Spooren2021-09-212-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | gcc10 seem to increase build size and gcc11 seem to fix that. Compile tests: * all Runtime tests: * ath79 * mpx85xx/p2020 * mvebu * x86/64 Special thanks to Rosen for fixing layerscape & bcm63xx Signed-off-by: Paul Spooren <mail@aparcar.org> Reviewed-by: Rui Salvaterra <rsalvaterra@gmail.com Acked-by: Rosen Penev <rosenp@gmail.com> Acked-by: Rui Salvaterra <rsalvaterra@gmail.com Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Stijn Tintel <stijn@linux-ipv6.be> Acked-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl> Tested-by: Pawel Dembicki <paweldembicki@gmail.com> Tested-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
* toolchain/gcc: cleanup gcc9 config optionPaul Spooren2021-09-211-3/+0
| | | | | | | This line should have been removed in 244847da "build: remove GCC9 support" but stayed in tree after an incomplete rebase. Fix it. Signed-off-by: Paul Spooren <mail@aparcar.org>
* build: remove GCC7 supportPaul Spooren2021-09-1925-1247/+0
| | | | | | | | | | | The development branch is now on version 10, we shouldn't drag to many old versions and therefore drop at least 7.x. Signed-off-by: Paul Spooren <mail@aparcar.org> Acked-by: Rosen Penev <rosenp@gmail.com> Acked-by: Rui Salvaterra <rsalvaterra@gmail.com> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
* build: remove GCC9 supportPaul Spooren2021-09-1920-848/+0
| | | | | | | | | | | | gcc9 was never used within a release and the development branch is already on version 10, no need to keep this in tree. Signed-off-by: Paul Spooren <mail@aparcar.org> Acked-by: Rosen Penev <rosenp@gmail.com> Acked-by: Rui Salvaterra <rsalvaterra@gmail.com> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Stijn Tintel <stijn@linux-ipv6.be> Acked-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
* toolchain/gcc: switch to version 10 by defaultStijn Tintel2021-08-182-7/+7
| | | | | | | | | | | | | | | Runtime-tested on: * ath79 * bcm27xx/bcm2708 * bcm27xx/bcm2709 * bcm27xx/bcm2711 * mvebu/cortexa53 * octeon * realtek * x86/64 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
* toolchain/gcc: bump gcc 11 to 11.2Rui Salvaterra2021-08-0820-5/+5
| | | | | | Patches automatically refreshed. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* toolchain: add gcc 11 versionAnsuel Smith2021-07-1721-0/+851
| | | | | | | | | | | Add gcc 11 version. Same patches of gcc 10. Build tested on: ipq806x ipq807x Run tested on: ipq806x ipq807x Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> [refresh patches] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* toolchain: gcc: Update to version 10.3.0Hauke Mehrtens2021-04-1120-6/+6
| | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* toolchain/libstdcpp: disable dual ABI and default to newRosen Penev2021-01-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | GCC 5.1 changed the std::string ABI in order to properly support C++11. For compatibility with libraries compiled with the older ABI, that is, linking between old-abi.so and new-abi.bin, both ABIs are enabled. In terms of OpenWrt, all packages are compiled with the same toolchain, which means these issues do not need to be handled. Most importantly, this results in a significant size reduction of libstdpp: Before: 450794 bytes After: 327752 bytes Tested with all OpenWrt packages. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* toolchain: gcc: Remove support for GCC 5Hauke Mehrtens2020-12-1644-3306/+1
| | | | | | | | | | | | GCC was used in 17.01 as the default compiler the last time. We do not test this old GCC version any more and there are some known problems it fails to compile the U-Boot for the Allwinner A64 SoC. Just remove it to make it clear that we will not support this old GCC version any more. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Paul Spooren <mail@aparcar.org>
* toolchain: Update GCC 10 to version 10.2.0DENG Qingfang2020-08-3120-4/+4
| | | | Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* toolchain/gcc: Add GCC 10.1.0 patchesSyrone Wong2020-07-1113-34/+34
| | | | | | | | | | | | | | | Compared to GCC 9: 870-ppc_no_crtsavres.patch changes moved to another file following upstream 881-no_tm_section.patch keep the tm section disabled patches refreshed to apply cleanly See https://gcc.gnu.org/gcc-10/porting_to.html for more info Compiled and run tested on x86_64 Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
* toolchain/gcc: Add GCC 10.1.0 configSyrone Wong2020-07-113-0/+12
| | | | | | | | Add needed config changes and tarball hash for new GCC version. Signed-off-by: Syrone Wong <wong.syrone@gmail.com> [added missing commit description] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* toolchain/gcc: Copy patches from 9.3.0 to 10.1.0Syrone Wong2020-07-1118-0/+839
| | | | | | No content changes in this commit Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
* toolchain: remove gcc libssp and use libc variantIan Cooper2020-06-172-16/+1
| | | | | | | | | | | | | | | Removes the standalone implementation of stack smashing protection in gcc's libssp in favour of the native implementation available in glibc and uclibc. Musl libc already uses its native ssp, so this patch does not affect musl-based toolchains. Stack smashing protection configuration options are now uniform across all supported libc variants. This also makes kernel-level stack smashing protection available for x86_64 and i386 builds using non-musl libc. Signed-off-by: Ian Cooper <iancooper@hotmail.com>
* toolchain/gcc: eliminate uClibc atexit hackRosen Penev2020-04-261-9/+2
| | | | | | | | This seems to be over 10 years old. It doesn't seem to be needed anymore. Tested on malta with uClibc (selected BROKEN). Signed-off-by: Rosen Penev <rosenp@gmail.com>
* toolchain/gcc: remove uclibc hackRosen Penev2020-04-131-3/+0
| | | | | | | | | | | | This was introduced with 014d3b98b96872d020ffccf0358ba60967b3f1c0 , which is almost 10 years old. uClibc-ng does not suffer from this problem. Note that this hack prevents libstdc++ from using C++11 math functions. Tested by removing all of the mpd patches designed to fix this and compiling. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* toolchain: Update GCC 9 to version 9.3.0Hauke Mehrtens2020-03-1821-61/+6
| | | | | | The removed patch is included in GCC 9.3.0. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>