Based on master latest (2eb4fe3b36f50989ecc9f33a8aea4fc9ee769908), I bumped into the following build error.
OS: Ubuntu 20.10
Toolchain: gcc 10.3.0
$ /usr/bin/cc --version
cc (Ubuntu 10.3.0-1ubuntu1~20.10) 10.3.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[ 21%] Building C object src/cdogs/CMakeFiles/cdogs.dir/map_wolf.c.o
In file included from /src/cdogs/map_wolf.c:30:
src/cdogs/map_wolf.c: In function ‘MapWolfLoadCampaignsFromSystem’:
src/cdogs/find_steam_game.h:112:7: error: inlining failed in call to ‘fsg_get_steam_game_path’: --param max-inline-insns-single limit reached [-Werror=inline]
112 | void fsg_get_steam_game_path(char *out, const char *name)
| ^~~~~~~~~~~~~~~~~~~~~~~
src/cdogs/map_wolf.c:2497:2: note: called from here
2497 | fsg_get_steam_game_path(buf, WOLF_STEAM_NAME);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/cdogs/map_wolf.c:30:
src/cdogs/find_steam_game.h:112:7: error: inlining failed in call to ‘fsg_get_steam_game_path’: --param max-inline-insns-single limit reached [-Werror=inline]
112 | void fsg_get_steam_game_path(char *out, const char *name)
| ^~~~~~~~~~~~~~~~~~~~~~~
src/cdogs/map_wolf.c:2528:2: note: called from here
2528 | fsg_get_steam_game_path(buf, SPEAR_STEAM_NAME);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
The following patch makes it go away by increasing the changing the limit of the inline functions size, though I am not sure it is the right way to fix the issue:
Hi,
Based on master latest (2eb4fe3b36f50989ecc9f33a8aea4fc9ee769908), I bumped into the following build error.
OS: Ubuntu 20.10 Toolchain: gcc 10.3.0
$ /usr/bin/cc --version cc (Ubuntu 10.3.0-1ubuntu1~20.10) 10.3.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The following patch makes it go away by increasing the changing the limit of the inline functions size, though I am not sure it is the right way to fix the issue: