mirror of
https://git.busybox.net/buildroot.git
synced 2024-11-27 07:23:30 +08:00
6f5fcb4329
The apitrace package exhibits gcc bug 68485 when built for the Microblaze architecture with optimization enabled, which causes a build failure. This is mainly due to 3rd party brotli embedded in apitrace that already has been fixed in Buildroot as single package. After working around this bug overriding -O0 to CFLAGS(Brotli is a C program), gcc bug 81580 showed off while compiling C++ files. So, as done for other packages in Buildroot, work around this gcc bug by setting optimization to -O0(in CFLAGS) if BR2_TOOLCHAIN_HAS_GCC_BUG_68485=y. And do the same(but in CXXFLAGS) if BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y as already done for other packages. Fixes: http://autobuild.buildroot.net/results/a46/a46626cc50f07f41d831614306f556d346d31429/ Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> [yann.morin.1998@free.fr: reorganise the conditions] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
42 lines
1.1 KiB
Makefile
42 lines
1.1 KiB
Makefile
################################################################################
|
|
#
|
|
# apitrace
|
|
#
|
|
################################################################################
|
|
|
|
APITRACE_VERSION = 9.0
|
|
APITRACE_SITE = $(call github,apitrace,apitrace,$(APITRACE_VERSION))
|
|
APITRACE_LICENSE = MIT
|
|
APITRACE_LICENSE_FILES = LICENSE
|
|
|
|
APITRACE_DEPENDENCIES = host-python3 libpng
|
|
|
|
ifeq ($(BR2_PACKAGE_XORG7),y)
|
|
APITRACE_DEPENDENCIES += xlib_libX11
|
|
APITRACE_CONF_OPTS += -DENABLE_X11=ON
|
|
else
|
|
APITRACE_CONF_OPTS += -DENABLE_X11=OFF
|
|
endif
|
|
|
|
# Gui was never tested, so we prefer to explicitly disable it
|
|
APITRACE_CONF_OPTS += -DENABLE_GUI=false
|
|
|
|
APITRACE_CFLAGS = $(TARGET_CFLAGS)
|
|
APITRACE_CXXFLAGS = $(TARGET_CXXFLAGS)
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
|
|
# This works around embedded Brotli build failure
|
|
APITRACE_CFLAGS += -O0
|
|
endif
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
|
|
# This works around Apitrace itself build failure
|
|
APITRACE_CXXFLAGS += -O0
|
|
endif
|
|
|
|
APITRACE_CONF_OPTS += \
|
|
-DCMAKE_C_FLAGS="$(APITRACE_CFLAGS)" \
|
|
-DCMAKE_CXX_FLAGS="$(APITRACE_CXXFLAGS)"
|
|
|
|
$(eval $(cmake-package))
|