Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Giulio Benetti <giulio.benetti@benettiengineering.com>
Cc: Matt Weber <matthew.weber@collins.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/ace: fix build failure due to gcc bug 101915
Date: Sun, 14 Aug 2022 15:33:31 +0200	[thread overview]
Message-ID: <20220814133331.GA2775145@scaer> (raw)
In-Reply-To: <20220814033253.575354-1-giulio.benetti@benettiengineering.com>

Giulio, All,

On 2022-08-14 05:32 +0200, Giulio Benetti spake thusly:
> The ace package exhibits gcc bug 101915 when built for the Microblaze
> architecture with optimization enabled, which causes a build failure.
> 
> As done for other packages in Buildroot work around this gcc bug by
> setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_101915=y.
> 
> Fixes:
> http://autobuild.buildroot.net/results/f8f/f8f8de99abe92175954c370ad99fee43942bcdcc/
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  package/ace/ace.mk | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/package/ace/ace.mk b/package/ace/ace.mk
> index 7299f0d40c..6f381d5da5 100644
> --- a/package/ace/ace.mk
> +++ b/package/ace/ace.mk
> @@ -17,9 +17,18 @@ ACE_CPE_ID_PRODUCT = adaptive_communication_environment
>  # Only compiling ACE libraries (no TAO)
>  ACE_LIBARIES = ace ACEXML Kokyu netsvcs protocols/ace
>  
> +ACE_CPPFLAGS = $(TARGET_CPPFLAGS)
> +
> +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_101915),y)
> +ACE_CPPFLAGS += -O0
> +endif
> +
> +# ace requires -std=c++11
> +ACE_CPPFLAGS += -std=c++11

There's no reason to have this unconditional append-assignment, so I
moved is to the initial assignment, above.

>  ACE_MAKE_OPTS = \
>  	ACE_ROOT="$(@D)" \
> -	DEFFLAGS="$(TARGET_CPPFLAGS) -std=c++11"
> +	DEFFLAGS="$(ACE_CPPFLAGS)"

So, I was very surprised to see C++ flags to be passed via CPPFLAGS.
CPPFLAGS contain the C and C++ pre-processor flags, not the C++ flags,
so it looks fishy...

And indeed, ACE's GNUmakefile states that DEFFLAGS are the C++
pre-processor flags.

But we're lucky that the C++ pre=processor flags are appended to the
compile command, so it turns out to be OK.

However, this is very misleading.

So, I've pushed out a follow-up change that adds a little comment to
avoid further head-scratchig in the future...

Applied to master, thanks.

Regards,
Yann E. MORIN.

>  ifeq ($(BR2_PACKAGE_OPENSSL),y)
>  ACE_LIBARIES += ace/SSL
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-08-14 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-14  3:32 [Buildroot] [PATCH] package/ace: fix build failure due to gcc bug 101915 Giulio Benetti
2022-08-14 13:33 ` Yann E. MORIN [this message]
2022-09-15  9:46 ` Peter Korsgaard

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=20220814133331.GA2775145@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=matthew.weber@collins.com \
    /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