This fixes issues where if both check_header and check_lib are used
it would set HAVE_FOO=yes and then result in a configure failure
when check_lib failed. This was also implemented for the other functions
to avoid similar issues.
* travis: Enable building qt for linux.
* qb: Set QT_SELECT for moc and qtchooser.
This should have no effect on systems where qtchooser is not used.
Fixes https://github.com/libretro/RetroArch/issues/8028
* qb: Actually disable c++ features if there is no c++ compiler.
Now this warning actually does something.
Warning: A working C++ compiler was not found, C++ features will be disabled.
This moves the check for a Qt5 moc into its own file, qb.moc.sh which
is executed at the end of the script to avoid the direct dependency on
pkg-config. Now instead it depends on the QT5CORE_CFLAGS and
QT5CORE_LIBS variables set in config.lib.sh. These should always be set
if HAVE_QT=yes.
This also creates a new qb.make.sh file to ensure that the config.mk and
config.h files are created at the end of the configure script.
This adds '--disable-menu' which will disable all of the menu drivers
including Qt. This will also allow disabling only rgui and not the other
menu drivers.
Fixes:
retroarch.c: In function ‘runloop_check_state’:
retroarch.c:2593:20: warning: variable ‘seq’ set but not used [-Wunused-but-set-variable]
static uint64_t seq = 0;
^~~
Also fixes a crash on startup with '--disable-rgui'.
Thread 1 "retroarch" received signal SIGSEGV, Segmentation fault.
0x0000000000529f52 in strlcpy_retro__ (dest=0x7fffffffbb17 "treaming_toggle",
source=0x1 <error: Cannot access memory at address 0x1>, size=250)
at libretro-common/compat/compat_strl.c:38
38 while (--n && (*dest++ = *source++)) src_size++;
(gdb) bt
dest=0x7fffffffbb17 "treaming_toggle",
source=0x1 <error: Cannot access memory at address 0x1>, size=250)
at libretro-common/compat/compat_strl.c:38
size=250) at libretro-common/compat/compat_strl.c:60
out_path=0x7fffffffbb10 "input_", dir=0x94b460 "input", path=0x0,
delim=95 '_', size=256) at libretro-common/file/file_path.c:964
prefix=0x94b460 "input", btn=0x0, bind=0x151e180 <input_autoconf_binds+4672>)
at input/input_driver.c:2483
binds=0x151cf40 <input_autoconf_binds>) at tasks/task_autodetect.c:172
params=0x26adb40, task=0x26b74f0) at tasks/task_autodetect.c:252
params=0x26adb40, task=0x26b74f0) at tasks/task_autodetect.c:393
at tasks/task_autodetect.c:851
at libretro-common/queues/task_queue.c:182
at libretro-common/queues/task_queue.c:609
at frontend/frontend.c:146
at frontend/frontend.c:170
Fixes https://github.com/libretro/RetroArch/issues/7893
This fixes a few subtle problems with passing CFLAGS and CXXFLAGS as
environment variables for configure.
First it will now only add these variables to config.mk when they are
actually set. If they are unset then the default optimizations in the
Makefile are set. This avoids passing more than one conflicting
optimization level to the compiler.
Next all CFLAGS are added to CXXFLAGS to avoid issues with forgetting to
set both CFLAGS and CXXFLAGS. This results in the cxx compiler getting
passed several redundant optimization levels when both the CFLAGS and
CXXFLAGS environment variabls are used. Now these uses of CFLAGS in
Makefile.common are set to DEF_FLAGS. This allows adding $(DEF_FLAGS)
to the CXXFLAGS variable without adding redundant flags from CFLAGS.
v2: Update other build files.
Currently RetroArch will install assets for xmb, materialui and ozone
unconditionally.
This change will now only install assets when RetroArch is compiled
with support for the relevant menu driver. This also exposes assets
from the nuklear and zarch menu drivers which are still disabled by
default.
This uses safer quoting and removes an unneeded use of printf.
Fixes the following shellcheck warning.
In qb/qb.libs.sh line 143:
if [ $3 ]; then
^-- SC2086: Double quote to prevent globbing and word splitting.
v2: Remove redundant conditional.
C89 builds are only used for the qb build system currently and these are
already checked in qb/config.params.sh.
Additionally the HAVE_NETWORKING check is handled with qb/config.lib.sh
where HAVE_SSL and HAVE_BUILTINMBEDTLS are disabled if networking is
also disabled. The other build systems should never define HAVE_SSL or
HAVE_BUILTINMBEDTLS without HAVE_NETWORKING. Also there are no other
build systems that rely on Makefile.common using this yet.
This does the following.
1. Fixes checking if the CXX compiler works on platforms other than windows.
2. Turns the error when the CXX compiler is missing or doesn't work into a warning.
3. Adds HAVE_CC and HAVE_CXX.
4. Only adds CC and CXX to config.mk when HAVE_CC or HAVE_CXX are true.
5. Disables Qt companion, Vulkan, CXX_BUILD and NEED_CXX_LINKER if HAVE_CXX is false.
6. Explicitly errors when the CXX compiler is broken or missing and Qt or vulkan support is enabled.
7. No longer explicitly links with the CXX compiler on windows since this should no longer be needed.
This also adds the function `check_enabled` to `qb/qb.lib.sh` which
can be used to dynamically disable any libraries that require C++
support.