Who's Online
125 user(s) are online (
114 user(s) are browsing
Forums )
Members: 2
Guests: 123
samo79 ,
emeck ,
more...
Topic options
View mode
Newest First
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2020/1/17 19:32
#41
Quite a regular
Joined: 2013/10/17 16:21Last Login
: Today 6:26
From Hungary
Group:
Registered Users
I didn't mean changes in the adtools repository, that's frozen in time, but the official GCC repository. If I was in the wrong directory, then shouldn't
Quote:
gild/bin/gild checkout binutils 2.23.2 have failed too? I guess I have no other choice but to start from scratch.
edit: I found the problem. The tags in official GCC repo got renamed. There used to be "gcc-8_3_0-release":
https://webcache.googleusercontent.com ... &cd=1&hl=en&ct=clnk&gl=hu But now it's "releases/gcc-8.3.0":
https://gnu.googlesource.com/gcc/+refs This is why gild no longer works... Now I have to figure out where it stores the name of this tag.
edit #2:
So here's the solution, this could be added to the original post. Open "adtools/gcc/series" in a text editor, and replace
Quote:
with
Quote:
Edited by BSzili on 2020/1/17 21:29:15 Edited by BSzili on 2020/1/17 21:37:11
This is just like television, only you can see much further.
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2020/1/30 10:31
#42
Home away from home
Joined: 2006/11/26 21:45Last Login
: Today 17:04
From a dying planet
Group:
Registered Users
@kas1e WARNING: When cross-compiling PKG_CONFIG_LIBDIR must be set to the location of the .pc files for the target Also: error: unrecognized option: --build=x86_64 How to fix those?
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2020/1/30 10:37
#43
Home away from home
Joined: 2007/9/11 12:31Last Login
: 11/19 7:43
From Russia
Group:
Registered Users
@Raziel When configure want PKG things, then: export PATH=/usr/local/amiga/ppc-amigaos/SDK/local/newlib/bin/:$PATH ./configure --host=ppc-amigaos --target=ppc-amigaos PKG_CONFIG=/bin/pkg-config PKG_CONFIG_LIBDIR=/usr/local/amiga/ppc-amigaos/SDK/local/newlib/lib/pkgconfig (so we use cross-compiler's pkg-config but our .pc files and skip --build=x86_64 option)
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2020/1/30 10:54
#44
Home away from home
Joined: 2006/11/26 21:45Last Login
: Today 17:04
From a dying planet
Group:
Registered Users
@kas1e Can this be automated? Is there a file i can edit to make the PKG_CONFIG persistent? Unrecognized option PKG_CONFIG= PKG_CONFIG_LIBDIR=
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2020/1/30 11:12
#45
Home away from home
Joined: 2007/9/11 12:31Last Login
: 11/19 7:43
From Russia
Group:
Registered Users
@Raziel Everything can be automated, i for myself just didn't bother. Try to run ./configure --help | grep PKG to see what options it have. But it strange, you post "WARNING: When cross-compiling PKG_CONFIG_LIBDIR must be set to the location of the .pc files for the target", i usually have that when configure accept PKG_CONFIG_LIBDIR. But then try to set it as environment then, like: export PKG_CONFIG_LIBDIR=/usr/local/amiga/ppc-amigaos/SDK/local/newlib/lib/pkgconfig
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2020/6/17 20:32
#46
Not too shy to talk
Joined: 2012/7/16 18:57Last Login
: 11/5 22:17
From Istanbul
Group:
Registered Users
@all I am taking baby steps to compile simple things from Linux.. When I try to cross compile something, I get following error: e.g. CMake Error: The source directory "/amiga/Projects/flac-1.3.3/flac-1.3.3" does not appear to contain CMakeLists.txt. What can be the solution ?
Sinan - AmigaOS4 Beta-Tester - AmigaOne X5000 - AmigaOne A1222 - Sam460ex
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2020/6/17 20:58
#47
Not too shy to talk
Joined: 2006/11/27 22:06Last Login
: 11/15 17:20
From UK
Group:
Registered Users
@SinanSam460
Kas1e covered this in the first post.
Quote:
2. Today more often used CMAKE, so to made good use of it on cross-compiler, you always can follow just that way: Quote: $ cd your_project $ mkdir "build" $ cmake \ -DCMAKE_SYSTEM_NAME=Generic \ -DCMAKE_SYSTEM_VERSION=1 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_COMPILER="/usr/local/amiga/bin/ppc-amigaos-gcc" \ -DCMAKE_CXX_COMPILER="/usr/local/amiga/bin/ppc-amigaos-g++" \ -DCMAKE_LINKER="/usr/local/amiga/bin/ppc-amigaos-ld" \ -DCMAKE_AR="/usr/local/amiga/bin/ppc-amigaos-ar" \ -DCMAKE_RANLIB="/usr/local/amiga/bin/ppc-amigaos-ranlib" \ -DCMAKE_FIND_ROOT_PATH="/usr/local/amiga/ppc-amigaos/" \ .. And then "make".
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2020/6/18 4:35
#48
Not too shy to talk
Joined: 2012/7/16 18:57Last Login
: 11/5 22:17
From Istanbul
Group:
Registered Users
@derfs Thanks but I got this error after following the final step.
Sinan - AmigaOS4 Beta-Tester - AmigaOne X5000 - AmigaOne A1222 - Sam460ex
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2020/6/18 16:15
#49
Not too shy to talk
Joined: 2006/11/27 22:06Last Login
: 11/15 17:20
From UK
Group:
Registered Users
@SinanSam460 you need to be in the “build” directory when you run cmake.
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2021/1/19 10:09
#50
Not too shy to talk
Joined: 2012/7/16 18:57Last Login
: 11/5 22:17
From Istanbul
Group:
Registered Users
@kas1e How do we update gcc 10 and latest updates on CygWin64 ?
Sinan - AmigaOS4 Beta-Tester - AmigaOne X5000 - AmigaOne A1222 - Sam460ex
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2021/1/19 11:01
#51
Home away from home
Joined: 2007/9/11 12:31Last Login
: 11/19 7:43
From Russia
Group:
Registered Users
@SinanSam460
Quote:
How do we update gcc 10 and latest updates on CygWin64 ?All the same as with gcc8, but the only difference that you clone the gcc10 branch from sodero's repo, and apply gcc 10 patches. I.e. the whole block will be:
Quote:
cd / mkdir /amiga cd /amiga git clone --branch topic/gcc10_support https://github.com/sodero/adtools/ cd adtools git submodule init git submodule update gild/bin/gild clone gild/bin/gild checkout binutils 2.23.2 gild/bin/gild checkout gcc 10And then doing all the same as usual (change SDK link, etc, etc).
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2021/1/19 13:18
#52
Not too shy to talk
Joined: 2012/7/16 18:57Last Login
: 11/5 22:17
From Istanbul
Group:
Registered Users
@kas1e Thanks I am getting this error when compiling new gcc /amiga/adtools/gcc/repo/libstdc++-v3/src/c++17/fs_ops.cc:1211:40: error: ‘not_supported’ is not a member of ‘std::errc’ 1211 | ec = std::make_error_code(std::errc::not_supported); | ^~~~~~~~~~~~~ make[10]: *** [Makefile:570: fs_ops.lo] Error 1 make[10]: Leaving directory '/amiga/adtools/native-build/gcc-cross-build-10.1.0/ppc-amigaos/clib2/libstdc++-v3/src/c++17' make[9]: *** [Makefile:731: all-recursive] Error 1 make[9]: Leaving directory '/amiga/adtools/native-build/gcc-cross-build-10.1.0/ppc-amigaos/clib2/libstdc++-v3/src' make[8]: *** [Makefile:563: all-recursive] Error 1 make[8]: Leaving directory '/amiga/adtools/native-build/gcc-cross-build-10.1.0/ppc-amigaos/clib2/libstdc++-v3' make[7]: *** [Makefile:488: all] Error 2 make[7]: Leaving directory '/amiga/adtools/native-build/gcc-cross-build-10.1.0/ppc-amigaos/clib2/libstdc++-v3' make[6]: *** [Makefile:856: multi-do] Error 1 make[6]: Leaving directory '/amiga/adtools/native-build/gcc-cross-build-10.1.0/ppc-amigaos/libstdc++-v3' make[5]: *** [Makefile:824: all-multi] Error 2 make[5]: Leaving directory '/amiga/adtools/native-build/gcc-cross-build-10.1.0/ppc-amigaos/libstdc++-v3' make[4]: *** [Makefile:563: all-recursive] Error 1 make[4]: Leaving directory '/amiga/adtools/native-build/gcc-cross-build-10.1.0/ppc-amigaos/libstdc++-v3' make[3]: *** [Makefile:488: all] Error 2 make[3]: Leaving directory '/amiga/adtools/native-build/gcc-cross-build-10.1.0/ppc-amigaos/libstdc++-v3' make[2]: *** [Makefile:11349: all-target-libstdc++-v3] Error 2 make[2]: Leaving directory '/amiga/adtools/native-build/gcc-cross-build-10.1.0' make[1]: *** [Makefile:960: all] Error 2 make[1]: Leaving directory '/amiga/adtools/native-build/gcc-cross-build-10.1.0' make: *** [makefile:192: gcc-cross-done-10.1.0] Error 2 make: Leaving directory '/amiga/adtools/native-build'
Sinan - AmigaOS4 Beta-Tester - AmigaOne X5000 - AmigaOne A1222 - Sam460ex
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2021/1/19 16:10
#53
Site Builder
Joined: 2006/12/2 23:57Last Login
: Yesterday 9:16
From Athens/Dublin
Group:
Registered Users Webmasters
The way I compile it on docker using Ubuntu 20.04 can be found at
https://github.com/walkero-gr/AmigaGCConDocker/blob/main/Dockerfile There you can see the bash commands I use. Have in mind that this supports gcc 8, 9 and 10, which is set on an ENV variable called GCC. Check this out and you might find a missed step on your setup.
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2021/11/3 6:39
#54
Home away from home
Joined: 2006/11/26 21:45Last Login
: Today 17:04
From a dying planet
Group:
Registered Users
@kas1e Do i need to do something special with gcc11? I tried to install the whole package, but when i picked gcc11 no ppc-amigaos-gcc binary was created? Is it mandatory to use gcc8 while cross-compiling?
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2021/11/3 10:22
#55
Site Builder
Joined: 2006/12/2 23:57Last Login
: Yesterday 9:16
From Athens/Dublin
Group:
Registered Users Webmasters
@Raziel
At
https://github.com/walkero-gr/AmigaGCC ... blob/main/base/Dockerfile you can see how I did it on docker with Ubuntu 20.10. When I did it a few months ago it worked just fine and there is a docker image with GCC 11.1.0 working fine, as much as I know.
Maybe that helps you. If you need more info, please do not hesitate to ask me.
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2021/11/3 11:29
#56
Home away from home
Joined: 2006/11/26 21:45Last Login
: Today 17:04
From a dying planet
Group:
Registered Users
@walkero
Erm, thank you...but i don't know nothing about Linux, i don't even know what a docker is, so...sorry
Going to try the gcc8 approach in cygwin now
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2021/11/3 12:20
#57
Home away from home
Joined: 2006/11/26 21:45Last Login
: Today 17:04
From a dying planet
Group:
Registered Users
@Raziel Nope, something is wrong with the build process, i don't get ppc-amigaos-gcc build neither with gcc8 nor gcc11. All the other ppc-amigaos-xxx binaries are there, but no gcc, c+++ (and whatever the compilers are named)
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2021/11/3 18:33
#58
Not too shy to talk
Joined: 2006/11/27 22:06Last Login
: 11/15 17:20
From UK
Group:
Registered Users
@Raziel
I built ppc-amigaos-gcc-8.4.0 just a few days ago. Here are my personal notes from installing adtools which are just rewritten from the ones in this thread.
This assumes Cygwin has been set up with all the appropriate packages.
//adtools setup
//set up git email and user name details. type following in cygwin window (adding in your email and user name where appropriate):
git config --global user . email "you@example.com"
git config --global user . name "Your Name"
cd /
mkdir / amiga
cd / amiga
git clone https : //github.com/sba1/adtools
cd adtools
git submodule init
git submodule update
gild / bin / gild clone //(will take a little while - 10 mins)
gild / bin / gild checkout binutils 2.23.2
gild / bin / gild checkout gcc 8
cd / amiga
git clone https : //github.com/fragglet/lhasa
cd lhasa
./ autogen . sh
make
make install
cd / amiga / adtools
make - C native - build gcc - cross CROSS_PREFIX =/ usr / local / amiga - j4 //(will take a long while - around an hour on a Ryzen 2600)
export PATH =/ usr / local / amiga / bin : $PATH
//add the above line to the /home/user/.bashrc file and restart cygwin
//test gcc cross compiler - create file.c with following text
#include <stdio.h>
void main ()
{
printf ( "gcc 8.4.0 enabled\n" );
}
//compile test.c
ppc - amigaos - gcc - flto test . c - o test
ppc - amigaos - readelf - h test
//transfer test to amiga and run, make sure file executable after transfer via sftp
//end.
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2021/11/3 21:14
#59
Home away from home
Joined: 2006/11/26 21:45Last Login
: Today 17:04
From a dying planet
Group:
Registered Users
@derfs Your steps are the exact same as in post 1. But i followed them anyway, to no avail. I don't get it. Shouldn't the compiler binary be build and placed into usr/local/amiga/bin ??? I have every other ppc-amigaos-xxx in there, but i always miss the compiler binaries...why??? Could you maybe upload your ppc-amigaos-g++ etc. binaries somewhere )or send them via email), so i could at least grab them and copy them over? Thank you
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Posted on:
2021/11/5 9:36
#60
Home away from home
Joined: 2006/11/26 21:45Last Login
: Today 17:04
From a dying planet
Group:
Registered Users
@all
This was the problem...
I never got an "error", just a simple line at the end of the build process telling me
Quote:
make: Exiting with 1 jobserver available, should be 4.I redid all of it with -j2 and it worked...finally :-/
Now i have more questions, but i'm returning to my
"Porting to..." thread instead to not spam @kas1e's thread
Edited by Raziel on 2021/11/5 10:33:46
Currently Active Users Viewing This Thread:
4
(
0 members
and 4 Anonymous Users
)