aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-08-18 16:40:53 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2018-08-18 16:40:53 +0100
commitd6c59e8252caed2b0b382a5ea81db6988ebe585c (patch)
tree9a64e208f84e8b349b28d14dd05132f73e610e48
parentwrappers: prevent use of wine to convert between path types (diff)
downloadcrossdev-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>
-rwxr-xr-xcrossdev8
1 files changed, 8 insertions, 0 deletions
diff --git a/crossdev b/crossdev
index 4ee7076..81bd50d 100755
--- a/crossdev
+++ b/crossdev
@@ -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