Skip to content

Commit

Permalink
feat: build with gcc 11 with patch for the_silver_searcher (#2000)
Browse files Browse the repository at this point in the history
  • Loading branch information
thebaptiste authored Nov 29, 2024
1 parent a9c6b55 commit cc4d149
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion layers/layer7_devtools/0030_the_silver_searcher/patches
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Patch to build without lzma
no_lzma.patch
#Fix build with gcc>=10
#Fix build with gcc >= 10
Fix-multiple-global-symbols-definitions.patch
19 changes: 10 additions & 9 deletions layers/layer_wrapper.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ _PARENT_PWD=$(shell dirname $(_PWD))
LAYERS_TO_LOAD=$(shell cat $(_PARENT_PWD)/.layerapi2_dependencies $(_PARENT_PWD)/.build_extra_dependencies .build_extra_dependencies 2>/dev/null |grep '^[a-zA-Z0-9]' |xargs |sed 's/ /,/g')
CURRENT_LAYER=$(shell cat $(_PARENT_PWD)/.layerapi2_label)

#Use gcc-toolset-10 if gcc version < 10
#Use gcc-toolset-11 if gcc version < 11
GCC_VERSION=`gcc --version | head -1 | cut -d" " -f3 | cut -d"." -f1`

#ifeq ($(shell expr $(GCC_VERSION) = "8" ), 1)
# export SCL='scl enable gcc-toolset-10 --'
#else ifeq ($(shell expr $(GCC_VERSION) = "9" ), 1)
# export SCL='scl enable gcc-toolset-10 --'
#else
# export SCL=''
#endif
export SCL=''
ifeq ($(shell expr $(GCC_VERSION) = "8" ), 1)
export SCL='scl enable gcc-toolset-11 --'
else ifeq ($(shell expr $(GCC_VERSION) = "9" ), 1)
export SCL='scl enable gcc-toolset-11 --'
else ifeq ($(shell expr $(GCC_VERSION) = "10" ), 1)
export SCL='scl enable gcc-toolset-11 --'
else
export SCL=''
endif

.DEFAULT_GOAL := all

Expand Down

0 comments on commit cc4d149

Please sign in to comment.