openwrt / openwrt/packages

packr/host does not compile with clang

Open
#14,259 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Maintainer: @jefferyto
Environment: master, HOSTCC=clang , CC=clang

/home/mangix/devstuff/openwrt/staging_dir/hostpkg/lib/go-cross/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
go-gcc-helper: running clang -m64 -Wl,-z,relro -pie -o $WORK/b001/exe/a.out -rdynamic -Wl,--compress-debug-sections=zlib-gnu /home/mangix/devstuff/openwrt/tmp/go-link-643058356/go.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000000.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000001.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000002.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000003.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000004.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000005.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000006.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000007.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000008.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000009.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000010.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000011.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000012.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000013.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000014.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000015.o /home/mangix/devstuff/openwrt/tmp/go-link-643058356/000016.o -L/home/mangix/devstuff/openwrt/staging_dir/host/lib -L/home/mangix/devstuff/openwrt/staging_dir/hostpkg/lib -L/home/mangix/devstuff/openwrt/staging_dir/target-powerpc_464fp_musl/host/lib -znow -zrelro -fPIC -specs=/home/mangix/devstuff/openwrt/include/hardened-ld-pie.specs -L/home/mangix/devstuff/openwrt/staging_dir/host/lib -L/home/mangix/devstuff/openwrt/staging_dir/hostpkg/lib -L/home/mangix/devstuff/openwrt/staging_dir/target-powerpc_464fp_musl/host/lib -znow -zrelro -fPIC -specs=/home/mangix/devstuff/openwrt/include/hardened-ld-pie.specs -lpthread -L/home/mangix/devstuff/openwrt/staging_dir/host/lib -L/home/mangix/devstuff/openwrt/staging_dir/hostpkg/lib -L/home/mangix/devstuff/openwrt/staging_dir/target-powerpc_464fp_musl/host/lib -Wl,-z,now -Wl,-z,relro -fPIC -specs=/home/mangix/devstuff/openwrt/include/hardened-ld-pie.specs
clang: error: unknown argument: '-znow'
clang: error: unknown argument: '-zrelro'
clang: error: unknown argument: '-znow'
clang: error: unknown argument: '-zrelro'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure in packr/host with HOSTCC=clang and CC=clang, using the reported clang linker command as the starting point. Trace the build configuration that adds the -znow and -zrelro arguments; done means packr/host compiles successfully with clang.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.