diff options
author | Hans de Graaff <graaff@gentoo.org> | 2021-11-19 11:01:15 +0100 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2021-11-19 11:07:53 +0100 |
commit | f02edc97cad6e965ddf85db2af4b978c732f13ab (patch) | |
tree | c2a9a1065e79aadb65d7eb84ecac565dfb283e68 /eclass | |
parent | dev-libs/qtkeychain: Drop 0.13.1 (diff) | |
download | gentoo-f02edc97cad6e965ddf85db2af4b978c732f13ab.tar.gz gentoo-f02edc97cad6e965ddf85db2af4b978c732f13ab.tar.bz2 gentoo-f02edc97cad6e965ddf85db2af4b978c732f13ab.zip |
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@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ruby-fakegem.eclass | 4 |
1 files 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 |