fdk-aac: fix build with GCC 6
authorJörg Krause <joerg.krause@embedded.rocks>
Sun, 1 May 2016 09:18:08 +0000 (11:18 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 1 May 2016 20:34:56 +0000 (22:34 +0200)
GCC 6 defaults to -std=gnu++14 instead of -std=gnu++98. The C++11 standard does
not allow "narrowing conversions" which is why building fdk-aac with GCC 6
fails:

libAACenc/src/aacEnc_rom.cpp:661:1: error: narrowing conversion of '2180108801u' from 'unsigned int' to 'FIXP_DBL {aka long int}' inside { } [-Wnarrowing]

Use '-std=gnu++98' as suggested by "Porting to GCC 6" [1].

[1] https://gcc.gnu.org/gcc-6/porting_to.html

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/fdk-aac/fdk-aac.mk

index a872c540880599aacceaa640152bbaacb84cde2d..45a3cf5e5745f7cd22bd30510445138f7ebc1582 100644 (file)
@@ -11,4 +11,7 @@ FDK_AAC_LICENSE_FILES = NOTICE
 
 FDK_AAC_INSTALL_STAGING = YES
 
+# Not compatible with GCC 6 which defaults to GNU++14
+FDK_AAC_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=gnu++98"
+
 $(eval $(autotools-package))