Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 588076 - dev-libs/klibc-2.0.4 USE=-custom-cflags don't respect own default flags
Summary: dev-libs/klibc-2.0.4 USE=-custom-cflags don't respect own default flags
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at if you want to take care of it
Keywords: NeedPatch
Depends on:
Reported: 2016-07-05 16:36 UTC by Denis Kaganovich
Modified: 2021-04-14 16:12 UTC (History)
0 users

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

klibc keep default CFLAGS (klibc-nocustom-cflags.patch,975 bytes, patch)
2016-07-05 16:41 UTC, Denis Kaganovich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Kaganovich 2016-07-05 16:36:50 UTC
dev-libs/klibc-2.0.4 USE=-custom-cflags build with CFLAGS (amd64: "-Os -fno-ident -fomit-frame-pointer -mno-sse -falign-functions=1 -falign-jumps=1 -falign-loops=1 -fno-asynchronous-unwind-tables") replaced by "-nostdlib". Resulting code is near +500M.
Comment 1 Denis Kaganovich 2016-07-05 16:41:33 UTC
Created attachment 439798 [details, diff]
klibc keep default CFLAGS
Comment 2 Pacho Ramos gentoo-dev 2016-08-12 13:50:25 UTC
do you want to proxy maintain this?
Comment 3 Nikita Zlobin 2017-11-28 13:24:51 UTC
Hello. It seems, problem is in ebuild.
Just look to these emake args:
        $(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
        $(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
        $(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \

I grepped through sorces with this:
# grep -nR -e 'SKIP_' /var/calculate/tmp/portage/dev-libs/klibc-2.0.4-r3/work/klibc-2.0.4 | grep Kbuild

...and got empty output.

While e.g. HOSTCFLAGS is found only in Makefiles across all sources tree, but not more.
Comment 4 Nikita Zlobin 2017-11-28 13:28:45 UTC
So, up to current klibc version - custom-cflags USE flag was simply pointless dumb. Though i'm not exprt in that, imho fact, that some kernel kinds allow to configure CPU type to native, thus building with -march=native, would be useful to enable such feature for klibc too.
Comment 5 Nikita Zlobin 2017-11-28 21:09:10 UTC
I'm sorry for unintentional desinfo.
Did not notice own mistake, until attempt to manually run all commands from src_compile in order to reproduce bug with misfound havesyscall.h.
Comment 6 Larry the Git Cow gentoo-dev 2021-04-14 16:12:19 UTC
The bug has been closed via the following commit(s):

commit 3df1935ebf6359efe481e27a7e3c91051e15a95f
Author:     Jakov Smolic <>
AuthorDate: 2021-04-14 00:07:59 +0000
Commit:     Sam James <>
CommitDate: 2021-04-14 15:29:58 +0000

    dev-libs/klibc: Remove last-rited pkg
    Signed-off-by: Jakov Smolic <>
    Signed-off-by: Sam James <>

 dev-libs/klibc/Manifest                            |   3 -
 .../klibc/files/klibc-1.4.11-interp-flags.patch    |  13 -
 .../klibc/files/klibc-1.5.7-strip-fix-dash-s.patch |  12 -
 dev-libs/klibc/files/klibc-2.0.2-mkfifo.patch      |  15 -
 dev-libs/klibc/files/klibc-2.0.3-kernel-uapi.patch |  88 ------
 dev-libs/klibc/files/klibc.m4                      |  94 ------
 dev-libs/klibc/klibc-2.0.4-r3.ebuild               | 320 ---------------------
 dev-libs/klibc/metadata.xml                        |   5 -
 profiles/package.mask                              |   5 -
 9 files changed, 555 deletions(-)