Build Environment

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

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

bernouilli
Atari maniac
Atari maniac
Posts: 88
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: 1208
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.

olin
Atariator
Atariator
Posts: 23
Joined: Tue Nov 21, 2017 8:57 pm

Re: Build Environment

Postby olin » Sat Dec 02, 2017 4:05 pm

edit: post deleted, found the answer on the wiki page


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 1 guest