Fix build when HOST_CC is GCC 16
The default C++ standard in GCC 16 is C++20 (from C++17), which introduced "requires" as a keyword. This caused the build of libsolv (and libpackage) to break. fs_shell now sets -std=c++11 as in bfs_shell. Both define __STRICT_ANSI__ to avoid using certain headers, which now causes conflicts related to __int128 when the standard is not actually strict ANSI. Change-Id: Ie142fb87eb79a20fe0c1b5f3fdd3b94899eaff48 Reviewed-on: https://review.haiku-os.org/c/haiku/+/10980 Haiku-Format: Haiku-format Bot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
#if __GNUC__ == 2
|
#if __GNUC__ == 2
|
||||||
# define B_HAIKU_ABI B_HAIKU_ABI_GCC_2_HAIKU
|
# define B_HAIKU_ABI B_HAIKU_ABI_GCC_2_HAIKU
|
||||||
#elif (__GNUC__ >= 4 && __GNUC__ <= 15) || defined(__TINYC__)
|
#elif (__GNUC__ >= 4 && __GNUC__ <= 16) || defined(__TINYC__)
|
||||||
# define B_HAIKU_ABI B_HAIKU_ABI_GCC_4
|
# define B_HAIKU_ABI B_HAIKU_ABI_GCC_4
|
||||||
#else
|
#else
|
||||||
# error Unsupported compiler!
|
# error Unsupported compiler!
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ UseHeaders [ FDirName $(HAIKU_TOP) src libs libsolv ] : true ;
|
|||||||
|
|
||||||
UsePrivateHeaders shared ;
|
UsePrivateHeaders shared ;
|
||||||
|
|
||||||
|
SubDirC++Flags -std=gnu++11 ;
|
||||||
|
|
||||||
USES_BE_API on libpackage-add-on-libsolv_build.so = true ;
|
USES_BE_API on libpackage-add-on-libsolv_build.so = true ;
|
||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package solver ] ;
|
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package solver ] ;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ switch $(HOST_PLATFORM) {
|
|||||||
SubDirCcFlags -Wno-sign-compare -Wno-missing-prototypes ;
|
SubDirCcFlags -Wno-sign-compare -Wno-missing-prototypes ;
|
||||||
|
|
||||||
SubDirCcFlags $(HOST_PIC_CCFLAGS) ;
|
SubDirCcFlags $(HOST_PIC_CCFLAGS) ;
|
||||||
SubDirC++Flags $(HOST_PIC_C++FLAGS) ;
|
SubDirC++Flags $(HOST_PIC_C++FLAGS) -std=gnu++11 ;
|
||||||
|
|
||||||
|
|
||||||
# libsolv
|
# libsolv
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ DEFINES += FS_SHELL=1 ;
|
|||||||
# prevent inclusion of HaikuBuildCompatibility.h and _BSD_SOURCE headers
|
# prevent inclusion of HaikuBuildCompatibility.h and _BSD_SOURCE headers
|
||||||
DEFINES += HAIKU_BUILD_COMPATIBILITY_H __STRICT_ANSI__ ;
|
DEFINES += HAIKU_BUILD_COMPATIBILITY_H __STRICT_ANSI__ ;
|
||||||
|
|
||||||
|
SubDirC++Flags -std=c++11 ;
|
||||||
|
|
||||||
# platform specific sources/libraries
|
# platform specific sources/libraries
|
||||||
local fsShellCommandSources ;
|
local fsShellCommandSources ;
|
||||||
local externalCommandsSources ;
|
local externalCommandsSources ;
|
||||||
|
|||||||
Reference in New Issue
Block a user