Build Environment

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

bernouilli
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 100
Joined: Fri Jan 06, 2017 5:02 pm
Location: Paris/France

Re: Build Environment

Postby bernouilli » Wed Nov 15, 2017 4:49 pm

Sorgelig wrote:hmm.. It requires a special linker - gold. I don't want to require additional tool without a good reason.
So, i won't include such changes into repository. You can use it if it helps. I believe you can use my Makefile. It's just something wrong with your build environment.

The linker gold is provided with the gnu-arm tool chain, or isn't it ?

I did some searching, it appears that when you use the linker, it's better to put the libraries at the end of the command line.
I tried and it works without using gold.

If I replace the line
@$(LD) $(LFLAGS) -o $@ $+
with
@$(LD) -o $@ $+ $(LFLAGS)

it compiles even with the regular ld

Sorgelig
Atari God
Atari God
Posts: 1951
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Build Environment

Postby Sorgelig » Wed Nov 15, 2017 5:01 pm

bernouilli wrote:If I replace the line
@$(LD) $(LFLAGS) -o $@ $+
with
@$(LD) -o $@ $+ $(LFLAGS)

it compiles even with the regular ld

This also works for me. Accepted.
Actually linker is a weakest part of GCC. It still has problems even with libraries order. So, i'm not surprised if simple change of parameters order solves the problem.

udo
Atariator
Atariator
Posts: 24
Joined: Fri Jun 02, 2017 10:47 am

Re: Build Environment

Postby udo » Sun Dec 31, 2017 6:23 pm

Hi,

I did some experiments with this gcc Version: gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4)

Some observations while building the MiSTer binary:
1. It throws a lot of warnings about wrong printf format parameters, some of them might cause trouble ...

2. Line 450 of boot.c causes a runtime error because the buffer "rtl_ver" is to small:

char rtl_ver[45];
siprintf(rtl_ver, "MINIMIG-AGA%s v%d.%d.%d by Rok Krajnc. MiSTer port by Sorgelig.", ver_beta ? " BETA" : "", ver_major, ver_minor, ver_minion);

Probably other Versions of gcc do not have this runtime check, but the buffer is to small in any case.

Sorgelig
Atari God
Atari God
Posts: 1951
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Build Environment

Postby Sorgelig » Sun Dec 31, 2017 6:54 pm

I will increase the buffer, thanks.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 1 guest