public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Adrian Ratiu <adrian.ratiu@collabora.com>
To: gentoo-dev@lists.gentoo.org
Cc: vapier@chromium.org, Lars Wendler <polynomial-c@gentoo.org>,
	Sam James <sam@gentoo.org>
Subject: [gentoo-dev] [PATCH] media-libs/freetype: fix GCC usage during configure
Date: Fri,  7 Jan 2022 15:08:13 +0200	[thread overview]
Message-ID: <20220107130813.1655260-1-adrian.ratiu@collabora.com> (raw)

If $CC_BUILD is not set, configure defaults to GCC for some
of its tests causing clang builds to use a mixture of the
two compilers instead of using just clang consistently.

Here is an example before and after setting CC_BUILD (this
is actually from ChromiumOS where this was first detected).

before:

checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for x86_64-pc-linux-gnu-gcc... (cached) x86_64-pc-linux-gnu-gcc
checking for x86_64-pc-linux-gnu-gcc... (cached) x86_64-pc-linux-gnu-gcc
checking for suffix of native executables...

after:

checking for x86_64-pc-linux-gnu-gcc... x86_64-cros-linux-gnu-clang
checking for x86_64-pc-linux-gnu-gcc... (cached) x86_64-cros-linux-gnu-clang
checking for x86_64-pc-linux-gnu-gcc... (cached) x86_64-cros-linux-gnu-clang
checking for suffix of native executables...

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
---
 media-libs/freetype/freetype-2.11.0-r1.ebuild | 2 ++
 media-libs/freetype/freetype-2.11.0-r2.ebuild | 2 ++
 media-libs/freetype/freetype-2.11.1.ebuild    | 2 ++
 media-libs/freetype/freetype-9999.ebuild      | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/media-libs/freetype/freetype-2.11.0-r1.ebuild b/media-libs/freetype/freetype-2.11.0-r1.ebuild
index b4e9e81a703..c9d88a7e108 100644
--- a/media-libs/freetype/freetype-2.11.0-r1.ebuild
+++ b/media-libs/freetype/freetype-2.11.0-r1.ebuild
@@ -203,6 +203,8 @@ multilib_src_configure() {
 		*) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;;
 	esac
 
+	export CC_BUILD="$(tc-getBUILD_CC)"
+
 	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }
 
diff --git a/media-libs/freetype/freetype-2.11.0-r2.ebuild b/media-libs/freetype/freetype-2.11.0-r2.ebuild
index 658322e92af..27f4cfde1ab 100644
--- a/media-libs/freetype/freetype-2.11.0-r2.ebuild
+++ b/media-libs/freetype/freetype-2.11.0-r2.ebuild
@@ -204,6 +204,8 @@ multilib_src_configure() {
 		*) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;;
 	esac
 
+	export CC_BUILD="$(tc-getBUILD_CC)"
+
 	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }
 
diff --git a/media-libs/freetype/freetype-2.11.1.ebuild b/media-libs/freetype/freetype-2.11.1.ebuild
index d0c71e729b9..7e891890302 100644
--- a/media-libs/freetype/freetype-2.11.1.ebuild
+++ b/media-libs/freetype/freetype-2.11.1.ebuild
@@ -195,6 +195,8 @@ multilib_src_configure() {
 		*) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;;
 	esac
 
+	export CC_BUILD="$(tc-getBUILD_CC)"
+
 	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }
 
diff --git a/media-libs/freetype/freetype-9999.ebuild b/media-libs/freetype/freetype-9999.ebuild
index d0c71e729b9..7e891890302 100644
--- a/media-libs/freetype/freetype-9999.ebuild
+++ b/media-libs/freetype/freetype-9999.ebuild
@@ -195,6 +195,8 @@ multilib_src_configure() {
 		*) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;;
 	esac
 
+	export CC_BUILD="$(tc-getBUILD_CC)"
+
 	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }
 
-- 
2.34.1



             reply	other threads:[~2022-01-07 13:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07 13:08 Adrian Ratiu [this message]
2022-01-08  5:12 ` [gentoo-dev] Mailing list for ebuild patches? (Was: Re: [PATCH] media-libs/freetype: fix GCC usage during configure) Sam James
2022-01-08  6:15   ` Anna Vyalkova
2022-01-17 16:10   ` Joonas Niilola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220107130813.1655260-1-adrian.ratiu@collabora.com \
    --to=adrian.ratiu@collabora.com \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=polynomial-c@gentoo.org \
    --cc=sam@gentoo.org \
    --cc=vapier@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox