Skip to content

Commit

Permalink
Compile updates
Browse files Browse the repository at this point in the history
- Fix compile on newer Fedora (possibly anything with newer gcc 12+??).
  This was manifesting itself as an issue compiling httpAPI.cpp
  regarding create_webserver::use_dual_stack()
- Remove fix for gcc versions older than v9.
  • Loading branch information
cpinkham committed Nov 21, 2023
1 parent bb4f400 commit 8aa7521
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
12 changes: 5 additions & 7 deletions src/makefiles/common/setup.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ifeq '$(SRCDIR)' ''
endif

ifeq '$(CXXCOMPILER)' 'g++'
GCCVERSIONGTEQ9:=$(shell expr `gcc -dumpversion | cut -f1 -d.` \>= 9)
GCCVERSIONGTEQ12:=$(shell expr `gcc -dumpversion | cut -f1 -d.` \>= 12)
# Common CFLAGS
ifeq ($(DISTCC_HOSTS),)
PCH_FILE=fpp-pch.h.gch
Expand All @@ -54,12 +54,10 @@ else
endif
OPTIMIZE_FLAGS=-O3 -Wno-psabi
debug: OPTIMIZE_FLAGS=-g -DDEBUG -Wno-psabi
CXXFLAGS += -std=gnu++2a

ifeq "$(GCCVERSIONGTEQ9)" "0"
LD_FLAG_FS=-lstdc++fs
else
LD_FLAG_FS=
ifeq "$(GCCVERSIONGTEQ12)" "1"
CXXFLAGS += -std=gnu++23
else
CXXFLAGS += -std=gnu++2a
endif
else
OPTIMIZE_FLAGS=-O3
Expand Down
2 changes: 1 addition & 1 deletion src/makefiles/fpp_so.mk
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ LIBS_fpp_so += \
-lGraphicsMagick \
-lGraphicsMagickWand \
-lGraphicsMagick++ \
$(LIBS_GPIO_ADDITIONS) $(LD_FLAG_FS)
$(LIBS_GPIO_ADDITIONS)

ifneq ($(wildcard /usr/local/include/vlc/vlc.h),)
LIBS_fpp_so += -lvlc
Expand Down
2 changes: 1 addition & 1 deletion src/makefiles/fppcapedetect.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LIBS_fppcapedetect = \
-ljsoncpp

LIBS_libfpp_capeutils_so = \
-ljsoncpp -lcrypto $(LD_FLAG_FS)
-ljsoncpp -lcrypto

# At boot time, reading off the SD card is a huge bottleneck as nothing is cached
# and all the services starting in parallel are trying to load things.
Expand Down
2 changes: 1 addition & 1 deletion src/makefiles/fppoled.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OBJECTS_fppoled += \
LIBS_fppoled = \
-ljsoncpp \
-lcurl \
$(LIBS_GPIO_ADDITIONS) -L. $(LIBS_GPIO_EXE_ADDITIONS) $(LD_FLAG_FS)
$(LIBS_GPIO_ADDITIONS) -L. $(LIBS_GPIO_EXE_ADDITIONS)

TARGETS += fppoled
OBJECTS_ALL+=$(OBJECTS_fppoled)
Expand Down

0 comments on commit 8aa7521

Please sign in to comment.