Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
131 user(s) are online (124 user(s) are browsing Forums)

Members: 0
Guests: 131

more...

Support us!

Headlines

 
  Register To Post  

« 1 ... 11 12 13 (14) 15 16 17 ... 21 »
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
Quote:
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 :)

Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@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.

Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
Yes 2.24 to 2.29 is a big step. Not much inflation in binutils land. They've only reached major version 2 in 30 years :)

Can you forward the mail to rolfkopman <snake like a> gmail <dot> com?

Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@sTix
Mail sent.

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

Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@kas1e

FYI: I bumped gcc to the latest release, 11.3.0 (pending PR and test build).

Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@sTix

Quick test with ScummVM shows it's working (no full build yet due to ScummVM source bugs).

Thanks a lot

Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@sTix
Has gcc 12 been released beyond the base release?

C++ is nearing 2023 release so gnu/gcc might wait for that to release 12.1 ?!

Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@Raziel

Nice!

@trgswe

It looks like it will take a couple of months before gcc 12 is released: https://gcc.gnu.org/develop.html#timeline

Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@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.


Edited by trgswe on 2022/5/4 11:46:01
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@kas1e

Quote:
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.

Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@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-amigaosusing BFD version (GNU Binutils2.40.50.20230106

ppc-amigaos-as test.-o test.o

ppc-amigaos-ld -V
GNU ld 
(GNU Binutils2.40.50.20230106
  Supported emulations
:
   
amigaos
   elf32ppc

ppc-amigaos-ld --q test_new.-o test_new /usr/local/amiga_Save/ppc-amigaos/SDK/newlib/lib/crtbegin./usr/local/amiga_Save/ppc-amigaos/SDK/newlib/lib/LibC./usr/local/amiga_Save/ppc-amigaos/SDK/newlib/lib/crtend.o
ppc
-amigaos-ldwarningtest_new has a LOAD segment with RWX permissions


ppc-amigaos-readelf -v
GNU readelf 
(GNU Binutils2.40.50.20230106
Copyright 
(C2023 Free Software FoundationInc.
This program is free softwareyou may redistribute it under the terms of
the GNU General 
Public License version 3 or (at your optionany 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



And binary works on os4.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@kas1e
@MightyMax

Very nice. Good job!

Go to top
Re: gcc 9 and 10
Site Builder
Site Builder


See User information
great news indeed... Awesome work guys

Follow me on
Ko-fi, Twitter, YouTube, Twitch
Go to top
Re: gcc 9 and 10
Just can't stay away
Just can't stay away


See User information
@kas1e
Quote:
ppc-amigaos-ld: warning: test_new has a LOAD segment with RWX permissions
That may be a problem, post a more detailed output of readelf, for example "readelf -e test_new".

Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@joerg
As far as we find, its issue introduced since v2.39 of binutils:
https://stackoverflow.com/questions/73 ... ions-embedded-arm-project

To disable this warning, we just use --no-warn-rwx-segments , which we can make a default one later (if it indeed harmless error).

But anyway, just for sake of, there is "readelf -e test_new" output:

readelf -e test_new
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

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        01000054 000054 00048c 00 WAX  0   0  4
  [ 2] .rela.text        RELA            00000000 001334 0002e8 0c   I 11   1  4
  [ 3] .rodata           PROGBITS        01001000 001000 000034 01 AMS  0   0  4
  [ 4] .__newlib_version PROGBITS        01001034 001034 000008 00   A  0   0  4
  [ 5] .ctors            PROGBITS        0100103c 00103c 000008 00  WA  0   0  4
  [ 6] .dtors            PROGBITS        01001044 001044 000008 00  WA  0   0  4
  [ 7] .data             PROGBITS        0100104c 00104c 000000 00  WA  0   0  1
  [ 8] .sdata            PROGBITS        0100104c 00104c 000000 00  WA  0   0  1
  [ 9] .sbss             NOBITS          0100104c 00104c 000024 00  WA  0   0  4
  [10] .bss              NOBITS          01001070 00104c 000000 00  WA  0   0  1
  [11] .symtab           SYMTAB          00000000 00104c 000220 10     12  14  4
  [12] .strtab           STRTAB          00000000 00126c 0000c6 00      0   0  1
  [13] .shstrtab         STRTAB          00000000 00161c 000066 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
  L (link order), O (extra OS processing required), G (group), T (TLS),
  C (compressed), x (unknown), o (OS specific), E (exclude),
  D (mbind), v (VLE), p (processor specific)

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000054 0x01000054 0x01000054 0x00ff8 0x0101c RWE 0x4

 Section to Segment mapping:
  Segment Sections...
   00     .text .rodata .__newlib_version .ctors .dtors .sbss


And that is "readelf -e test_adtools" (i.e. the one compiled with current adtools's binutils):

readelf -e test_adtools
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:          4280 (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: 11

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        01000054 000054 00048c 00 WAX  0   0  4
  [ 2] .rela.text        RELA            00000000 0012e8 0002e8 0c     12   1  4
  [ 3] .rodata           PROGBITS        01001000 001000 000034 01 AMS  0   0  4
  [ 4] .__newlib_version PROGBITS        01001034 001034 000008 00   A  0   0  4
  [ 5] .eh_frame         PROGBITS        0100103c 00103c 000000 00   A  0   0  4
  [ 6] .ctors            PROGBITS        0100103c 00103c 000008 00  WA  0   0  4
  [ 7] .dtors            PROGBITS        01001044 001044 000008 00  WA  0   0  4
  [ 8] .data             PROGBITS        0100104c 00104c 000000 00  WA  0   0  1
  [ 9] .sbss             NOBITS          0100104c 00104c 000024 00  WA  0   0  4
  [10] .bss              NOBITS          01001070 00104c 000000 00  WA  0   0  1
  [11] .shstrtab         STRTAB          00000000 00104c 000069 00      0   0  1
  [12] .symtab           SYMTAB          00000000 0015d0 000220 10     13  13  4
  [13] .strtab           STRTAB          00000000 0017f0 0000d6 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
  L (link order), O (extra OS processing required), G (group), T (TLS),
  C (compressed), x (unknown), o (OS specific), E (exclude),
  D (mbind), v (VLE), p (processor specific)

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000054 0x01000054 0x01000054 0x00ff8 0x0101c RWE 0x4

 Section to Segment mapping:
  Segment Sections...
   00     .text .rodata .__newlib_version .eh_frame .ctors .dtors .sbss


Seems both about right ?

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.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: gcc 9 and 10
Just can't stay away
Just can't stay away


See User information
@kas1e
Quote:
Section Headers:
[ 1] .text PROGBITS 01000054 000054 00048c 00 WAX 0 0 4
.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.

Quote:
Segment Sections...
00 .text .rodata .__newlib_version .ctors .dtors .sbss
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.


Edited by joerg on 2023/8/10 18:25:13
Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@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:

https://github.com/migthymax/binutils-gdb/issues/2


@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!


Edited by kas1e on 2023/8/10 18:48:14
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: gcc 9 and 10
Just can't stay away
Just can't stay away


See User information
@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.

Quote: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.

Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@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:))

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: gcc 9 and 10
Quite a regular
Quite a regular


See User information
@joerg

Strip -s works fine for me.

Go to top

  Register To Post
« 1 ... 11 12 13 (14) 15 16 17 ... 21 »

 




Currently Active Users Viewing This Thread: 4 ( 0 members and 4 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project