diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2018-08-18 16:40:53 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2018-08-18 16:40:53 +0100 |
commit | d6c59e8252caed2b0b382a5ea81db6988ebe585c (patch) | |
tree | 9a64e208f84e8b349b28d14dd05132f73e610e48 /crossdev | |
parent | wrappers: prevent use of wine to convert between path types (diff) | |
download | crossdev-d6c59e8252caed2b0b382a5ea81db6988ebe585c.tar.gz crossdev-d6c59e8252caed2b0b382a5ea81db6988ebe585c.tar.bz2 crossdev-d6c59e8252caed2b0b382a5ea81db6988ebe585c.zip |
crossdev: default to USE=-pie for bare-metal mips targets
When built with pie-by-default compiling gcc fails as:
cc1: error: position-independent code requires ‘-mabicalls’
Tested as:
USE=-pie crossdev -t mipsel-elf
Reported-by: rhn
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'crossdev')
-rwxr-xr-x | crossdev | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -397,6 +397,14 @@ parse_target() { # [2.] mingw32 startup code is broken: bug #644930 # at least on i686-w64-mingw32 and x86_64-w64-mingw32 mingw*|*-mingw*) pie_support=no;; + # Some bare-metal targets don't work with pie as-is + *-elf|*-eabi) + case ${CTARGET} in + # mips can't generate freestanding PIC: + # cc1: error: position-independent code requires ‘-mabicalls’ + mips*) pie_support=no;; + esac + ;; esac if [[ $pie_support = "no" ]]; then # pie is >=gcc-6, nopie is <gcc-6 |