ld:无法识别的选项'-Wl,-O1'

问题描述 投票:0回答:1

为perl的libmoose模块编写了一个新的配方,发现以下错误,有人可以帮忙修复它吗?

| x86_64-poky-linux-ld:无法识别的选项“-Wl,-O1” | x86_64-poky-linux-ld:使用 --help 选项获取使用信息 |无法执行 x86_64-poky-linux-ld --sysroot=/yocto/build/tmp/sysroots/intel HASCOMPILERBD9Y/TESTyyC p.o -o HASCOMPILERBD9Y/TESTyyCp.so -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector -shared :不适当的 ioctl 对于 Makefile.PL 第 12 行的设备。 |该发行版需要 Makefile.PL 第 12 行有一个可以工作的编译器。 |警告:/yocto/build/tmp/work/core2-64-poky-linux/libmoose-perl/2.2014-r0/temp/run.do_configure.18534:1 $xit 25 来自 'perl Makefile.PL INSTALLDIRS=vendor'

这是我的食谱:

    SUMMARY = "Moose - modern Perl object system framework"
DESCRIPTION = "Moose is an extension of the Perl 5 object system. The main goal of Moose is to make Perl 5 Object Oriented programming easier, more consistent, and less tedious. With Moose you can think more about what you want to do and less about the mechanics of OOP."

    SECTION = "libs"
    
    HOMEPAGE = "http://metapan.org/release/Moo/"
    
    LICENSE = "Artistic-1.0 | GPL-1.0+"
    LIC_FILES_CHKSUM = "file://LICENSE;md5=076f703723ade0a7205509c2b8d87fc2"
    
    
    SRC_URI = "${CPAN_MIRROR}/authors/id/E/ET/ETHER/Moose-${PV}.tar.gz"
    
    SRC_URI[md5sum] = "6d1e84977bc2a7d0e1111e16822fc250"
    SRC_URI[sha256sum] = "33c75c11143d1943be9be61bb37e134fe4b0a316fa4494a380a2e3dd416f116a"
    
    S = "${WORKDIR}/Moose-${PV}"
    
    inherit cpan
perl makefile yocto ldflags
1个回答
0
投票

-WL 并不意味着传递给链接器。它应该由编译器 gcc 处理。 这样做:

export LD=x86_64-poky-linux-gcc

./configure <your-usual-options>

make

© www.soinside.com 2019 - 2024. All rights reserved.