Changes between Version 5 and Version 6 of Arm64


Ignore:
Timestamp:
Jan 25, 2016 12:00:32 AM (4 years ago)
Author:
hypoon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Arm64

    v5 v6  
    7171    --platform=android-21 \
    7272    --install-dir=$TOOLCHAIN \
    73     --toolchain=aarch64-linux-android-4.9 \
     73    --toolchain=aarch64-linux-android-clang3.6 \
    7474    --system=linux-x86_64
    7575}}}
     
    177177}}}
    178178
    179 My configure command got very long because I didn't trust it to find anything.
    180 
    181 {{{
     179In order to get ld and ld.gold to do what I want (link as much with `-pie` as possible), I created some wrapper scripts to eliminate `pie` from the list of arguments whenever `-r` or `-shared` is found. There is probably a better way to do this, perhaps making use of substitution parameters (`-S`), but this worked for now. Download the two wrapper scripts, [attachment:aarch64-linux-android-ld] and [attachment:aarch64-linux-android-ld.gold], and put them in `$PROJDIR`.
     180
     181There's also a problem with android-ndk shipping llvm 3.6, but we need llvm 3.7, so we'll replace the `opt` and `llc` binaries with symlinks to our system versions. `clang` might also need the same treatment, but I forgot, and it seemed to work OK. Maybe it's not used?
     182
     183{{{
     184mv $TOOLCHAIN/bin/aarch64-linux-android-ld{,.orig}
     185mv $PROJDIR/aarch64-linux-android-ld $TOOLCHAIN/bin/aarch64-linux-android-ld
     186mv $TOOLCHAIN/bin/aarch64-linux-android-ld.gold{,.orig}
     187mv $PROJDIR/aarch64-linux-android-ld.gold $TOOLCHAIN/bin/aarch64-linux-android-ld.gold
     188
     189}}}
     190
     191My configure command got very long because I didn't trust it to find anything. Some of these options may be unnecessary.
     192
     193{{{
     194cd $PROJDIR/ghc-8.0.0.20160111
    182195./configure \
    183196    --target=aarch64-linux-android \
    184197        --with-gcc=$TOOLCHAIN/bin/aarch64-linux-android-gcc \
    185       --with-clang=$TOOLCHAIN/bin/clang
     198      --with-clang=$TOOLCHAIN/bin/clang \
    186199         --with-ld=$TOOLCHAIN/bin/aarch64-linux-android-ld \
    187200    --with-ld.gold=$TOOLCHAIN/bin/aarch64-linux-android-ld.gold \
     
    192205        --with-llc=$TOOLCHAIN/bin/llc \
    193206        --with-opt=$TOOLCHAIN/bin/opt \
    194     --prefix=$PROJDIR \
     207        --prefix=$PROJDIR \
    195208    CONF_CC_OPTS_STAGE1="-fPIC -fPIE -pie" \
    196209    CONF_GCC_LINKER_OPTS_STAGE1="-fPIC -fPIE -pie" \
     
    201214}}}
    202215
    203 NOTE: There's an issue with `--with-clang` there, which I'll explain in a minute.
     216//CLANG