Ok, will try to understand how to do it all correctly. But how do you split on different patches? I mean, you download adtools, create your local fork in your GitHub acc. Then doing changes, and then how you split on different patches? Doing changes for one patch, commit, made a patch, then again changes, again commit, and next patch?
It can be a bit confusing to patch patches and work with two repos at the same time (the adtools repo and the submodule in binutils/repo). But it's a pretty nice setup. Once you've done gild checkout binutils you can start working on the binutils/repo. After the checkout that repo will be in the middle of a merge session. You'll need to fix all conflicts and run git am --continue, then you'll get new conflicts, fix them, repeat until all conflicts are gone. If you look in the commit history when you're done, you'll see that all patches are there as separate commits. If you need to fix additional things after all patches are applied, just create a new commit. When the binutils repo is in good shape, run genpatch to regenerate the patches. If you did additional commits, patches for those will be created in the patches dir belonging to your new binutils version. Then you need to create a commit in the adtools repo containing all the new patches. That's the commit you make a PR out of.
Quote:
I want to remove morphos and amithlon for 2.24 for now. Are we ok with that?
Yes, I see no reason to keep them.
Quote:
Do we need to make those "warning less" patches or are we just better use CFLAGS options to disable those warnings (as 99.9% they fixed in newer Binutils). Or we better keep those warning-remove patches?
I don't think we should hide warnings with CFLAGS. They might be valuable and fixing them isn't much work.
Quote:
I also have questions about the needs of 0002-Fixed-errors-occuring-with-more-recent-versions-of-t.patch and 0003-Disabled-some-stuff-such-that-68k-vtarget-builds-aga.patch ,if they need it at all now
There are some documentation fixes if I remember correctly and I think those are nice to have. Ideally it should be possible build a reasonably polished SDK from adtools IMO. I think we can skip 68k, it will still be possible to build older versions with 68k support using adtools. If we want up to date 68k support in adtools we should look into bebbos work anyway.
These are just my opinions though. Sebastian has the final word. Creating a PR is a good way of getting feedback :)
@sTix Wrote you mail about all that git issues to clear up some things.
Anyway, I also tried to patch Binutils 2.29.1 (that one where dwarf-5 were added), and this one is a little bit more different than just 2.24: elf32-ppc.c (which is mostly a full copy for our elf32-amigaos.c with some changes) were changed more, functions names, the functions itself, etc. So that will need some additional (but still not hard one IMHO) work.
But i think we better move version by version of the course as you say, as we will fix things step by step, and that will be surely easy.
I also wrote a mail to Sebastian, asking if he ok with removing, for now, morphos/amithlon from patches as they of now use anymore by anyone in morphos, and amithlon is amithlon.
ps. received a mail from Sebastian, he says that he of course agreed to remove Amithlon and Morphos, as while adtools were started years ago as cross-platform for everyone, today that isn't the case anymore, so we can concentrate on os4 stuff. Now I just need to get familiar with all that gild patching mechanic and can make a proper 2.24 replace
@sTix found gcc 12 at https://gcc.gnu.org/gcc-12/changes.html do note that there are changes especially for PPC, some C++-23 additions, and C2X additions, supports two new debug formats CTF (should be smaller, faster etc.) and BTF (only for linux kernel), anazlyzer got a workover, removed some bugs in c++ and libstdc++.
It should have been released in april, it is now at stage 4, so it most likely is tied to C++-23 for release of 12.1.
And, i didn't add other patches at the moment, as some of them look like may not need it (like 0002-Fixed-errors-occuring-with-more-recent-versions-of-t.patch, i not sure how to check where issues come), and other ones as well, but I assume those ones are easy enough to add.
That patch only fixes syntax errors in the 'texi' files, provided by the Port for documenting the support for the hunk object file format. thus can be ignored if going for a OS4 only target binutils. Even the added amiga.texi amigalink.texi files can be omitted, like the modification on other texi files.
BTW you could check these files, if you generate the documentation, which as long i know isn't auto, automatically generated during an 'make install' call.
@All Just to let you know, MightyMax progress till the moment that we have latest binutils creating working os4 binaries (via asm + ld), check this out:
$ ppc-amigaos-as -V
GNU assembler version 2.40.50 (ppc-amigaos) using BFD version (GNU Binutils) 2.40.50.20230106
$ ppc-amigaos-ld -N -q test_new.o -o test_new /usr/local/amiga_Save/ppc-amigaos/SDK/newlib/lib/crtbegin.o /usr/local/amiga_Save/ppc-amigaos/SDK/newlib/lib/LibC.a /usr/local/amiga_Save/ppc-amigaos/SDK/newlib/lib/crtend.o
ppc-amigaos-ld: warning: test_new has a LOAD segment with RWX permissions
$ ppc-amigaos-readelf -v
GNU readelf (GNU Binutils) 2.40.50.20230106
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
$ ppc-amigaos-readelf -h test
ELF Header:
Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, big endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: PowerPC
Version: 0x1
Entry point address: 0x1000070
Start of program headers: 52 (bytes into file)
Start of section headers: 5764 (bytes into file)
Flags: 0x0
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 1
Size of section headers: 40 (bytes)
Number of section headers: 14
Section header string table index: 13
The only differences i see now, is that we do not have ".eh_frame" at all, and that shstrtab, symtab and strtab are of different order (but that can be easy binutils construct binaries a little different now). Through missing ".eh_frame" probably can be an issue.
.text must not be writable. If elf.library ignores it for code it may not be a problem, but if it doesn't and allocates the code in writable memory it's a problem.
Read-only (.text, .rodata, ...) and writable (.sbss) sections mustn't be in the same segment. Executable (.text) and non-executable (everything else) sections mustn't be in the same segment either.
Quote:
i.e. the one compiled with current adtools's binutils
Which version is that? binutils 2.14.x was working, everything newer: unlikely.
@joerg Default adtool's one is 2.23.2. So that how it for us for last 10 or more years. Maybe even 15 or more, because 2.14 one were tooo long ago, and everything we had today build with 2.32.2 binutils and GCC starting from 6.x.
Anyway, if you're in interest to help with advices, etc., take a look please on that one:
@all Was able to build Frederik's SSHTerm with new binutils, and it's working ! This is the first C-based test case, with amgiaos4 specific code and with usage of .a link libs, amissl and stuff. This mean that basics at least works!
@kas1e The original AmigaOS 4.x port of binutils (2.14.x) was working without any problems, but then ADTools was changed to an utter nonsense mix of 3 incompatible OSes (AmigaOS 4.x/PPC, AmigaOS 3.x/m68k and MorphOS) which destroyed the required AmigaOS 4.x specific features.
I don't know if the default for the AmigaOS 4.x port of strip was ever changed, but 15 years ago on AmigaOS 4.x only using "strip --strip-unneeded" worked.
@joerg At least now, we do not add any OS3/MOS code on top of binutils 2.40, only os4 specific changes (you can see it in the Max's repo).
Through, what you mean by "working without any problems” ? So far, the current binutils from adtools working too :) (at least to the level most of us need:))