Skip to content

meson.build: Enable PIC in x86 assembly code#3831

Merged
BenzhengZhang merged 1 commit intocisco:masterfrom
kraj:kraj/meson-picasm
Jan 26, 2025
Merged

meson.build: Enable PIC in x86 assembly code#3831
BenzhengZhang merged 1 commit intocisco:masterfrom
kraj:kraj/meson-picasm

Conversation

@kraj
Copy link
Copy Markdown
Contributor

@kraj kraj commented Jan 8, 2025

This is needed especially when using asm code and nasm assembler to compile it.

Fixes build errors e.g.

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/satd_sad.o)
>>> referenced by ../git/codec/common/x86/satd_sad.asm
>>>               libcommon.a.p/satd_sad.o:(.text+0x1CB8) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/mc_chroma.o)
>>> referenced by ../git/codec/common/x86/mc_chroma.asm
>>>               libcommon.a.p/mc_chroma.o:(.text+0x7D) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/mc_luma.o)
>>> referenced by ../git/codec/common/x86/mc_luma.asm
>>>               libcommon.a.p/mc_luma.o:(.text+0x1F) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/processing/libprocessing.a(libprocessing.a.p/denoisefilter.o)
>>> referenced by ../git/codec/processing/src/x86/denoisefilter.asm
>>>               libprocessing.a.p/denoisefilter.o:(.text+0x1B) in archive codec/processing/libprocessing.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/processing/libprocessing.a(libprocessing.a.p/denoisefilter.o)
>>> referenced by ../git/codec/processing/src/x86/denoisefilter.asm
>>>               libprocessing.a.p/denoisefilter.o:(.text+0x345) in archive codec/processing/libprocessing.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/processing/libprocessing.a(libprocessing.a.p/downsample_bilinear.o)
>>> referenced by ../git/codec/processing/src/x86/downsample_bilinear.asm
>>>               libprocessing.a.p/downsample_bilinear.o:(.text+0x70A) in archive codec/processing/libprocessing.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/satd_sad.o)
>>> referenced by ../git/codec/common/x86/satd_sad.asm
>>>               libcommon.a.p/satd_sad.o:(.text+0x1CC0) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/mc_chroma.o)
>>> referenced by ../git/codec/common/x86/mc_chroma.asm
>>>               libcommon.a.p/mc_chroma.o:(.text+0x150) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/mc_chroma.o)
>>> referenced by ../git/codec/common/x86/mc_chroma.asm
>>>               libcommon.a.p/mc_chroma.o:(.text+0x1BF) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/deblock.o)
>>> referenced by ../git/codec/common/x86/deblock.asm
>>>               libcommon.a.p/deblock.o:(.text+0x2A) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/dct.o)
>>> referenced by ../git/codec/common/x86/dct.asm
>>>               libcommon.a.p/dct.o:(.text+0x337) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/encoder/libencoder.a(libencoder.a.p/score.o)
>>> referenced by ../git/codec/encoder/core/x86/score.asm
>>>               libencoder.a.p/score.o:(.text+0x8A) in archive codec/encoder/libencoder.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/processing/libprocessing.a(libprocessing.a.p/downsample_bilinear.o)
>>> referenced by ../git/codec/processing/src/x86/downsample_bilinear.asm
>>>               libprocessing.a.p/downsample_bilinear.o:(.text+0x712) in archive codec/processing/libprocessing.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/dct.o)
>>> referenced by ../git/codec/common/x86/dct.asm
>>>               libcommon.a.p/dct.o:(.text+0x34D) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/satd_sad.o)
>>> referenced by ../git/codec/common/x86/satd_sad.asm
>>>               libcommon.a.p/satd_sad.o:(.text+0x1CC8) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/dct.o)
>>> referenced by ../git/codec/common/x86/dct.asm
>>>               libcommon.a.p/dct.o:(.text+0x355) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/mc_luma.o)
>>> referenced by ../git/codec/common/x86/mc_luma.asm
>>>               libcommon.a.p/mc_luma.o:(.text+0x131) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/dct.o)
>>> referenced by ../git/codec/common/x86/dct.asm
>>>               libcommon.a.p/dct.o:(.text+0x366) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/mc_luma.o)
>>> referenced by ../git/codec/common/x86/mc_luma.asm
>>>               libcommon.a.p/mc_luma.o:(.text+0x1D1) in archive codec/common/libcommon.a

i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in codec/common/libcommon.a(libcommon.a.p/dct.o)
>>> referenced by ../git/codec/common/x86/dct.asm
>>>               libcommon.a.p/dct.o:(.text+0x37C) in archive codec/common/libcommon.a

This is needed especially when using asm code and  nasm
assembler to compile it.
@BenzhengZhang BenzhengZhang merged commit c42fa04 into cisco:master Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants