Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
60 user(s) are online (49 user(s) are browsing Forums)

Members: 0
Guests: 60

more...

Headlines




« 1 2 (3) 4 »


Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Quite a regular
Joined:
2013/10/17 16:21
From Hungary
Posts: 690
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.
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4323
@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?

_________________
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7068
@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)

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4323
@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=

_________________
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7068
@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

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Just popping in
Joined:
2012/7/16 18:57
From Istanbul
Posts: 221
@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
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Just popping in
Joined:
2006/11/27 22:06
From UK
Posts: 188
@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".

   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Just popping in
Joined:
2012/7/16 18:57
From Istanbul
Posts: 221
@derfs

Thanks but I got this error after following the final step.

_________________
Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Just popping in
Joined:
2006/11/27 22:06
From UK
Posts: 188
@SinanSam460

you need to be in the “build” directory when you run cmake.

   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Just popping in
Joined:
2012/7/16 18:57
From Istanbul
Posts: 221
@kas1e

How do we update gcc 10 and latest updates on CygWin64 ?


_________________
Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7068
@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 10



And then doing all the same as usual (change SDK link, etc, etc).

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Just popping in
Joined:
2012/7/16 18:57
From Istanbul
Posts: 221
@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
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Site Builder
Joined:
2006/12/2 23:57
From Athens/Dublin
Posts: 1011
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.

   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4323
@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?

_________________
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Site Builder
Joined:
2006/12/2 23:57
From Athens/Dublin
Posts: 1011
@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.

   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4323
@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

_________________
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4323
@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)

_________________
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Just popping in
Joined:
2006/11/27 22:06
From UK
Posts: 188
@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 enabledn");
}

//compile test.c
ppc-amigaos-gcc -flto test.-o test
ppc
-amigaos-readelf -h test

//transfer test to amiga and run, make sure file executable after transfer via sftp

//end.

   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4323
@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

_________________
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
   Report Go to top

Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4323
@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
_________________
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
   Report Go to top


« 1 2 (3) 4 »



[Advanced Search]



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project