0004-Use-gnu-11-standard-to-prevent-errors-on-PPC.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From 6946a491cae42b971aad3bc5d822e0e549eca8bd Mon Sep 17 00:00:00 2001
  2. From: Sergio Prado <sergio.prado@e-labworks.com>
  3. Date: Thu, 1 Dec 2016 15:20:33 -0200
  4. Subject: [PATCH] Use gnu++11 standard to prevent errors on PPC.
  5. PPC altivec vectorization triggers a bug when compiling with -std=c++11
  6. because "bool" is redefined in altivec.h.
  7. Acording to a bug report in GCC, "You need to use -std=g++11 or
  8. undefine bool after the include of altivec.h as context sensitive
  9. keywords is not part of the C++11 standard".
  10. So let's use gnu++11 standard.
  11. Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
  12. ---
  13. Makefile | 2 +-
  14. 1 file changed, 1 insertion(+), 1 deletion(-)
  15. diff --git a/Makefile b/Makefile
  16. index 6dd0129587b3..6ed50ea4c335 100644
  17. --- a/Makefile
  18. +++ b/Makefile
  19. @@ -51,7 +51,7 @@ else
  20. endif
  21. CXXFLAGS+= -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers
  22. ifdef HAVE_GCC
  23. - CXXFLAGS+= -Wno-multichar -Wunused -fno-rtti -Woverloaded-virtual -Wnon-virtual-dtor -std=c++11
  24. + CXXFLAGS+= -Wno-multichar -Wunused -fno-rtti -Woverloaded-virtual -Wnon-virtual-dtor -std=gnu++11
  25. endif
  26. ifdef PROFILE
  27. --
  28. 1.9.1