10 February 2018, 18:10 | #761 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Right, only function calls can use PC-relative jumps + extra absolute jump if needed. I would have been quite difficult to do with LEAs
Very tiny observation: Long word array offset calculation use 2x add.l dn,dn. I think -Os should use shorter lsl.l #2,d0. |
10 February 2018, 23:57 | #762 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
I think, I can live with add add. |
|
12 February 2018, 21:52 | #763 |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
bebbo, dont want to derail your thread any further, just wanted to ask if you could point me to where, if you hat manually enable relative addressing in gcc. like when specifying an offset to address register content here:
bset.b #0,4(a1) thats what aros gcc seems not to understand. my thread is here: http://eab.abime.net/showthread.php?...54#post1219154 |
02 March 2018, 13:00 | #764 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
|
07 March 2018, 22:46 | #765 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
i try to build lhasa/lha.exe using -mcrt=clib2 -m68000
same with: -mcrt=clib2 -m68020-40 -msoft-float and get the linker message: Code:
lha-list.o(.text+0x63a): undefined reference to `__mulsf3' lha-list.o(.text+0x654): undefined reference to `__divsf3' if so, I found something which may help: Code:
To get gcc to build a floating point library, I think you need to change the line softfp_float_modes := tf in the file gcc/config/i386/t-fprules-softfp to be softfp_float_modes := sf df tf I don't know if that will suffice but as far as I can see it is a necessary step. so something is missing in the softfloat math lib Last edited by emufan; 07 March 2018 at 23:03. |
08 March 2018, 12:08 | #766 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
|
|
08 March 2018, 12:45 | #767 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
seriously? I refused to do so, since I could not imagine it's again that simple
#1) of course you are right Code:
CFLAGS="-mcrt=clib2 -m68000" LDFLAGS="-lm" ./configure ... is this the way to configure the toolchain build, so it does build softfloat libs? Last edited by emufan; 08 March 2018 at 13:00. |
08 March 2018, 13:24 | #768 | ||
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
Quote:
The configuration for i386 does not affect what's build for the m68k line. AFAIK the libraries (clib2, libnix) are providing a math lib using the Amiga math libraries. Thus you need -lm for float/double math operations. (And you also need -lm for printing float/double with libnix) Last edited by bebbo; 08 March 2018 at 15:08. |
||
08 March 2018, 14:23 | #769 | |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
Quote:
of course I saw the i386. it was more a question, regarding the way those things are build generally. but thanks for info. |
|
08 March 2018, 15:05 | #770 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
Code:
m68k-*-amiga*) tmake_file="$tmake_file m68k/t-glue m68k/t-floatlib soft-fp" |
|
08 March 2018, 15:45 | #771 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
|
14 March 2018, 23:40 | #772 |
Registered User
Join Date: Aug 2016
Location: germany
Posts: 67
|
build -problem
hello,
i'm on the latest from the git-repo (commitid: bee61d81df17239be5e158b4264a7470358824cb) but the build using "toolchain-m68k" fails: Code:
... INFO: extract files from ".build-m68k/archives/ira.lha" DEBUG: makedir ".build-m68k/tmp/tmp2SPBmK/ira" DEBUG: extract "ira/amiga_hunks.c" DEBUG: extract "ira/amiga_hunks.h" DEBUG: extract "ira/atari.c" DEBUG: extract "ira/atari.h" DEBUG: extract "ira/binary.c" DEBUG: extract "ira/binary.h" DEBUG: extract "ira/config.c" DEBUG: extract "ira/config.h" DEBUG: extract "ira/constants.c" DEBUG: extract "ira/constants.h" DEBUG: extract "ira/elf.c" DEBUG: extract "ira/elf.h" DEBUG: extract "ira/init.c" DEBUG: extract "ira/init.h" DEBUG: extract "ira/ira.c" DEBUG: extract "ira/ira.doc" DEBUG: extract "ira/ira.exe" DEBUG: extract "ira/ira.h" DEBUG: extract "ira/ira.readme" DEBUG: extract "ira/ira2.doc" DEBUG: extract "ira/ira_2.c" DEBUG: extract "ira/ira_2.h" DEBUG: extract "ira/ira_68k" DEBUG: extract "ira/ira_config.doc" DEBUG: extract "ira/ira_mos" DEBUG: extract "ira/ira_os4" DEBUG: extract "ira/make.rules" DEBUG: extract "ira/Makefile" DEBUG: extract "ira/Makefile.mos" DEBUG: extract "ira/Makefile.os3" DEBUG: extract "ira/Makefile.os4" DEBUG: extract "ira/Makefile.osx" DEBUG: extract "ira/Makefile.win32" DEBUG: extract "ira/megadrive.c" DEBUG: extract "ira/megadrive.h" DEBUG: makedir ".build-m68k/tmp/tmp2SPBmK/ira/obj" DEBUG: extract "ira/obj/.dummy" DEBUG: extract "ira/opcode.c" DEBUG: extract "ira/opcode.h" DEBUG: extract "ira/supp.c" DEBUG: extract "ira/supp.h" DEBUG: copytree ".build-m68k/tmp/tmp2SPBmK" to ".build-m68k/build/ira" DEBUG: makedir ".build-m68k/build/ira" DEBUG: makedir ".build-m68k/build/ira/ira" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/Makefile" to ".build-m68k/build/ira/ira/Makefile" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/Makefile.mos" to ".build-m68k/build/ira/ira/Makefile.mos" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/Makefile.os3" to ".build-m68k/build/ira/ira/Makefile.os3" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/Makefile.os4" to ".build-m68k/build/ira/ira/Makefile.os4" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/Makefile.osx" to ".build-m68k/build/ira/ira/Makefile.osx" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/Makefile.win32" to ".build-m68k/build/ira/ira/Makefile.win32" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/amiga_hunks.c" to ".build-m68k/build/ira/ira/amiga_hunks.c" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/amiga_hunks.h" to ".build-m68k/build/ira/ira/amiga_hunks.h" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/atari.c" to ".build-m68k/build/ira/ira/atari.c" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/atari.h" to ".build-m68k/build/ira/ira/atari.h" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/binary.c" to ".build-m68k/build/ira/ira/binary.c" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/binary.h" to ".build-m68k/build/ira/ira/binary.h" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/config.c" to ".build-m68k/build/ira/ira/config.c" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/config.h" to ".build-m68k/build/ira/ira/config.h" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/constants.c" to ".build-m68k/build/ira/ira/constants.c" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/constants.h" to ".build-m68k/build/ira/ira/constants.h" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/elf.c" to ".build-m68k/build/ira/ira/elf.c" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/elf.h" to ".build-m68k/build/ira/ira/elf.h" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/init.c" to ".build-m68k/build/ira/ira/init.c" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/init.h" to ".build-m68k/build/ira/ira/init.h" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/ira.c" to ".build-m68k/build/ira/ira/ira.c" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/ira.doc" to ".build-m68k/build/ira/ira/ira.doc" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/ira.exe" to ".build-m68k/build/ira/ira/ira.exe" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/ira.h" to ".build-m68k/build/ira/ira/ira.h" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/ira.readme" to ".build-m68k/build/ira/ira/ira.readme" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/ira2.doc" to ".build-m68k/build/ira/ira/ira2.doc" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/ira_2.c" to ".build-m68k/build/ira/ira/ira_2.c" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/ira_2.h" to ".build-m68k/build/ira/ira/ira_2.h" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/ira_68k" to ".build-m68k/build/ira/ira/ira_68k" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/ira_config.doc" to ".build-m68k/build/ira/ira/ira_config.doc" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/ira_mos" to ".build-m68k/build/ira/ira/ira_mos" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/ira_os4" to ".build-m68k/build/ira/ira/ira_os4" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/make.rules" to ".build-m68k/build/ira/ira/make.rules" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/megadrive.c" to ".build-m68k/build/ira/ira/megadrive.c" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/megadrive.h" to ".build-m68k/build/ira/ira/megadrive.h" DEBUG: makedir ".build-m68k/build/ira/ira/obj" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/obj/.dummy" to ".build-m68k/build/ira/ira/obj/.dummy" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/opcode.c" to ".build-m68k/build/ira/ira/opcode.c" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/opcode.h" to ".build-m68k/build/ira/ira/opcode.h" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/supp.c" to ".build-m68k/build/ira/ira/supp.c" DEBUG: copy ".build-m68k/tmp/tmp2SPBmK/ira/supp.h" to ".build-m68k/build/ira/ira/supp.h" DEBUG: rmtree ".build-m68k/tmp/tmp2SPBmK" DEBUG: enter directory ".build-m68k/build" DEBUG: execute "patch -t -p0 -i /home/renef/AMIGA/new/amigaos-cross-toolchain/patches/ira/Makefile.diff" can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- ira/Makefile 2015-09-11 09:25:13.000000000 +0200 |+++ ira/Makefile 2015-09-11 09:21:37.000000000 +0200 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored ERROR: command "patch -t -p0 -i /home/renef/AMIGA/new/amigaos-cross-toolchain/patches/ira/Makefile.diff" failed with 1 how can we fix this? just moving the files from the ira/ira/-directory to ira/ is not working completely (several other patches fail) |
15 March 2018, 00:28 | #773 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
Use this repo instead: https://github.com/bebbo/amiga-gcc
|
27 March 2018, 17:56 | #774 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
So, I have a small project (like the command "ls" in linux) and uses nostartup and thus it has a custom startup in assembly.
The exe size is at ~19k, and if I add -fbaserel -msmall-code goes at ~15k. Impressive and all but....what is the inner workings for a4? I probably have to provide a "geta4()" in my startup, right? (and also call it at start, to set it once) But to what value should I set it to? Does linker expose a symbol for that purpose when -fbaserel is used? |
27 March 2018, 18:24 | #775 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,645
|
OK so let's say (because it's true :P) that I am a n00b, but I know C, and want to try this out.
What is exactly all I need to be able to code on my modern (PC/Win) computer and make binaries for Amiga? Is it just this? > https://github.com/bebbo/amigaos-cross-toolchain Do I need an Amiga, emulated or not, at all for this? (ideally no). |
27 March 2018, 18:26 | #776 | |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
|
Quote:
|
|
27 March 2018, 18:29 | #777 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,645
|
|
27 March 2018, 18:30 | #778 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
|
|
27 March 2018, 18:32 | #779 | |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
Quote:
Now, you should use https://github.com/bebbo/amiga-gcc Someone with windows experience should tackle this, but if you were in linux you would do: git pull https://github.com/bebbo/amiga-gcc cd amiga-gcc export PREFIX=/home/username/gcc6 make update make all -j8 |
|
27 March 2018, 18:59 | #780 |
Registered User
Join Date: May 2001
Location: ?
Posts: 19,645
|
It's just that my only Linux machines are Raspberry Pis. I don't want to run Linux on my Windows PC, although I usually have a virtual machine ready for special cases.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New GCC based dev toolchain for AmigaOS 3.x | cla | Coders. Releases | 8 | 24 December 2017 10:18 |
Issue with photon/xxxx WinUAE Toolchain | arpz | Coders. Asm / Hardware | 2 | 26 September 2015 22:33 |
New 68k gcc toolchain | arti | Coders. C/C++ | 17 | 31 July 2015 03:59 |
Hannibal's WinUAE Demo Toolchain 5 | Bobic | Amiga scene | 1 | 23 July 2015 21:04 |
From gcc to vbcc. | Cowcat | Coders. General | 9 | 06 June 2014 14:45 |
|
|