riscv64-unknown-elf-ld.bfd: -pie not supported



  • 出现的问题描述

    我在编译uboot时报错
    riscv64-unknown-elf-ld.bfd -pie
    riscv64-unknown-elf-ld.bfd: -pie not supported
    ——————————————
    root@home:/mnt/d/project/u-boot-master# make ARCH=riscv CROSS_COMPILE=$CROSS_COMPILE
    CHK include/config/uboot.release
    CHK include/generated/version_autogenerated.h
    CHK include/generated/timestamp_autogenerated.h
    UPD include/generated/timestamp_autogenerated.h
    CHK include/generated/generic-asm-offsets.h
    CHK include/generated/asm-offsets.h
    HOSTCC tools/mkenvimage.o
    HOSTLD tools/mkenvimage
    HOSTCC tools/dumpimage.o
    HOSTLD tools/dumpimage
    HOSTCC tools/mkimage.o
    HOSTLD tools/mkimage
    CC cmd/version.o
    CHK cmd/config_data_gz.h
    CHK cmd/config_data_size.h
    LD cmd/built-in.o
    CC common/main.o
    LD common/built-in.o
    CC lib/smbios.o
    CC lib/display_options.o
    LD lib/built-in.o
    LD u-boot
    riscv64-unknown-elf-ld.bfd: -pie not supported
    Makefile:1701: recipe for target 'u-boot' failed
    make: *** [u-boot] Error 1
    root@home:/mnt/d/project/u-boot-master# riscv64-unknown-elf-gcc -v
    Using built-in specs.

    复现方法

    riscv64-unknown-elf-ld.bfd -pie
    riscv64-unknown-elf-ld.bfd: -pie not supported

    OS

    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.4 LTS
    Release: 18.04
    Codename: bionic