View previous topic :: View next topic |
Author |
Message |
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Fri Sep 08, 2017 8:05 pm Post subject: cross-avr: ld fails with '-pie is not supported' [SOLVED] |
|
|
Hi again.
I don't know if it's because I ran eselect gcc or not but since then I can no longer compile anything for the AVR platform. For the record I installed avr-gcc using crossdev and it worked like a charm until I decided to peek into higher versions of the compiler, which latest version is 6.4.0 as of now. Note that I had to manually install the symbolic link /usr/avr/lib/ldscripts -> /usr/x86_64-pc-linux-gnu/avr/lib/ldscripts to make the original toollchain work.
After I've installed cross-avr/gcc-6.4.0 all I get wierdly enough is this:
avr-gcc -g -Wall -mcall-prologues -fshort-enums -Os -ffreestanding -Wl,-gc-sections -Wl,-relax -mmcu=atmega64m1 dac.c -o dac: | dac.c:1:0: warning: -fPIC is not supported [-fPIC]
/*
dac.c:1:0: warning: -fPIE is not supported [-fPIE]
/usr/libexec/gcc/avr/ld: -pie not supported
collect2: error: ld returned 1 exit status |
I'm not even invoking -pie! Where the heck does that come from?
I've tried to completely remove cross-*/* and reinstall only one version of each tool (all stable but GCC). No way, I'm still getting the error.
equery l cross-*/*: | [I-O] [ -] cross-avr/avr-libc-2.0.0:0
[I-O] [ -] cross-avr/binutils-2.28.1:2.28.1
[I-O] [ -] cross-avr/gcc-6.4.0:6.4.0 |
ll /usr/libexec/gcc/avr/ld: | lrwxrwxrwx 1 root root 51 8 sep 15:42 /usr/libexec/gcc/avr/ld -> /usr/x86_64-pc-linux-gnu/avr/binutils-bin/2.28.1/ld |
EDIT: I don't know what muse inspired me to check USE flags for avr-gcc-6.4.0 but the latter was indeed compiled with... pie. I added -pie to my global USE flags for crossdev, reinstalled avr-gcc and now the issue has gone.
Case closed. *pfew* _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
salfter Tux's lil' helper
Joined: 02 Jan 2003 Posts: 89
|
Posted: Mon Nov 20, 2017 6:47 pm Post subject: Re: cross-avr: ld fails with '-pie is not supported' [SOLVED |
|
|
VinzC wrote: | EDIT: I don't know what muse inspired me to check USE flags for avr-gcc-6.4.0 but the latter was indeed compiled with... pie. I added -pie to my global USE flags for crossdev, reinstalled avr-gcc and now the issue has gone. |
Just had the same issue...applied the same fix and got everything running again. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|