Commit Graph

1936 Commits

Author SHA1 Message Date
Stefan Reinauer b8b3f1201d gcc-6.5.0-aros.diff: Fix cross-compilation on Darwin/arm64
This fixes the following error while compiling the toolchain:

ld: warning: ignoring duplicate libraries: '../libcpp/libcpp.a', '../libdecnumber/libdecnumber.a', 'libcommon.a'
ld: Undefined symbols:
  _host_hooks, referenced from:
      c_common_no_more_pch() in c-pch.o
      gt_pch_save(__sFILE*) in libbackend.a[92](ggc-common.o)
      gt_pch_save(__sFILE*) in libbackend.a[92](ggc-common.o)
      gt_pch_restore(__sFILE*) in libbackend.a[92](ggc-common.o)
      toplev::main(int, char**) in libbackend.a[252](toplev.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
2024-05-03 09:39:34 +02:00
Kalamatee 863f6e23ee do not use bfd_boolean which is poisoned in newer binutils sources. 2024-05-02 16:09:09 +02:00
Kalamatee ff8d497f56 pass options needed to build a riscv toolchain 2024-05-02 15:51:41 +02:00
Kalamatee 282d970a88 add initial support for building a riscv targeted crosscompiler 2024-05-02 15:49:58 +02:00
Kalamatee cf4c685879 update the gcc 8 and 11 patches aswell 2024-04-24 14:21:46 +02:00
Kalamatee b82a892745 wip update to c++ support. 2024-04-24 14:21:46 +02:00
Kalamatee 0d75ce91f2 add a patch for GCC 13.1.0 2024-04-23 16:49:32 +02:00
Kalamatee 4b798fef9d add a patch for gcc 12.2.0, and update the experimental version to it. 2024-04-23 16:35:30 +02:00
deadwood 1a3030c56e When building per opener base libraries, don't add global library bases
Previously the condition was for libraries that have relative linker libs,
but linker libs are not influencing libraries themselves, so the condition
was weird and there was no explanation why such functionality was
introduced.
2024-04-22 15:31:14 +02:00
deadwood 9513d8ca08 ABI: Use a different symbol to pass library base to functions in headers
Prior to this change, __aros_getbase_XXXX was used and was re-defined in
proto/xxxx.h to either library base of relative offset. However
__aros_getbase_XXXX was an actual function often used inside of library.
The effect was that if proto/xxxx.h was included in the library xxxx
itself, the __aros_getbase_XXXX was redefined, for example in per opener
library instead of reading R12 (x86_64 ABI) it was reading (local)
library base, causing struct Library *ABase = __aros__getbase_ABase() to
become struct Library *ABase = ABase and a "silent" NO-OP

This change changes the symbol used in library call to __LIB_LIBBASE and
__aros_getbase_XXXX is no longer re-defined in proto/xxxx.h

Additionally for cases there inline/xxxx.h or defines/xxxx.h is included
instead of proto/xxxx.h, __LIB_LIBBASE is defined to __aros_getbase_XXXX
so that proper implementation from linklib is pulled in. Same goes for
stub functions in "noincludes" case.

Note: this commit does not change client-side behavior as documented in
ABI_SPECIFICATION. It only changes the name of the symbol used.
2024-04-22 15:10:29 +02:00
deadwood f88929603e Fix: initialize dwarf_reg_size_table again
This is needed for dwarf exception unwinding to work. Change was introduced
in GCC 4.8.3 patch on Feb 26, 2015. It was described as needed for
raspi/ARM. It is not known if this change is still needed.
2024-01-26 20:44:41 +01:00
deadwood 6244d275d3 Also filter out devices without functions 2023-11-17 16:08:05 +01:00
deadwood f2663f1bd1 Avoid generating empty .fd files as they have no value 2023-11-15 13:50:18 +01:00
Kalamatee 690c3d3833 update the used build system components for the gnu toolchain. GMP 6.1.2 -> 6.2.1 ISL 0.16.1 -> 0.25 MPFR 4.0.2 -> 4.2.0 MPC 1.1.0 -> 1.3.1 2023-04-02 18:22:01 +02:00
Kalamatee a7d109785c try the official isl download before the gnu mirror. 2023-04-02 18:22:01 +02:00
Kalamatee 7cd50c4a3b add a wip patch for binutils 2.40 and set the experimental version to it 2023-04-02 18:22:01 +02:00
Kalamatee ba57df8e41 WIP. # Export inlines for stackcall functions, but protect them behind __INLINE_<module>_STACKCALL__ define, since they conflict with existing definitions. TODO: # Doesn't yet handle variadic functions, or architectures that don't just store a pointer for the LVO. # Clean up existing use cases so that they do not explicitly require other components to be present, if they can operate without them. 2023-04-02 18:19:15 +02:00
Kalamatee 9a3d0551fe put the target cpu's in alphabetical order, and add the riscv emulation modes. 2023-04-02 15:11:28 +02:00
deadwood 5f6db77009 Select -fno-common by default (like GCC 10.0+)
AROS does not support COMMON objects. This change makes the compiler
generate valid executable 'out-of-the-box', without need for additional
flags.
2023-03-01 13:32:32 +01:00
deadwood 8eaae42bba Workaround needed when cross-compiling armhf 2023-01-26 18:06:01 +01:00
deadwood 18c1409ff8 Make sure aros-stdint.h is added to all targets
Patch takes from GCC 8.x patch. Without it armhf is not getting
aros-stdint.h
2023-01-26 18:05:40 +01:00
deadwood e528375f9f Revert wrong change of package_repo value to fix build. 2022-12-29 07:32:22 +01:00
deadwood 12c882d991 Place output of build in TOOLDIR
TOOLDIR is specific to build, while CROSSTOOLSDIR can point to a shared,
external crosscompiler which then gets polluted with one builds output,
preventing another build to function.
2022-12-21 20:30:05 +01:00
Kalamatee 05917b2858 only generate the STDLIBBASE clause if the base is not standard. 2022-06-23 20:36:31 +02:00
Kalamatee 090d38f944 if we are building binutils for m68k, and there is an amigaoshunk or 68080 patch, apply it also. 2022-06-23 15:32:57 +02:00
Kalamatee 75e9b65798 update binutils patch for 2.38 2022-06-23 15:32:57 +02:00
Kalamatee fc8052a738 only copy as much as is strictly necessary. fix incorrectly placed increment of failcnt. 2022-06-23 15:32:57 +02:00
Kalamatee 36364d12fb show the failing files name. 2022-06-23 15:32:57 +02:00
Kalamatee 1f2989b605 align the reads to 32bits after parsing RELRELOC32. copy the elf file if elf2hunk fails at relocating. 2022-06-23 15:32:57 +02:00
Kalamatee 0112e56c6e add zopfli to the tools 2022-06-23 15:32:57 +02:00
Kalamatee 85f400b15b include limits.h 2022-06-23 15:32:56 +02:00
Kalamatee 61f3dd165f don't forget to capture the return code of the executed command 2022-06-23 15:01:13 +02:00
Kalamatee 9c2b5d7734 use PATH_MAX so it is large enough to handle the output properly. 2022-06-23 15:01:13 +02:00
Kalamatee 7c2b3b86d7 forgotten commit 2022-06-23 15:01:13 +02:00
Kalamatee 5d65f09344 only print "[MMAKE] Making" when something is actually done. 2022-06-23 15:01:13 +02:00
Kalamatee d952329f32 use popen() and suppress all the "Nothing to be done for" messages. 2022-06-23 15:01:13 +02:00
Kalamatee 6c92741646 prevent potential buffer overflow 2022-06-23 15:01:13 +02:00
Kalamatee 8670689d2c Use snprintf to prevent potential buffer overflow 2022-06-23 15:01:13 +02:00
Kalamatee d048a22d75 autoupdate the metamake autoconf files 2022-06-23 14:10:31 +02:00
Kalamatee f183a91624 use order-only prerequisites to make generate the directories 2022-06-23 13:49:34 +02:00
Kalamatee 73c66677b5 add an experimental gcc 11.2.0 patch - doesn't yet link c++ binaries. 2022-06-23 12:54:35 +02:00
Kalamatee 193bcecea1 correction static-stdc++ -> static-libstdc++ 2022-06-23 12:54:35 +02:00
deadwood ab672b86f0 When using --only-keep-debug generate usable debug symbols
For C++ code, removing sections with GROUP type and not unmarking
code sections "as part of group" was causing errors when loading
dbg files in gdb, nm, etc. Keep the sections to GROUP types as a
workaround.
2022-05-22 13:17:18 +02:00
deadwood 961b1ca3a9 Add patchelf to tools 2022-02-21 06:58:03 +01:00
deadwood 60958b4a7e Rename -nolibc to -noclibs
nolibc already has a meaning for GCC 9+ and it acts by removing
the whole LIB_SPEC which is not what we want here.
2022-02-03 19:39:52 +01:00
deadwood fdee5fe240 Remove unneeded condition 2022-01-08 17:50:45 +01:00
deadwood a27ffff869 Clean up type and name parsing 2022-01-07 20:57:18 +01:00
deadwood 701fb46855 Use globally parsed name instead of local parsing
Fixes things like "void" argument names
2022-01-07 20:11:28 +01:00
deadwood 54e1fa4ba4 Use pre-parsed name and type 2022-01-07 19:39:30 +01:00
deadwood 2def602de2 Use a common field in functionhead to store vararg type information 2022-01-06 21:55:11 +01:00