Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC
Date: Wed, 1 Mar 2017 20:52:27 +0100	[thread overview]
Message-ID: <82dda896-2811-a049-ff52-23b06ce2015a@gmail.com> (raw)
In-Reply-To: <20170301021311.GA13728@tungsten.ozlabs.ibm.com>

Hi Sam,

Le 01/03/2017 ? 03:13, Sam Bobroff a ?crit :
> On Wed, Mar 01, 2017 at 12:24:52AM +0100, Romain Naour wrote:
>> As reported in this bug report [1], altivec support in SDL break
>> arbitrary C++ code.
>>
>> Issue reported by test-pkg script while testing supertux package:
>>     error: could not convert 'true' from 'bool' to '__vector(4) __bool int'
>>
>> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670
>>
>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>> Cc: Sam Bobroff <sam.bobroff@au1.ibm.com>
> 
> Hi Romain,
> 
> If you want to keep alitvec support on you can probably work around this
> problem by using -std=gnu99 (which I used for mpv, see
> package/mpv/0002-fix-powerpc64-altivec.patch).

Thanks for the help!

But the error come from a C++ build :
In file included from
output/build/supertux-0.5.1/external/tinygettext/src/dictionary_manager.cpp:30:0:
output/build/supertux-0.5.1/external/tinygettext/include/tinygettext/po_parser.hpp:50:96:
error: could not convert ?true? from ?bool? to ?__vector(4) __bool int?
   POParser(const std::string& filename, std::istream& in_, Dictionary& dict_,
bool use_fuzzy = true);

What do you think about removing altivec.h from SDL_cpuinfo.h as suggested in
the bug report ?

Otherwise, I'm not using a powerpc so we can keep altivec support disabled for
now...

Best regards,
Romain

> 
> Cheers,
> Sam.
> 
>> ---
>>  package/sdl2/sdl2.mk | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/package/sdl2/sdl2.mk b/package/sdl2/sdl2.mk
>> index d2ee50d..628d906 100644
>> --- a/package/sdl2/sdl2.mk
>> +++ b/package/sdl2/sdl2.mk
>> @@ -23,6 +23,16 @@ SDL2_CONF_OPTS += \
>>  # We must enable static build to get compilation successful.
>>  SDL2_CONF_OPTS += --enable-static
>>  
>> +# From https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670
>> +# "The problem lies within SDL_cpuinfo.h.  It includes altivec.h, which by
>> +# definition provides an unconditional vector, pixel and bool define in
>> +# standard-c++ mode.  In GNU-c++ mode this names are only defined
>> +# context-sensitive by cpp.  SDL_cpuinfo.h is included by SDL.h.
>> +# Including altivec.h makes arbitrary code break."
>> +ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
>> +SDL2_CONF_OPTS += --disable-altivec
>> +endif
>> +
>>  ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
>>  SDL2_DEPENDENCIES += udev
>>  SDL2_CONF_OPTS += --enable-libudev
>> -- 
>> 2.9.3
> 

  reply	other threads:[~2017-03-01 19:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28 23:24 [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC Romain Naour
2017-02-28 23:24 ` [Buildroot] [PATCH v2 2/2] package/supertux: new package Romain Naour
2017-03-01 21:58   ` Romain Naour
2017-03-01  2:13 ` [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC Sam Bobroff
2017-03-01 19:52   ` Romain Naour [this message]
2017-03-03  2:16     ` Sam Bobroff
2017-03-05 21:53       ` Romain Naour
2017-03-01 20:54 ` Thomas Petazzoni

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=82dda896-2811-a049-ff52-23b06ce2015a@gmail.com \
    --to=romain.naour@gmail.com \
    --cc=buildroot@busybox.net \
    /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