Skip to content

Commit

Permalink
add latomic linker for legacy Rpi builds in Stretch and newer (#6508)
Browse files Browse the repository at this point in the history
#changelog #linuxarm
  • Loading branch information
ofTheo authored Jan 14, 2020
1 parent 565f963 commit bb3451d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ ifneq (,$(wildcard $(RPI_ROOT)/etc/os-release))
VER_ID = $(shell grep -oP '(?<=^VERSION_ID=).+' $(RPI_ROOT)/etc/os-release | tr -d '"')
endif

#check if we are newer than 8 and use the new system
#check if we are newer than Stretch and use the new system
ifeq ($(shell expr $(VER_ID) \>= 9), 1)
# comment the line below if you want to use the non X window based system - currently compatible with RPi 1-3 only
USE_PI_LEGACY = 0
USE_ATOMIC = 1
endif

$(info VER ID IS $(VER_ID))

# defines used inside openFrameworks libs.
PLATFORM_DEFINES += TARGET_RASPBERRY_PI

Expand Down Expand Up @@ -184,7 +184,7 @@ PLATFORM_LIBRARIES += dl

PLATFORM_LDFLAGS += -pthread

ifeq ($(USE_PI_LEGACY), 0)
ifdef USE_ATOMIC
PLATFORM_LDFLAGS += -latomic
endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ ifneq (,$(wildcard $(RPI_ROOT)/etc/os-release))
VER_ID = $(shell grep -oP '(?<=^VERSION_ID=).+' $(RPI_ROOT)/etc/os-release | tr -d '"')
endif

#check if we are newer than 8 and use the new system
#check if we are newer than Stretch and use the new system
ifeq ($(shell expr $(VER_ID) \>= 9), 1)
# comment the line below if you want to use the non X window based system - currently compatible with RPi 1-3 only
USE_PI_LEGACY = 0
USE_ATOMIC = 1
endif

$(info VER ID IS $(VER_ID))
Expand Down Expand Up @@ -187,7 +189,7 @@ PLATFORM_LIBRARIES += dl

PLATFORM_LDFLAGS += -pthread

ifeq ($(USE_PI_LEGACY), 0)
ifdef USE_ATOMIC
PLATFORM_LDFLAGS += -latomic
endif

Expand Down

0 comments on commit bb3451d

Please sign in to comment.