commit:     10cd51b1cac70e3f180a04b2e9ea3c6eb46150fd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  9 02:39:38 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan  9 02:39:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10cd51b1

app-shells/ksh: clean up flag handling

* Filter LTO instead of just -Wno-erroring things indicating it's unsafe
* Try to respect CC/AR/NM more

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-shells/ksh/ksh-1.0.8.ebuild |  9 ++++-----
 app-shells/ksh/ksh-9999.ebuild  | 11 +++++------
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/app-shells/ksh/ksh-1.0.8.ebuild b/app-shells/ksh/ksh-1.0.8.ebuild
index 4cda30c54705..c97a769209a6 100644
--- a/app-shells/ksh/ksh-1.0.8.ebuild
+++ b/app-shells/ksh/ksh-1.0.8.ebuild
@@ -40,18 +40,17 @@ src_compile() {
                "-Wno-unused-but-set-variable"
                "-Wno-cpp"
                "-Wno-maybe-uninitialized"
-               "-Wno-lto-type-mismatch"
-               "-Wno-error=int-conversion"
-               "-Wno-int-conversion"
                "-P"
        )
        append-cflags $(test-flags-CC ${extraflags[@]})
+       append-cflags -fno-strict-aliasing
        filter-flags '-fdiagnostics-color=always' # 
https://github.com/ksh93/ksh/issues/379
-       export CCFLAGS="${CFLAGS} -fno-strict-aliasing"
+       filter-lto
 
+       export CCFLAGS="${CFLAGS}"
        tc-export AR CC LD NM
 
-       sh bin/package make SHELL="${BROOT}"/bin/sh || die
+       sh bin/package make AR="${AR}" CC="${CC}" NM="${NM}" 
SHELL="${BROOT}"/bin/sh || die
 }
 
 src_test() {

diff --git a/app-shells/ksh/ksh-9999.ebuild b/app-shells/ksh/ksh-9999.ebuild
index f59df92a2e4a..c97a769209a6 100644
--- a/app-shells/ksh/ksh-9999.ebuild
+++ b/app-shells/ksh/ksh-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2022 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -40,18 +40,17 @@ src_compile() {
                "-Wno-unused-but-set-variable"
                "-Wno-cpp"
                "-Wno-maybe-uninitialized"
-               "-Wno-lto-type-mismatch"
-               "-Wno-error=int-conversion"
-               "-Wno-int-conversion"
                "-P"
        )
        append-cflags $(test-flags-CC ${extraflags[@]})
+       append-cflags -fno-strict-aliasing
        filter-flags '-fdiagnostics-color=always' # 
https://github.com/ksh93/ksh/issues/379
-       export CCFLAGS="${CFLAGS} -fno-strict-aliasing"
+       filter-lto
 
+       export CCFLAGS="${CFLAGS}"
        tc-export AR CC LD NM
 
-       sh bin/package make SHELL="${BROOT}"/bin/sh || die
+       sh bin/package make AR="${AR}" CC="${CC}" NM="${NM}" 
SHELL="${BROOT}"/bin/sh || die
 }
 
 src_test() {

Reply via email to