package/asterisk: fix gcc bug 93847
cover package/asterisk: fix gcc bug 93847
First patch needs to allow Buildroot to build with its CFLAGS instead of Asterisk hardcoded one, while the second applies the gcc bug work-around.
Giulio Benetti (2):
package/asterisk: remove default -O3 optimization flag package/asterisk: fix build failure due to gcc bug 93847
package/asterisk/asterisk.mk | 11 +++++++++++ 1 file changed, 11 insertions(+)
Signature · 1 line
2.25.1
PATCH 1/2 package/asterisk: remove default -O3 optimization flag
Actually asterisk package gets built with -O3 cflag since it's defaulted into its sources, but it's not what we want, so let's empty its OPTIMIZE Makefile variable letting Buildroot CFLAGS to take place instead.
--- package/asterisk/asterisk.mk | 3 +++ 1 file changed, 3 insertions(+)
package/asterisk/asterisk.mk +3 -0
@@ -280,6 +280,9 @@ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) ASTERISK_MAKE_OPTS += ASTLDFLAGS="-latomic" endif +# Remove default -O3 optimization flag +ASTERISK_MAKE_OPTS += OPTIMIZE="" + # We want to install sample configuration files, too. ASTERISK_INSTALL_TARGET_OPTS = \ $(ASTERISK_DIRS) \
Signature · 1 line
2.25.1
PATCH 1/2 package/asterisk: remove default -O3 optimization flag
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Giulio" == Giulio Benetti <[email protected]> writes:
Actually asterisk package gets built with -O3 cflag since it's defaulted into its sources, but it's not what we want, so let's empty its OPTIMIZE
Makefilevariable letting Buildroot CFLAGS to take place instead.Signed-off-by Giulio Benetti <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 package/asterisk: remove default -O3 optimization flag
In reply to Giulio BenettiQuoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Giulio" == Giulio Benetti <[email protected]> writes:
Actually asterisk package gets built with -O3 cflag since it's defaulted into its sources, but it's not what we want, so let's empty its OPTIMIZE
Makefilevariable letting Buildroot CFLAGS to take place instead.Signed-off-by Giulio Benetti <[email protected]>
Committed to 2020.02.x and 2020.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/2 package/asterisk: fix build failure due to gcc bug 93847
In reply to Giulio BenettiThe asterisk package exhibits gcc bug 93847 when built for the Nios2 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_93847=y.
Fixes:
http://autobuild.buildroot.net/results/24c0a6ca3b272711a1e6ceaa033925182d0d49c4
--- package/asterisk/asterisk.mk | 8 ++++++++ 1 file changed, 8 insertions(+)
package/asterisk/asterisk.mk +8 -0
@@ -283,6 +283,14 @@ endif # Remove default -O3 optimization flag ASTERISK_MAKE_OPTS += OPTIMIZE="" +ASTERISK_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_93847),y) +ASTERISK_CFLAGS += -O0 +endif + +ASTERISK_CONF_OPTS += CFLAGS="$(ASTERISK_CFLAGS)" + # We want to install sample configuration files, too. ASTERISK_INSTALL_TARGET_OPTS = \ $(ASTERISK_DIRS) \
Signature · 1 line
2.25.1
PATCH 2/2 package/asterisk: fix build failure due to gcc bug 93847
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Giulio" == Giulio Benetti <[email protected]> writes:
The asterisk package exhibits gcc bug 93847 when built for the Nios2 architecture with optimization enabled, which causes a build failure.
Quoted 7 lines
As done for other packages in Buildroot work around this gcc bug by setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_93847=y.
Fixes:
http://autobuild.buildroot.net/results/24c0a6ca3b272711a1e6ceaa033925182d0d49c4Signed-off-by Giulio Benetti <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/2 package/asterisk: fix build failure due to gcc bug 93847
In reply to Giulio BenettiQuoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Giulio" == Giulio Benetti <[email protected]> writes:
The asterisk package exhibits gcc bug 93847 when built for the Nios2 architecture with optimization enabled, which causes a build failure.
Quoted 7 lines
As done for other packages in Buildroot work around this gcc bug by setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_93847=y.
Fixes:
http://autobuild.buildroot.net/results/24c0a6ca3b272711a1e6ceaa033925182d0d49c4Signed-off-by Giulio Benetti <[email protected]>
Committed to 2020.02.x and 2020.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard