Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 595950

Summary: sys-libs/musl: getconf getent and iconv don't listen to CPPFLAGS/LDFLAGS
Product: Gentoo Linux Reporter: Laine Gholson <laine.gholson>
Component: Current packagesAssignee: Anthony Basile <blueness>
Status: RESOLVED FIXED    
Severity: enhancement CC: blueness, lu_zero, toolchain, tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    

Description Laine Gholson 2016-10-02 16:39:21 UTC
see title
Comment 1 Felix Janda 2016-10-02 22:22:22 UTC
Sorry for hijacking this bug, but one way (not the most obvious one...)
to fix this would be to package these utilities separately from musl.
The way they are currently packaged causes warnings from the `unpack`
command, and it seems[1] also that there is demand for man pages. I've
put an RFC package to [2].

@blueness, what do you think?

[1]: https://github.com/lluixhi/musl-extras/tree/master/sys-libs/musl/files
[2]: https://github.com/doughdemon/musl-extra-bin
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2019-10-20 20:22:44 UTC
(In reply to Michael 'veremitz' Everitt from comment #2)
> Fixed in
> https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-libs/
> musl?id=9188802088bd9616e71d23dce350f5a278b6f686 I believe.

It literally says:
> +	$(tc-getCC) ${CFLAGS} "${DISTDIR}"/getconf.c -o "${T}"/getconf
> +	$(tc-getCC) ${CFLAGS} "${DISTDIR}"/getent.c -o "${T}"/getent
> +	$(tc-getCC) ${CFLAGS} "${DISTDIR}"/iconv.c -o "${T}"/iconv

There is no CPPFLAGS or LDFLAGS passing.
Comment 4 Jory A. Pratt gentoo-dev 2020-05-21 00:32:52 UTC
(In reply to Sergei Trofimovich from comment #3)
> (In reply to Michael 'veremitz' Everitt from comment #2)
> > Fixed in
> > https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-libs/
> > musl?id=9188802088bd9616e71d23dce350f5a278b6f686 I believe.
> 
> It literally says:
> > +	$(tc-getCC) ${CFLAGS} "${DISTDIR}"/getconf.c -o "${T}"/getconf
> > +	$(tc-getCC) ${CFLAGS} "${DISTDIR}"/getent.c -o "${T}"/getent
> > +	$(tc-getCC) ${CFLAGS} "${DISTDIR}"/iconv.c -o "${T}"/iconv
> 
> There is no CPPFLAGS or LDFLAGS passing.

These files are not linked for one. For two they are C files hense CFLAGS and not CPPFLAGS. This bug has been fixed.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2020-05-21 06:45:53 UTC
(In reply to Jory A. Pratt from comment #4)
> (In reply to Sergei Trofimovich from comment #3)
> > (In reply to Michael 'veremitz' Everitt from comment #2)
> > > Fixed in
> > > https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-libs/
> > > musl?id=9188802088bd9616e71d23dce350f5a278b6f686 I believe.
> > 
> > It literally says:
> > > +	$(tc-getCC) ${CFLAGS} "${DISTDIR}"/getconf.c -o "${T}"/getconf
> > > +	$(tc-getCC) ${CFLAGS} "${DISTDIR}"/getent.c -o "${T}"/getent
> > > +	$(tc-getCC) ${CFLAGS} "${DISTDIR}"/iconv.c -o "${T}"/iconv
> > 
> > There is no CPPFLAGS or LDFLAGS passing.
> 
> These files are not linked for one.

What do you mean by "not linked"? 'gcc a.c -o a' compiles and links an executable file.

They are even installed in src_install():
    dobin "${T}"/getconf
    dobin "${T}"/getent
    dobin "${T}"/iconv

> For two they are C files hense CFLAGS and not CPPFLAGS.

CPPFLAGS are C preprocessor's flags. default make's rule (say, documented in 'info make') is a good example to copy which does use CPPFLAGS:

     %.o: %.c
             $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

> This bug has been fixed.

I don't think so.
Comment 6 Anthony Basile gentoo-dev 2020-05-23 15:58:06 UTC
(In reply to Sergei Trofimovich from comment #5)
> (In reply to Jory A. Pratt from comment #4)
> > (In reply to Sergei Trofimovich from comment #3)
> > > (In reply to Michael 'veremitz' Everitt from comment #2)
> > > > Fixed in
> > > > https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-libs/
> > > > musl?id=9188802088bd9616e71d23dce350f5a278b6f686 I believe.
> > > 
> > > It literally says:
> > > > +	$(tc-getCC) ${CFLAGS} "${DISTDIR}"/getconf.c -o "${T}"/getconf
> > > > +	$(tc-getCC) ${CFLAGS} "${DISTDIR}"/getent.c -o "${T}"/getent
> > > > +	$(tc-getCC) ${CFLAGS} "${DISTDIR}"/iconv.c -o "${T}"/iconv
> > > 
> > > There is no CPPFLAGS or LDFLAGS passing.
> > 
> > These files are not linked for one.
> 
> What do you mean by "not linked"? 'gcc a.c -o a' compiles and links an
> executable file.
> 
> They are even installed in src_install():
>     dobin "${T}"/getconf
>     dobin "${T}"/getent
>     dobin "${T}"/iconv
> 
> > For two they are C files hense CFLAGS and not CPPFLAGS.
> 
> CPPFLAGS are C preprocessor's flags. default make's rule (say, documented in
> 'info make') is a good example to copy which does use CPPFLAGS:
> 
>      %.o: %.c
>              $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
> 
> > This bug has been fixed.
> 
> I don't think so.


Feel free to add

$(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} ...
Comment 7 Larry the Git Cow gentoo-dev 2020-05-25 09:22:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=095fbdbb6f191d8d55b838023395651b2b2befc9

commit 095fbdbb6f191d8d55b838023395651b2b2befc9
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-05-25 09:20:51 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-05-25 09:22:44 +0000

    sys-libs/musl: use CFLAGS,CPPFLAGS,LDFLAGS, bug #595950
    
    Reported-by: Laine Gholson
    Closes: https://bugs.gentoo.org/595950
    Package-Manager: Portage-2.3.100, Repoman-2.3.22
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-libs/musl/musl-1.2.0-r1.ebuild | 129 +++++++++++++++++++++++++++++++++++++
 sys-libs/musl/musl-9999.ebuild     |  11 ++--
 2 files changed, 136 insertions(+), 4 deletions(-)