commit: f02edc97cad6e965ddf85db2af4b978c732f13ab Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> AuthorDate: Fri Nov 19 10:01:15 2021 +0000 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> CommitDate: Fri Nov 19 10:07:53 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f02edc97
eclass/ruby-fakegem.eclass: fix CFLAGS and LDFLAGS for extensions Set the CFLAGS and LDFLAGS for extensions using the mkmf options during configuration. This ensures that the flags are correctly set in the Makefile and we don't need to second-guess any further actions of extensions themselves, leading to breakage that is hard to work around. Closes: https://bugs.gentoo.org/823730 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org> eclass/ruby-fakegem.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass index a907a12831b5..1ef40aa2fad9 100644 --- a/eclass/ruby-fakegem.eclass +++ b/eclass/ruby-fakegem.eclass @@ -411,7 +411,7 @@ EOF each_fakegem_configure() { tc-export PKG_CONFIG for extension in "${RUBY_FAKEGEM_EXTENSIONS[@]}" ; do - CC=$(tc-getCC) ${RUBY} --disable=did_you_mean -C ${extension%/*} ${extension##*/} ${RUBY_FAKEGM_EXTENSION_OPTIONS} || die + CC=$(tc-getCC) ${RUBY} --disable=did_you_mean -C ${extension%/*} ${extension##*/} --with-cflags="${CFLAGS}" --with-ldflags="${LDFLAGS}" ${RUBY_FAKEGM_EXTENSION_OPTIONS} || die done } @@ -448,7 +448,7 @@ all_fakegem_compile() { # Compile extensions defined in RUBY_FAKEGEM_EXTENSIONS, if any. each_fakegem_compile() { for extension in "${RUBY_FAKEGEM_EXTENSIONS[@]}" ; do - emake V=1 -C ${extension%/*} CFLAGS="${CFLAGS} -fPIC" archflag="${LDFLAGS}" + emake V=1 -C ${extension%/*} mkdir -p "${RUBY_FAKEGEM_EXTENSION_LIBDIR%/}" cp "${extension%/*}"/*$(get_modname) "${RUBY_FAKEGEM_EXTENSION_LIBDIR%/}/" || die "Copy of extension into ${RUBY_FAKEGEM_EXTENSION_LIBDIR} failed" done
