Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
94 user(s) are online (78 user(s) are browsing Forums)

Members: 3
Guests: 91

NinjaCyborg, Skateman, sTix, more...

Support us!

Headlines

 
  Register To Post  

« 1 2 (3) 4 5 »
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Quite a regular
Quite a regular


See User information
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.
Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Home away from home


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

Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Home away from home


See User information
@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!
AmigaOS4 on youtube
Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Home away from home


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

Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Home away from home


See User information
@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!
AmigaOS4 on youtube
Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Not too shy to talk
Not too shy to talk


See User information
@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
Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Not too shy to talk
Not too shy to talk


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

Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Not too shy to talk
Not too shy to talk


See User information
@derfs

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

Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Not too shy to talk
Not too shy to talk


See User information
@SinanSam460

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

Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Not too shy to talk
Not too shy to talk


See User information
@kas1e

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


Sinan - AmigaOS4 Beta-Tester
- AmigaOne X5000
- AmigaOne A1222
- Sam460ex
Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Home away from home


See User information
@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!
AmigaOS4 on youtube
Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Not too shy to talk
Not too shy to talk


See User information
@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
Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Site Builder
Site Builder


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

Follow me on
Ko-fi, Twitter, YouTube, Twitch
Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Home away from home


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

Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Site Builder
Site Builder


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

Follow me on
Ko-fi, Twitter, YouTube, Twitch
Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Home away from home


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

Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Home away from home


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

Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Not too shy to talk
Not too shy to talk


See User information
@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.-o test
ppc
-amigaos-readelf -h test

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

//end.

Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Home away from home


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

Go to top
Re: How to build AmigaOS4 cross-compiler (Binutils 2.23.2 & GCC 8.3.0) on CYGWIN
Home away from home
Home away from home


See User information
@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
Go to top

  Register To Post
« 1 2 (3) 4 5 »

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project