Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 879775 - sys-libs/libstdc++-v3: possible configure breakage with Clang 16
Summary: sys-libs/libstdc++-v3: possible configure breakage with Clang 16
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard: workaround applied / legacy code
Keywords:
Depends on:
Blocks: implicit-in-configure
  Show dependency tree
 
Reported: 2022-11-04 22:16 UTC by Matt Jolly
Modified: 2024-11-02 22:29 UTC (History)
0 users

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


Attachments
clang-14.log (clang-14.log,25.40 KB, text/plain)
2022-11-04 22:16 UTC, Matt Jolly
Details
clang-15.log (clang-15.log,25.57 KB, text/plain)
2022-11-04 22:16 UTC, Matt Jolly
Details
clang.diff (clang.diff,24.05 KB, text/plain)
2022-11-04 22:16 UTC, Matt Jolly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Jolly gentoo-dev 2022-11-04 22:16:02 UTC
This package has been identified via automation as potentially impacted by upcoming Clang 16 changes.
The following have been identified as potential issues:

[-Werror,-Wimplicit-function-declaration]
[-Werror,-Wimplicit-int]

[-Werror,-Wimplicit-function-declaration]
error: call to undeclared function 'close'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
error: call to undeclared function 'getgroups'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
error: call to undeclared function 'getpagesize'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
error: call to undeclared function 'rand'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
error: call to undeclared function 'read'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
error: call to undeclared function 'umask'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
error: call to undeclared function 'unlink'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
error: call to undeclared function 'wait'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
error: call to undeclared function 'write'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
error: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
error: call to undeclared library function 'strcpy' with type 'char *(char *, const char *)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
error: call to undeclared library function 'strlen' with type 'unsigned long (const char *)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
error: call to undeclared library function 'strncmp' with type 'int (const char *, const char *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]

[-Werror,-Wimplicit-int]
error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Werror,-Wimplicit-int]
Comment 1 Matt Jolly gentoo-dev 2022-11-04 22:16:07 UTC
Created attachment 827573 [details]
clang-14.log

build log
Comment 2 Matt Jolly gentoo-dev 2022-11-04 22:16:09 UTC
Created attachment 827575 [details]
clang-15.log

build log
Comment 3 Matt Jolly gentoo-dev 2022-11-04 22:16:11 UTC
Created attachment 827577 [details]
clang.diff

build log
Comment 4 Larry the Git Cow gentoo-dev 2024-09-25 03:22:36 UTC
The bug has been closed via the following commit(s):

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

commit ac3c099a82ddf6c98eab39db95c31e7d7db5e7df
Author:     Eli Schwartz <eschwartz@gentoo.org>
AuthorDate: 2024-09-24 02:58:46 +0000
Commit:     Eli Schwartz <eschwartz@gentoo.org>
CommitDate: 2024-09-25 03:17:03 +0000

    sys-libs/libstdc++-v3: disable custom user flags entirely
    
    This is ancient brittle code -- an ancient, unmaintained version of GCC.
    It exists solely to provide access to an ancient, unmaintained version
    of libstdc++.so for ancient, unmaintained binaries that cannot be
    rebuilt.
    
    It doesn't need to be fast, or have cool CFLAGS. People shouldn't even
    be using it at all. The people who do use it care about compatibility
    more than anything else, so successfully compiling it should be taken as
    the gift that it is.
    
    With that in mind, we basically strip all flags. We preserve some
    existing logic to handle -march= values known to exist in this old gcc,
    and we continue to support -O levels, but we go no further. It's
    entirely impractical to support arbitrary flags, since every gcc release
    adds more flags that old versions don't support and then this fails
    because GCC 3's internal xgcc build cannot handle them.
    
    We also take this opportunity to add a workaround for modern C. New
    versions of GCC barf on some of the code here because it is not legal
    C99, but again, the point of this package is to provide legacy
    compatibility for ancient binaries, so... we assume if it ever worked
    before, it still works. :) Thus, suppress the errors. In order to
    suppress the errors, we make a wrapper script around the external
    compiler (not the xgcc one) so that we can apply flags that only affect
    modern compilers, and aren't parsed by xgcc which would choke on them
    due to those flags being too new.
    
    Closes: https://bugs.gentoo.org/879775
    Closes: https://bugs.gentoo.org/919184
    Closes: https://bugs.gentoo.org/832016
    Closes: https://bugs.gentoo.org/923112
    Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>

 sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r4.ebuild | 75 +++++++++++-----------
 1 file changed, 37 insertions(+), 38 deletions(-)