Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 859553 - sys-fs/vhba ignores Clang and fails to build
Summary: sys-fs/vhba ignores Clang and fails to build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-07-20 14:28 UTC by xleb
Modified: 2023-05-30 15:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,3.65 KB, text/x-log)
2022-07-20 14:28 UTC, xleb
Details
emerge --info (emerge_info,8.93 KB, text/plain)
2022-07-20 14:29 UTC, xleb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xleb 2022-07-20 14:28:35 UTC
Created attachment 792581 [details]
build log

I've built the kernel with Clang and now I can't build this package because it defaults to GCC while trying to use Clang specific flags 
Clang is set to be the compiler for the package in /etc/portage/package.env and /etc/portage/env/ but it still defaults to GCC

In short this is what happens

 * Preparing vhba module
make -j3 -l3 HOSTCC=clang 'LDFLAGS=-m elf_x86_64' KDIR=/usr/src/linux modules 
make -C /usr/src/linux M=/var/tmp/portage/sys-fs/vhba-20211218/work/vhba-module-20211218 modules
make[1]: Entering directory '/usr/src/linux-5.18.11-xanmod'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: clang version 14.0.4
  You are using:           x86_64-pc-linux-gnu-gcc (Gentoo 11.3.0 p5) 11.3.0
  CC [M]  /var/tmp/portage/sys-fs/vhba-20211218/work/vhba-module-20211218/vhba.o
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option ‘-Qunused-arguments’
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option ‘-mretpoline-external-thunk’
x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option ‘-fsplit-lto-unit’
make[2]: *** [scripts/Makefile.build:288: /var/tmp/portage/sys-fs/vhba-20211218/work/vhba-module-20211218/vhba.o] Error 1
make[1]: *** [Makefile:1839: /var/tmp/portage/sys-fs/vhba-20211218/work/vhba-module-20211218] Error 2
make[1]: Leaving directory '/usr/src/linux-5.18.11-xanmod'
make: *** [Makefile:14: modules] Error 2
 * ERROR: sys-fs/vhba-20211218::gentoo failed (compile phase):
 *   emake failed

Including build.log and --info
Comment 1 xleb 2022-07-20 14:29:03 UTC
Created attachment 792584 [details]
emerge --info
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-05-11 15:47:06 UTC

*** This bug has been marked as a duplicate of bug 816024 ***
Comment 3 Larry the Git Cow gentoo-dev 2023-05-30 15:14:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=337727f10b6b7e6bf23caf0bb6bd89cf258686a6

commit 337727f10b6b7e6bf23caf0bb6bd89cf258686a6
Author:     Brahmajit Das <brahmajit.xyz@gmail.com>
AuthorDate: 2023-05-30 05:57:54 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2023-05-30 15:14:13 +0000

    sys-fs/vhba: update EAPI 7 -> 8 and porting to linux-mod-r1
    
    Closes: https://bugs.gentoo.org/859553
    Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/31224
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-fs/vhba/vhba-20211218-r2.ebuild | 58 +++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)