summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatoro Mahri <matoro_gentoo@matoro.tk>2023-12-06 01:24:05 -0500
committerSam James <sam@gentoo.org>2023-12-14 04:20:40 +0000
commit42c3c45c2ae81d83676fa8573ee531ae21400fa1 (patch)
tree05a107d33776c2b24ced2fa9a1c81b9bd84ab10c /dev-lang/cfortran
parentprofiles/arch/mips: mask media-libs/libvpx (diff)
downloadgentoo-42c3c45c2ae81d83676fa8573ee531ae21400fa1.tar.gz
gentoo-42c3c45c2ae81d83676fa8573ee531ae21400fa1.tar.bz2
gentoo-42c3c45c2ae81d83676fa8573ee531ae21400fa1.zip
dev-lang/cfortran: add -fcommon to CFLAGS for tests
In the failing test, both the Fortran code and the C code have a symbol called _fcb. The test expects it to be in the common section in both objects, such that when it gets linked, they both refer to the same symbol, such that changes on the C side to the variable are reflected on the Fortran side and vice versa. However with -fno-common then it's still placed in the common section in Fortran, but in C it's placed in the BSS section, so now they refer to different objects. The linker actually emits a warning for this, something like "alignment 1 is less than 16". When there are two symbols in different sections with the same name, this is an ODR violation which is UB on all platforms. Bug: https://bugs.gentoo.org/899452 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Closes: https://github.com/gentoo/gentoo/pull/34143 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/cfortran')
-rw-r--r--dev-lang/cfortran/cfortran-20210827.ebuild1
1 files changed, 1 insertions, 0 deletions
diff --git a/dev-lang/cfortran/cfortran-20210827.ebuild b/dev-lang/cfortran/cfortran-20210827.ebuild
index feadc03d0c45..d001f52cea3b 100644
--- a/dev-lang/cfortran/cfortran-20210827.ebuild
+++ b/dev-lang/cfortran/cfortran-20210827.ebuild
@@ -41,6 +41,7 @@ src_prepare() {
src_configure() {
use sparc && append-fflags $(test-flags-FC -fno-store-merging -fno-tree-slp-vectorize) # bug 818400
+ append-cflags $(test-flags-CC -fcommon) # bug 899452
default
}